<title>Koha › Administration › Circulation and fine rules</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
+[% USE Branches %]
<script type="text/javascript">
//<![CDATA[
var type = $(this).attr("type");
if (type != "button" && type != "submit" ) {
$(this).val("");
- $(this).removeAttr("disabled");
+ $(this).prop('disabled', false);
}
if ( type == "checkbox" ) {
- $(this).attr('checked', false);
+ $(this).prop('checked', false);
}
});
- $(edit_row).find("select").removeAttr("disabled");
+ $(edit_row).find("select").prop('disabled', false);
$(edit_row).find("select option:first").attr("selected", "selected");
$(edit_row).find("td:last input[name='clear']").remove();
}
+var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
+
$(document).ready(function() {
+ $(".delete").on("click",function(){
+ return confirmDelete(MSG_CONFIRM_DELETE);
+ });
+
$('#cap_fine_to_replacement_price').on('change', function(){
$('#overduefinescap').prop('disabled', $(this).is(':checked') );
});
} else if ( i == 12 ) {
// specific processing for cap_fine_to_replacement_price
var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
- $('#cap_fine_to_replacement_price').attr('checked', cap_fine_to_replacement_price.is(':checked') );
+ $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
$('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') );
} else {
$(current_column).find("input[type='text']").val(itm);
}
}
});
- $("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled');
- $("#default-circulation-rules tr:last td:eq(1) select").attr('disabled', 'disabled');
+ $("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true);
+ $("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true);
return false;
});
});
<th>On shelf holds allowed</th>
<th>Item level holds</th>
<th>Rental discount (%)</th>
- <th colspan="2"> </th>
+ <th>Actions</th>
</tr>
</thead>
<tbody>
[% END %]</td>
<td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
<td>[% rule.rentaldiscount %]</td>
- <td><a href="#" class="editrule">Edit</a></td>
- <td>
- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a>
+ <td class="actions">
+ <a href="#" class="editrule btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</select>
</td>
<td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
- <td colspan="2">
+ <td class="actions">
<input type="hidden" name="branch" value="[% current_branch %]"/>
- <input type="submit" value="Save" class="submit" />
- <input type="button" name="cancel" value="Clear" onclick="clear_edit();return false;" />
+ <button type="submit" class="btn btn-mini"><i class="fa fa-save"></i> Save</button>
+ <button name="cancel" onclick="clear_edit();return false;" class="btn btn-mini"><i class="fa fa-undo"></i> Clear</button>
</td>
</tr>
<tfoot>
<th>Hold policy</th>
<th>Hold pickup library match</th>
<th>Return policy</th>
- <th> </th>
- <th> </th>
+ <th>Actions</th>
</tr>
<tr>
<td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
</option>
</select>
</td>
- <td><input type="submit" value="Save" class="submit" /></td>
- <td>
- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]">Unset</a>
+ <td class="actions">
+ <button type="submit" class="btn btn-mini"><i class="fa fa-save"></i> Save</button>
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]" id="unset"><i class="fa fa-undo"></i> Unset</a>
</td>
</tr>
</table>
[% END %]
</td>
- <td>
- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% branch_cat_rule_loo.categorycode %]&branch=[% current_branch %]">Delete</a>
+ <td class="actions">
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% branch_cat_rule_loo.categorycode %]&branch=[% current_branch %]"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
</td>
<td><input name="maxissueqty" size="3" /></td>
<td><input name="maxonsiteissueqty" size="3" /></td>
- <td><input type="submit" value="Add" class="submit" /></td>
+ <td class="actions"><button type="submit" class="btn btn-mini"><i class="fa fa-plus"></i> Add</td>
</tr>
</table>
</form>
</div>
[% END %]
+
+ <div id="refund-lost-item-fee-on-return" class="container">
+ [% IF current_branch == '*' %]
+ <h3>Default lost item fee refund on return policy</h3>
+ [% ELSE %]
+ <h3>Lost item fee refund on return policy for [% Branches.GetName(current_branch) %]</h3>
+ [% END %]
+ <p>Specify the default policy for lost item fees on return.
+ </p>
+ <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
+ <input type="hidden" name="op" value="mod-refund-lost-item-fee-rule" />
+ <input type="hidden" name="branch" value="[% current_branch %]" />
+ <table>
+ <tr>
+ <th>Refund lost item fee</th>
+ <th> </th>
+ </tr>
+ <tr>
+ <td>
+ <select name="refund">
+ [#% Default branch %#]
+ [% IF ( current_branch == '*' ) %]
+ [% IF ( refundLostItemFeeRule.refund ) %]
+ <option value="1" selected="selected">
+ [% ELSE %]
+ <option value="1">
+ [% END %]
+ Yes
+ </option>
+ [% IF ( not refundLostItemFeeRule.refund ) %]
+ <option value="0" selected="selected">
+ [% ELSE %]
+ <option value="0">
+ [% END %]
+ No
+ </option>
+ [% ELSE %]
+ [#% Branch-specific %#]
+ [% IF ( not refundLostItemFeeRule ) %]
+ <option value="*" selected="selected">
+ [% ELSE %]
+ <option value="*">
+ [% END %]
+ [% IF defaultRefundRule %]
+ Use default (Yes)
+ [% ELSE %]
+ Use default (No)
+ [% END %]
+ </option>
+ [% IF ( not refundLostItemFeeRule ) %]
+ <option value="1">Yes</option>
+ <option value="0">No</option>
+ [% ELSE %]
+ [% IF ( refundLostItemFeeRule.refund ) %]
+ <option value="1" selected="selected">
+ [% ELSE %]
+ <option value="1">
+ [% END %]
+ Yes
+ </option>
+ [% IF ( not refundLostItemFeeRule.refund ) %]
+ <option value="0" selected="selected">
+ [% ELSE %]
+ <option value="0">
+ [% END %]
+ No
+ </option>
+ [% END %]
+ [% END %]
+ </select>
+ </td>
+ <td class="actions">
+ <button type="submit" class="btn btn-mini"><i class="fa fa-save"></i> Save</button>
+ </td>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+
<div id="holds-policy-by-item-type" class="container">
<h3>[% IF humanbranch %]Holds policy by item type for [% humanbranch %][% ELSE %]Default holds policy by item type[% END %]</h3>
<p>
Error - unknown option
[% END %]
</td>
- <td>
- <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=[% branch_item_rule_loo.itemtype %]&branch=[% current_branch %]">Delete</a>
+ <td class="actions">
+ <a class="btn btn-mini delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=[% branch_item_rule_loo.itemtype %]&branch=[% current_branch %]"><i class="fa fa-trash"></i> Delete</a>
</td>
</tr>
[% END %]
<option value="noreturn">Item floats</option>
</select>
</td>
- <td><input type="submit" value="Add" class="submit" /></td>
+ <td class="actions"><button type="submit" class="btn btn-mini"><i class="fa fa-plus"></i> Add</button></td>
</tr>
</table>
</form>