From 12beaef4b3acbf9550605bd0f6e44977bced1fba Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Aug 2016 15:01:55 -0400 Subject: [PATCH] Bug 17083: Remove more event attributes from tools templates This patch removes event attributes from several tool-related templates. Events are defined instead in the JavaScript. To test, apply the patch and: - Go to Tools -> Label creator -> Manage -> Layouts and edit any layout. - In the "Font" setting, choose any font which includes the word "italic" or "oblique" in the name. Doing so should disable the "Oblique title" checkbox. - Go to Tools -> Batch patron deletion/anonymization. - Submit the form without making any changes. You should be prompted to select an action. - Go to Tools -> Inventory. - Select a batch of barcodes to upload. - Submit the form without selecting any filters. This should trigger a warning. - Also changed: Added Font Awesome icons to the "Select all" and "Clear all" links on the inventory results view. - Go to Tools -> Notices and Slips. - Click "New notice" - Change the selection under "Koha module." The page should reload with the correct available message body fields. For instance, selecting "Holds" should make available reserves.* columns. - Go to Tools -> Upload. - In the search form, enter a search term and click the 'Search' button. The form should submit. Signed-off-by: Hector Castro Works as advertised. Event attributes removed Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- .../en/modules/labels/label-edit-layout.tt | 7 +++-- .../prog/en/modules/tools/cleanborrowers.tt | 28 ++++++------------- .../prog/en/modules/tools/inventory.tt | 9 ++++-- .../prog/en/modules/tools/letter.tt | 11 +++++++- .../prog/en/modules/tools/upload.tt | 6 +++- 5 files changed, 34 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt index 017af77e34..402ea9e24c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt @@ -10,11 +10,14 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Label creator › Layouts › [% IF ( layout_id ) %]Edit ([% layout_id %])[% ELSE %]New[% END %] [% INCLUDE 'doc-head-close.inc' %] - @@ -90,7 +78,7 @@

This tool allows you to delete patrons and anonymize checkout history. For deleting patrons, any combination of limits can be used.

-
+
Delete patrons

@@ -167,7 +155,7 @@ [% IF step == 2 %]
- +
Warnings
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index f3ce12549f..b682d55913 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -86,6 +86,9 @@ $(document).ready(function(){ $(".checkboxed").unCheckCheckboxes(); return false; }); + $("#inventory_form").on("submit",function(){ + return checkForm(); + }); }); //]]> @@ -120,7 +123,7 @@ $(document).ready(function(){ [% END %] [% UNLESS op %]
    - +
    Use a barcode file
      @@ -231,7 +234,7 @@ $(document).ready(function(){ [% UNLESS compareinv2barcd %] - + [% END %] @@ -299,7 +302,7 @@ $(document).ready(function(){
      [% UNLESS compareinv2barcd %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 3d1eb15e87..18094b4efe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -27,6 +27,15 @@ $(document).ready(function() { }); [% END %] + $("#newmodule").on("change",function(){ + if( $("#branch").val() == ""){ + var branchcode = "*"; + } else { + var branchcode = $("#branch").val(); + } + window.location.href = "/cgi-bin/koha/tools/letter.pl?op=add_form&module=" + $(this).val() + "&branchcode=" + branchcode; + }); + $("#submit_form").click( function(event) { event.preventDefault(); var at_least_one_exists = 0; @@ -291,7 +300,7 @@ $(document).ready(function() { [% IF adding %] - [% ELSE %]