Bugzilla – Attachment 31889 Details for
Bug 10473
Prompt for confirmation if more than 99 items are being added
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10473 - Max length should be 2 digit for adding multiple copies in add items page
Bug-10473---Max-length-should-be-2-digit-for-addin.patch (text/plain), 2.78 KB, created by
Jonathan Druart
on 2014-09-26 08:12:08 UTC
(
hide
)
Description:
Bug 10473 - Max length should be 2 digit for adding multiple copies in add items page
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-09-26 08:12:08 UTC
Size:
2.78 KB
patch
obsolete
>From 7ee0fd412424f37ea456289ad6f11f51af8a11e5 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 18 Sep 2014 12:02:17 -0400 >Subject: [PATCH] Bug 10473 - Max length should be 2 digit for adding multiple > copies in add items page > >As per the discussion, a prompt on a hard coded soft-limit is >far more acceptable as a solution. > >TEST PLAN >--------- > 0) Back up your DB. -- because a backup is always good! > 1) Log in to staff client > 2) Navigate to any biblio details > (e.g. cgi-bin/koha/catalogue/detail.pl?biblionumber=#####) > 3) Click the 'Edit' dropdown button. > 4) Click 'Edit items'. > 5) Click 'Add multiple items' > 6) Enter a crazy high number (e.g. 999) > 7) Click 'Add' > -- Koha just adds it! YIKES! > 8) Apply patch > 9) Repeat steps 5-7 >10) Click 'Cancel' > -- Koha does not add the items. >11) Repeat steps 5-7 >12) Click 'Ok' > -- Koha does add the items. >13) run koha QA test tools >14) Restore your DB. > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index 85a4486..53b1843 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -76,6 +76,10 @@ function CheckMultipleAdd(f) { > alert(_("Please enter a number of items to create.")); > return false; > } >+ <!-- Add a soft-limit of 99 with a reminder about potential data entry error --> >+ if (f>99) { >+ return confirm(_("More than 99 copies will be added. Should they be added?")); >+ } > } > function Dopop(link,i) { > defaultvalue=document.forms[0].field_value[i].value; >@@ -241,7 +245,7 @@ $(document).ready(function() { > <input type="submit" name="add_duplicate_submit" value="Add & duplicate" onclick="return Check(this.form)" /> > <input type="submit" name="add_multiple_copies" value="Add multiple items" onclick="javascript:this.nextSibling.style.visibility='visible';document.f.number_of_copies.focus(); return false;" /><span id="add_multiple_copies_span" style="visibility:hidden"> > <label for="number_of_copies">Number of items to add : </label> >- <input type="text" id="number_of_copies" name="number_of_copies" value="" size="2" /> >+ <input type="text" id="number_of_copies" name="number_of_copies" value="" placeholder="3"/> > <input type="submit" id="add_multiple_copies_submit" name="add_multiple_copies_submit" value="Add" onclick="javascript:return Check(this.form) && CheckMultipleAdd(this.form.number_of_copies.value);" /> > </span> > >-- >2.1.0
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 10473
:
19030
|
31722
|
31780
| 31889 |
31890
|
33577