Bug 5031: CSV profiles: validate required content fields
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 10 Sep 2013 15:19:10 +0000 (17:19 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 3 Dec 2013 17:01:24 +0000 (17:01 +0000)
commit8c5278270708724808b3585dc798e9300abeed31
tree6b2e6fc826ef8cb28c4b390448821c6b23feb620
parent097d5d5c8e9e4ba2ec3839f376bd81e4c2d915b5
Bug 5031: CSV profiles: validate required content fields

Some fields are required on editing/adding CSV profiles.  This
patch adds HTML5 validation so that required fields must be
filled in before the form is submitted.

Test plan:
- add a new CSV profile (tools/csv-profiles.pl) without any value.
- save => error on empty fields.
- fill the "marc" content, select type="sql", fill the CSV name input.
- save => error on sql content field.
- fill the sql content
- save => the CSV profile is saved.
- retry for the edit form.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: On top of both patches for Bug 10853

Works very well, now we get an alert with empty field
Saves correctly MARC and SQL profiles

Solved minor conflict introduced by tab followup on Bug 10853
Again small tab errors corrected in followup

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, looks a bit 'non standard' for Koha,
but improves usability of the form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt