Bugzilla – Attachment 77592 Details for
Bug 7468
Add label to batch by barcode range
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7468 - (follow-up) Make sure only integers are accepted as from/to values
Bug-7468---follow-up-Make-sure-only-integers-are-a.patch (text/plain), 2.11 KB, created by
Charles Farmer
on 2018-08-08 20:21:35 UTC
(
hide
)
Description:
Bug 7468 - (follow-up) Make sure only integers are accepted as from/to values
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2018-08-08 20:21:35 UTC
Size:
2.11 KB
patch
obsolete
>From a5aa9d700a15cb44f3ab5b3184db46a7e5556aae Mon Sep 17 00:00:00 2001 >From: Charles Farmer <charles.farmer@inLibro.com> >Date: Wed, 8 Aug 2018 16:20:40 -0400 >Subject: [PATCH] Bug 7468 - (follow-up) Make sure only integers are accepted > as from/to values > >--- > .../prog/en/modules/labels/label-edit-range.tt | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 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 10acccc..a48ced2 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,17 +15,26 @@ > > function validate() { > var error = false; >- if (parseInt(document.getElementById("from-input").value) < 1) { >+ var from_input = document.getElementById("from-input").value; >+ var to_input = document.getElementById("to-input").value; >+ >+ if (isNaN(parseInt(from_input)))Â { >+ document.getElementById("from-error").innerHTML = " *Must be a positive integer"; >+ error = true; >+ } else if (parseInt(from_input) < 1) { > document.getElementById("from-error").innerHTML = " *Cannot be smaller than 1"; > error = true; > } else { > document.getElementById("from-error").innerHTML = ""; > } >- if (parseInt(document.getElementById("from-input").value) > parseInt(document.getElementById("to-input").value)) { >+ >+ if (isNaN(parseInt(to_input)))Â { >+ document.getElementById("to-error").innerHTML = " *Must be a positive integer"; >+ error = true; >+ } else if (parseInt(from_input) > parseInt(to_input)) { > document.getElementById("to-error").innerHTML = " *Cannot be smaller than starting value"; > error = true; >- } >- else { >+ } else { > document.getElementById("to-error").innerHTML = ""; > } > >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7468
:
67184
|
67598
|
67636
|
70980
|
77592
|
81071
|
81072
|
81073
|
81074
|
81075
|
91568
|
91569
|
91570
|
97454
|
97455
|
97456
|
97457
|
97458
|
97459
|
97460
|
97461
|
97551
|
97552
|
97553
|
97554
|
97555
|
97556
|
97557
|
97558
|
97638
|
97639
|
97640
|
97641
|
97642
|
97643
|
97644
|
97645
|
97646