Bug 38738: Only close select element if needed

Preparation: Create additional fields for table 'subscription', visit:
/cgi-bin/koha/admin/additional-fields.pl?tablename=subscription

2 text fields, one repeatable, one not-repeatable
2 AV fields, one repeatable, one not-repeatable
2 MARC fields, one 'get' and one 'set', both non-repeatable, MARC field 942$c

Test plan, apply both patches:
1) Add a new serial subscription, visit:
/cgi-bin/koha/serials/subscription-add.pl
2) Set the mandatory "Record" input (e.g. '112'). Click the 'Next' and press 'Ok' on the alert box.
3) Notice the message 'This message should only show if a select input is present' only shows for select inputs, i.e. it's only closing the element when it needs to

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-12-18 11:02:51 +00:00 committed by Katrin Fischer
parent f1876c17b2
commit 885f33bdd6
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,9 @@
[% END %]
[% END %]
[% END %]
</select>
[% IF field.marcfield || !field.repeatable %]
</select>
[% END %]
[% IF !search_form %]
<span>(Authorised values for [% authorised_value_category | html %])</span>
[% IF field.marcfield && field.marcfield_mode == 'get' %]