]> git.koha-community.org Git - koha.git/commit
Bug 31497: Prevent ID clash on quick add fields
authorNick Clemens <nick@bywatersolutions.com>
Tue, 13 Sep 2022 12:19:57 +0000 (12:19 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Mon, 14 Nov 2022 16:29:53 +0000 (17:29 +0100)
commitc8ea381902eaf1e851598fd8b0281b752b6150ac
tree80edb41369349fa476c91061769e02af2a76e27e
parentd1a8c426fee0e4361677968a50d1f39fcf729979
Bug 31497: Prevent ID clash on quick add fields

The quick add clones the original fields, including ids. This can cause some clash when
other JS is running on the page.

This patch updates the ids of the fields before adding to the form, which prevents bad
copying/clearing of fields

To test:
* Go to patrons module
* Click on Quick add new patron (I chose Patron as category)
* On sample database these fields are marked as mandatory:
  * Surname
  * Cardnumber
  * Library
  * Category
* Fill in Surname, leave cardnumber empty
* Save - mandatory message is shown
* Fill in cardnumber - save
* The patron is saved
* BUT: cardnumber is empty!
APPLY PATCH
* Repeat plan above
* Cardnumber is correctly saved

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f599e2a2a8c9f6caed4fe4ae6060b106d2a1004)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c8793b1cd3eacece7ccadc9fc6a0c8248a73bba2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt