From af2a2c0615f5992d4775f52a608249d68d28f0e7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 26 Nov 2012 10:49:22 -0500 Subject: [PATCH] [SIGNED-OFF] 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. --- .../prog/en/modules/admin/authorised_values.tt | 6 +++++- .../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 4acaac3..8657ec8 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 @@ -60,7 +60,7 @@
  1. [% IF ( action_add_category ) %] - + [% ELSE %]Category [% category %] [% END %] @@ -68,7 +68,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 cb3f9ba..30a3a85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -168,11 +168,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 %] -- 1.7.9.5