$(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') );
});
<td>[% rule.rentaldiscount %]</td>
<td class="actions">
<a href="#" class="editrule btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
- <a class="btn btn-mini" 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>
+ <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 %]
</td>
<td class="actions">
<button type="submit" class="btn btn-mini"><i class="fa fa-save"></i> Save</button>
- <a class="btn btn-mini" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]"><i class="fa fa-undo"></i> Unset</a>
+ <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>
</td>
<td class="actions">
- <a class="btn btn-mini" 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>
+ <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 %]
[% END %]
</td>
<td class="actions">
- <a class="btn btn-mini" 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>
+ <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 %]