From 3841ac22108b3317c684ad076dd0a00f4d320279 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Apr 2016 14:25:02 -0400 Subject: [PATCH] Bug 16300 - Remove the use of "onclick" from circulation and fine rules template Content-Type: text/plain; charset="utf-8" This patch updates the circulation and fine rules template so that the "clear" button does not require an "onclick" attribute. To test, apply the patch and go to Administration -> Circulation and fine rules. - Edit an existing rule. - Click the "Clear" button and confirm. The entry form should be reset to its blank state. - Click the "Clear" button and cancel. The entry form should remain the same. --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index aa8d679..73c58b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -94,6 +94,10 @@ $(document).ready(function() { $("#default-circulation-rules tr:last td:eq(1) select").attr('disabled', 'disabled'); return false; }); + $("#clear_edit").on("click",function(e){ + e.preventDefault(); + clear_edit(); + }); }); //]]> @@ -328,7 +332,7 @@ for="tobranch">Clone these rules to: - + -- 2.1.4