From a8adb9a90605714cb4a9bb99ae6d1420187dd778 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 Content-Type: text/plain; charset="utf-8" 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. --- .../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