]> git.koha-community.org Git - koha.git/commit
Bug 22669: Fix item editing on receiving an order
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 24 Apr 2019 03:48:35 +0000 (23:48 -0400)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 26 Apr 2019 10:17:21 +0000 (10:17 +0000)
commitc9927a97ab814b18453f981b50ada546ca2ba064
tree46202c8a7f9146349c2b1e98b8ba74e1187ab0e6
parent90a15e2d82cd345c6d2fd3cb3ddd1e318e3a79f7
Bug 22669: Fix item editing on receiving an order

Since
  commit 1253975389975a8ff11a9bb2ef84582aeb6bd08b
  Bug 21091: Move add item template JavaScript to a separate file

items cannot longer be edited when receiving an order.
When moving the code to the JS file, the JS variable "opisadd" was
always set to "true":
  var opisadd = '[% opisadd | html %]';
Even if the TT variable is 0, opisadd will be "0", which is evaluated to
true in Javascript

To clean the situation it is easier to remove this variable and use "op"
instead.

Test plan:
- Make sure acqcreateitem is set to "when placing an order"
- Create a basket with some orders
- Close the basket
- Go to your vendor and receive an order
- On the receive page, try to edit your item
=> Without the patch, the pop up page will open and then close, not allowing the item to be edited.
=> With this patch applied you will see the item edit form. Save and
confirm that the parent window is updated with the new value (actually
it's refreshed)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
cataloguing/additem.pl
koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt
koha-tmpl/intranet-tmpl/prog/js/cataloging_additem.js