Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing
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
..
value_builder Bug 10592: fix MARC21 006/008 cataloging plugins 2013-07-22 14:00:23 +00:00
addbiblio.tt Bug 10448: can now change framework after duplicating bib record 2013-07-08 15:23:05 +00:00
addbooks.tt Bug 10233 - Toolbar background missing from staff client catalogue page 2013-05-14 08:17:33 -04:00
additem.tt Bug 10543: fix false warnings from checks of mandatory item fields 2013-07-30 14:43:41 +00:00
linkitem.tt Bug 8356 - moveitem.tt and linkitem.tt have cataloging typo Changed urls from cataloging to cataloguing 2012-07-10 10:56:26 +02:00
merge.tt Bug 9755: Refactor record merge functionality 2013-07-23 23:10:07 +00:00
moveitem.tt Bug 8356 - moveitem.tt and linkitem.tt have cataloging typo Changed urls from cataloging to cataloguing 2012-07-10 10:56:26 +02:00
z3950_search.tt Bug 2835 - Inconsistent use of colon at the end of sentences 2013-04-02 09:03:42 -04:00