Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tt
Owen Leonard 65d4d3c9b0 Fix for Bug 6501 - missing scroll bar when updating child
- Adding "scrollbars=yes" to window.open javascript.
- Adding javascript tablesorter to categories table

To test, open a child patron record and choose more ->
Update Child to Adult Patron from the toolbar menu. The
resulting pop-up should have scrollbars. The table
of categories should be sortable with a default sort
on the description.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-20 11:51:22 +12:00

89 lines
2.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Choose Adult category</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.tablesorter.defaults.widgets = ['zebra'];
$("#catst").tablesorter({
sortList: [[2,0]],
headers: { 0: { sorter: false }}
});
});
</script>
<style type="text/css">
#custom-doc { width:29em;*width:28.3em;min-width:377px; margin:auto; text-align:left; }
</style>
</head>
<body>
<div id="custom-doc" class="yui-t7">
<div id="bd">
[% IF ( CONFIRM ) %]
<script language="javascript" type="text/javascript">
function confirm_updatechild() {
var is_confirmed = window.confirm('Are you sure you want to update this child to an Adult category? This cannot be undone.');
if (is_confirmed) {
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
}
}
confirm_updatechild([% borrowernumber %]);
</script>
[% END %]
[% IF ( SUCCESS ) %]
<script language="javascript" type="text/javascript">
self.opener.location.href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]';
window.close();
</script>
[% END %]
[% IF ( MULTI ) %]
<h3> Choose Adult category </h3>
[% IF ( CAT_LOOP ) %]
<form method="post" action="update-child.pl">
<fieldset>
<table id="catst">
<thead>
<tr>
<th>&nbsp;</th>
<th>Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
[% FOREACH CAT_LOO IN CAT_LOOP %]
<tr>
<td>
<input type="radio" id="catcode[% CAT_LOO.catcode %]" name="catcode" value="[% CAT_LOO.catcode %]" /></td>
<td>[% CAT_LOO.catcode %]</td>
<td><label for="catcode[% CAT_LOO.catcode %]"><strong>[% CAT_LOO.catdesc %]</strong></label></td>
</tr>
[% END %]
</tbody>
</table>
<input type="hidden" name="op" value="update" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="catcode" value="[% catcode %]" />
<input type="hidden" name="cattype" value="[% cattype %]" />
<input type="hidden" name="catcode_multi" value="[% CATCODE_MULTI %]" />
<fieldset class="action"><input class="submit" type="submit" value="Submit" /> <a href="#" class="cancel close">Cancel</a></fieldset>
[% END %]
</fieldset>
</form>
[% END %]
</div>
[% INCLUDE 'popup-bottom.inc' %]