Bug 28135: Replace use of input type number in additem.js
This patch corrects in instance where JavaScript is creating an input tag with type "number." To test, apply the patch and make sure the AcqCreateItem system preference is set to "when receiving." - Go to Acquisitions -> Vendor -> Invoices -> Invoice -> Go to receipt page -> Receive. - On the page for receiving items you should see an add item form. - Click the "Add multiple items" button at the bottom of the form. - Test the "Number of items to add" field. It should not accept any input except numbers. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
91fb5d6a15
commit
21658717de
|
|
@ -182,7 +182,7 @@ function cloneItemBlock(index, unique_item_fields, callback) {
|
|||
buttonPlus += '<input type="button" class="addItemControl cancel" name="buttonClear" style="cursor:pointer;" onclick="clearItemBlock(this)" value="' + __("Clear") + '" />';
|
||||
buttonPlus += '<input type="button" class="addItemControl" name="buttonPlusMulti" onclick="javascript:this.nextSibling.style.display=\'inline\'; return false;" style="cursor:pointer; margin:0 1em;" value="' + __("Add multiple items") + '" />';
|
||||
buttonPlus += '<span id="add_multiple_copies" style="display:none">'
|
||||
+ '<input type="number" class="addItemControl" id="multiValue" name="multiValue" placeholder="' + __("Number of items to add") + '" />'
|
||||
+ '<input type="text" inputmode="numeric" pattern="[0-9]*" class="addItemControl" id="multiValue" name="multiValue" placeholder="' + __("Number of items to add") + '" />'
|
||||
+ '<input type="button" class="addItemControl" name=buttonAddMulti" style="cursor:pointer; margin:0 1em;" onclick="checkCount( this ,\'' + unique_item_fields + '\')" value="' + __("Add") + '" />'
|
||||
+ '<div class="dialog message">' + __("NOTE: Fields listed in the 'UniqueItemsFields' system preference will not be copied") + '</div>'
|
||||
+ '</span>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue