From 9812048ab99de8bfece7d7342f526e6f12dbcd5b Mon Sep 17 00:00:00 2001 From: Charles Farmer Date: Fri, 26 Jan 2018 15:49:48 -0500 Subject: [PATCH] Bug 7468 - Showing the error message according to the community interface patterns, fixing a javascript condition TEST PLAN++ 1) Apply all the patches 2) Connect to the intranet with an account with permissions to visit the "Tools" page 3) Go to /cgi-bin/koha/labels/label-home.pl . Either by entering the URL directly . OR, from the front page, by clicking "Tools", followed by the hyperlink "Label creator" under the "Catalog" section 4) Under the "+ New" button, a new option should be available: "Barcode range" 5) Fill the "From:" and the "To:" fields of the "Print barcode range" form . Keeping both fields at "0" should trigger a warning beside the first field: "*Cannot be smaller than 1" . If the value "From:" is greater the "To:" value, a warning should appear beside the second field: "*Cannot be smaller than the starting value" . Make sure the form doesn't let you enter non-numerical values . For a casual test, use "From: 1000" and "To: 1100" 6) After pressing the "Print Range" button, choose a template, a layout, and a starting position . The "DEFAULT TEMPLATE 01" has a page height of 5pt and a page width of 0pt, don't use it . All the default layouts should look alike, since we're only printing a barcode over a number, and not bibliographic information . Using a layout not defined as 'Barcode' will show a warning message 7) Clicking the "Export" button should lead to a second dialog window with a "Download as PDF" hyperlink. Clicking the link should prop up a download dialog box 8) Save the PDF locally, or simply open it, and make sure the options you used were taken into account --- koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt index b3b7c7e..10acccc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt @@ -15,7 +15,7 @@ function validate() { var error = false; - if (parseInt(document.getElementById("from-input").value) == 0) { + if (parseInt(document.getElementById("from-input").value) < 1) { document.getElementById("from-error").innerHTML = " *Cannot be smaller than 1"; error = true; } else { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt index d06333c..afcb8ab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt @@ -23,7 +23,10 @@

Click on the following links to download the exported batch(es).

[% IF warn_empty_range %] -
Some or all of the barcodes in the range you have selected have no corresponding items. Because you are using a layout without barcodes, this may result in missing entries or a blank page.
+
+

Some or all of the barcodes in the range you have selected have no corresponding items.

+

If you are using a layout without barcodes, this may result in missing entries or a blank page

+
[% END %] [% FOREACH batche IN batches %]
-- 2.7.4