Koha/koha-tmpl/intranet-tmpl/prog/en/js
Fridolyn SOMERS 651ea298ea Bug 10543: fix false warnings from checks of mandatory item fields
Under certain circumstances, when editing an item, you get a popup
warning
  "1 mandatory fields empty (highlighted)".

Even though all mandatory fields are filled in.

This occurs when there is a field with a huge content (more than 100
characters) that gets displayed in a textarea instead of input.

This patch corrects the Javascript form check by using siblings().

Also adds a more precise filter to find mandatory inputs because
looking in full page may bring unwanted results.

Test plan :
- In a framework, make sure you have in item field :
  An optional subfield (without authorised value),
  then a mandatory subfield, then an optional subfield
  next to mandatory subfield
  For example : $i (optional), $r (mandatory) and $s (optional)
- Open a biblio record and create a new item
- Enter more than 100 characters in $i, fill $r and $s
- Click "Add item"
- Edit this item
=> You get a textarea for $i
- Empty $s and Save
=> Without patch, you get a warning and form is not saved and you see that $s is yellow while it should be $r
=> With patch, form is saved
- Re-edit this item
- Empty $r and save
=> You get a warning and form is not saved

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on last patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-07-30 14:43:41 +00:00
..
pages Bug 9882 - Use DataTables on batch modifications pages 2013-03-30 20:33:52 -04:00
acq.js Bug 7598: [Follow-up] make strings in acquisitions JavaScript translatable 2013-07-19 12:53:11 +00:00
additem.js Bug 10576: make strings in additem.js accessible to translation 2013-07-22 15:40:21 +00:00
ajax.js Bug 2774 - Path to theme is hard-coded in many places 2013-07-18 16:49:18 +00:00
background-job-progressbar.js Bug 9113: fix handling of certain characters by item batch modification tool 2013-07-05 15:35:25 +00:00
basket.js Bug 9757: Make staff client list contents view more like search results 2013-06-26 09:04:04 -07:00
cataloging.js Bug 10543: fix false warnings from checks of mandatory item fields 2013-07-30 14:43:41 +00:00
datatables.js Bug 5766 - Add configuration for excluding articles from DataTables sorting 2013-07-08 15:37:02 +00:00
jquery.jeditable.mini.js Bug 7977: Adding jEditable minified version 2012-05-24 14:14:00 +02:00
localcovers.js Bug 8264 - local cover images not working in IE8 [ prog ] 2013-05-01 06:16:38 -04:00
members.js Bug 9783 - can hit submit twice when adding patrons 2013-03-27 22:58:17 -04:00
prevent_submit.js Bug 10310: Followup Prevent submitting form with enter does not work with IE 2013-05-23 07:32:50 -07:00
staff-global.js Bug 9424: Move JavaScript out of header include 2013-05-28 07:46:19 -07:00
xmlControlfield.js Bug 10592: fix MARC21 006/008 cataloging plugins 2013-07-22 14:00:23 +00:00