Bug 26377: Show when loading the page if needed

Prevent a blink

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-05-31 11:16:57 +02:00 committed by Tomas Cohen Arazi
parent 13525cff5c
commit 97e8a5b00d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 8 additions and 4 deletions

View file

@ -199,7 +199,11 @@ fieldset.rows table { clear: none; margin: 0; }
[% END %]
</select>
</li>
[% IF serialsadditems %]
<li class="use_items">
[% ELSE %]
<li class="use_items" style="display:none">
[% END %]
<label for="ccode">Collection:</label>
<select name="ccode" id="ccode">
<option value="">None</option>
@ -212,7 +216,11 @@ fieldset.rows table { clear: none; margin: 0; }
[% END %]
</select>
</li>
[% IF serialsadditems %]
<li class="use_items">
[% ELSE %]
<li class="use_items" style="display:none">
[% END %]
<label for="itemtype">Item type:</label>
<select name="itemtype" id="itemtype">
<option value=""></option>

View file

@ -739,10 +739,6 @@ $(document).ready(function() {
});
});
if( $("#serialsadditems-yes").prop("checked") ){
$(".use_items").show();
}
$("#serialsadditems-yes").on("change", function(){
if( $(this).prop("checked") ){
$(".use_items").show();