Browse Source

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>
20.11.x
Martin Renvoize 4 years ago
committed by Jonathan Druart
parent
commit
f7030fc0e1
  1. 2
      koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt

2
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc

@ -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 %]

2
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt

@ -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>

Loading…
Cancel
Save