From 23bb83aaf63346d5a21e40b2a6eca003ed26aff4 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Marc Véron --- 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 c7e27ad..6c7e522 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(); + }); }); //]]> @@ -332,7 +336,7 @@ for="tobranch">Clone these rules to: - + -- 1.7.10.4