From a8a191bcb35c68c1245eb6bdb324cc4316c9dcbb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 26 Nov 2012 10:49:22 -0500 Subject: [PATCH] Bug 9137 - Focus when editing/adding new itemtypes/authorised values This patch adds the "focus" class to the relevant inputs so that the global staff client JS will move the focus to those fields. Logic in the authorised_values template puts the focus on the correct field whether you're adding a new category, a new value, or performing an edit. To test, try the following operations: - add an itemtype - edit an itemtype - add an authorised value category - add an authorised value value - edit an authorised value value In all cases the focus should automatically be in the first form field. Signed-off-by: Melia Meggs Signed-off-by: Katrin Fischer All tests pass and works nicely. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack Works well in 3.10.x Signed-off-by: Chris Cormack Works well in 3.8.x Signed-off-by: Liz Rea --- .../prog/en/modules/admin/authorised_values.tt | 6 +++++- .../intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 0c806cebb6..32a39a0bfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -59,7 +59,7 @@
  1. [% IF ( action_add_category ) %] - + [% ELSE %]Category [% category %] [% END %] @@ -67,7 +67,11 @@
  2. [% IF ( action_modify ) %][% END %] + [% IF ( action_add_category ) %] + [% ELSE %] + + [% END %]
  3. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 8407d0991c..b0a79656ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -167,11 +167,15 @@ Item Types Administration
  4. [% ELSE %]
  5. - +
  6. [% END %]
  7. -
  8. + [% IF ( itemtype ) %] + + [% ELSE %] + + [% END %] [% IF ( noItemTypeImages ) %]
  9. Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
[% ELSE %] -- 2.39.5