//<![CDATA[
function clear_edit(){
- var cancel = confirm(_("Are you sure you want to lost your changes?"));
+ var cancel = confirm(_("Are you sure you want to cancel your changes?"));
if ( !cancel ) return;
$('#default-circulation-rules td').removeClass('highlighted-row');
var edit_row = $("#edit_row");
$(current_column).find("input[type='text']").val(itm);
// select the corresponding option
$(current_column).find("select option").each(function(){
- if ( $(this).text().toLowerCase() == itm.toLowerCase() ) {
+ opt = $(this).text().toLowerCase();
+ opt = opt.replace(/^\s*|\s*$/g,'');
+ if ( opt == itm.toLowerCase() ) {
$(this).attr('selected', 'selected');
}
});
<form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
<input type="hidden" name="op" value="add" />
- <input type="hidden" name="branch" value="[% branch %]"/>
+ <input type="hidden" name="branch" value="[% current_branch %]"/>
<table id="default-circulation-rules">
<thead>
<tr>
<th>Fine amount</th>
<th>Fine charging interval</th>
<th>Fine grace period (day)</th>
- <th>Overdue Fines Cap ($)</th>
+ <th>Overdue fines cap (amount)</th>
<th>Suspension in days (day)</th>
+ <th>Max. suspension duration (day)</th>
<th>Renewals allowed (count)</th>
+ <th>Renewal period</th>
+ <th>No renewal before</th>
+ <th>Automatic renewal</th>
<th>Holds allowed (count)</th>
+ <th>On shelf holds allowed</th>
+ <th>Item level holds</th>
<th>Rental discount (%)</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
[% FOREACH rule IN rules %]
- [% UNLESS ( loop.odd ) %]
- <tr class="highlight" id="row_[% loop.count %]">
- [% ELSE %]
<tr id="row_[% loop.count %]">
- [% END %]
<td>[% IF ( rule.default_humancategorycode ) %]
<em>All</em>
[% ELSE %]
<td>[% rule.firstremind %]</td>
<td>[% rule.overduefinescap FILTER format("%.2f") %]</td>
<td>[% rule.finedays %]</td>
+ <td>[% rule.maxsuspensiondays %]</td>
<td>[% rule.renewalsallowed %]</td>
+ <td>[% rule.renewalperiod %]</td>
+ <td>[% rule.norenewalbefore %]</td>
+ <td>
+ [% IF ( rule.auto_renew ) %]
+ Yes
+ [% ELSE %]
+ No
+ [% END %]
+ </td>
<td>[% rule.reservesallowed %]</td>
+ <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
+ <td>[% IF rule.opacitemholds == 'F'%]Enforce[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
<td>[% rule.rentaldiscount %]</td>
<td><a href="#" class="editrule">Edit</a></td>
<td>
<td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
<td>
<select name="lengthunit" id="lengthunit">
- <option value="days" selected>Days</option>
+ <option value="days" selected="selected">Days</option>
<option value="hours">Hours</option>
</select>
</td>
<td><input type="text" name="firstremind" id="firstremind" size="2" /> </td>
<td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td>
<td><input type="text" name="finedays" id="fined" size="3" /> </td>
+ <td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td>
<td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td>
+ <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td>
+ <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td>
+ <td>
+ <select name="auto_renew" id="auto_renew">
+ <option value="no" selected>No</option>
+ <option value="yes">Yes</option>
+ </select>
+ </td>
<td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
+ <td>
+ <select name="onshelfholds" id="onshelfholds">
+ <option value="0" selected>No</option>
+ <option value="1">Yes</option>
+ </select>
+ </td>
+ <td>
+ <select id="opacitemholds" name="opacitemholds">
+ <option value="N">Don't allow</option>
+ <option value="Y">Allow</option>
+ <option value="F">Enforce</option>
+ </select>
+ </td>
<td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
<td colspan="2">
<input type="hidden" name="branch" value="[% current_branch %]"/>