Bug 24786: (QA follow-up) Do not use 'hidden' attribute

The hidden attribute for loading an element hidden is known to have
issues and inconsistencies accross browsers.

This patch instead updates the relevent input options to use an inline
style of 'display: none' to hide the elements on page load and then
.show, .hide for subsquent changes linked to the library branch picker
change.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-11-06 11:51:30 +00:00 committed by Jonathan Druart
parent 349591b3a4
commit f7030fc0e1
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]">[% r.name | html %]</option>
[% END%]
[% ELSE %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled hidden>[% r.name | html %]</option>
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
[% END %]
[% END %]
[% END %]

View File

@ -103,7 +103,7 @@
<select name="register_id" id="register_id" class="input" tabindex="4">
<option id="noregister" value="" selected="selected">Library default</option>
[% FOREACH r IN Registers.all() %]
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled hidden>[% r.name | html %]</option>
<option class="[%- r.branch | html -%][%- IF r.branch_default -%] default[%- END -%]" value="[% r.id | html %]" disabled style="display: none">[% r.name | html %]</option>
[% END %]
</select>
</p>