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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Charles Farmer 2018-01-26 15:49:48 -05:00 committed by Martin Renvoize
parent dc68633a1f
commit de20a6fbfd
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 5 additions and 2 deletions

View File

@ -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 {

View File

@ -12,7 +12,10 @@
<form>
<h3>Click on the following links to download the exported batch(es).</h3>
[% IF warn_empty_range %]
<div style="color: red; font-weight: bold;">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.</div>
<div class="dialog alert">
<p>Some or all of the barcodes in the range you have selected have no corresponding items.</p>
<p>If you are using a layout without barcodes, this may result in missing entries or a blank page</p>
</div>
[% END %]
[% FOREACH batche IN batches %]
<fieldset>