Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a5034792c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b9abcea244)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c94ccd664)
Signed-off-by: danyonsewell <danyonsewell@catalyst.net.nz>
(Cherry picked from commit 7c94ccd664)
This commit is contained in:
Katrin Fischer 2023-02-04 23:54:22 +00:00 committed by danyonsewell
parent d5a1f3b419
commit cc096b62df
1 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,11 @@
<ol>
<li>
<label for="spec" class="required">setSpec: </label>
<input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
[% IF ( spec == "" ) %]
<input type="text" id="spec" class="focus" name="spec" value="[% spec | html %]" required="required" class="required" />
[% ELSE %]
<input type="text" id="spec" name="spec" value="[% spec | html %]" required="required" class="required" />
[% END %]
<span class="required">Required</span>
</li>
<li>