Bug 28012: Creating numbering pattern: mark mandatory fields required

If any of these fields were missing, notably the Numbering formula
then saving the new numbering pattern silently failed, it didn't give
any error but it didn't save any new pattern either.

Note that there is a plan to make description field optional, so even
if it currently is mandatory on the DB level we leave it optional
here (and due to people using production DB's in non-strict mode which
allows this to be optional).

To test:
  1) After applying this patch make sure all the 3 fields must be
  filled in
  /cgi-bin/koha/serials/subscription-numberpatterns.pl?op=new
  page and it cannot be saved without those.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Joonas Kylmälä 2022-09-03 14:08:50 +03:00 committed by Katrin Fischer
parent 97aab6a98e
commit a69b5e6ee9
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 6 additions and 4 deletions

View File

@ -69,16 +69,18 @@
<fieldset class="rows">
<ol>
<li>
<label for="label">Name:</label>
<input type="text" id="label" name="label" value="[% label | html %]" />
<label class="required" for="label">Name:</label>
<input type="text" id="label" name="label" value="[% label | html %]" class="required" required="required" />
<span class="required">Required</span>
</li>
<li>
<label for="description">Description:</label>
<input type="text" id="description" name="description" value="[% description | html %]" size="50" />
</li>
<li>
<label for="numberingmethod">Numbering formula:</label>
<input type="text" id="numberingmethod" name="numberingmethod" value="[% numberingmethod | html %]" />
<label class="required" for="numberingmethod">Numbering formula:</label>
<input type="text" id="numberingmethod" name="numberingmethod" value="[% numberingmethod | html %]" class="required" required="required" />
<span class="required">Required</span>
</li>
<li>
<label for="displayorder">Display order:</label>