From ca6bac72d1adabf7d96ac4174b5e60df8502b093 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Aug 2016 15:01:55 -0400 Subject: [PATCH] [PASSED QA] 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 --- .../prog/en/modules/labels/label-edit-layout.tt | 7 +++++-- .../prog/en/modules/tools/cleanborrowers.tt | 21 ++++++++------------- .../prog/en/modules/tools/inventory.tt | 9 ++++++--- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 11 ++++++++++- .../intranet-tmpl/prog/en/modules/tools/upload.tt | 6 +++++- 5 files changed, 34 insertions(+), 20 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 017af77..402ea9e 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' %] - @@ -60,7 +55,7 @@ [% IF step == 1 %]
-
+
Delete patrons

@@ -129,7 +124,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 ef92067..18fcf36 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
      @@ -237,7 +240,7 @@ $(document).ready(function(){ [% UNLESS compareinv2barcd %] - + [% END %] @@ -305,7 +308,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 2af7a0e..4c6422f 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; @@ -295,7 +304,7 @@ $(document).ready(function() { [% IF adding %] - [% ELSE %]