From 9d6ab31cdad75ac701a2d9c4a4e9c1feb583df9b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 11 Jul 2016 16:31:18 +0200 Subject: [PATCH] Bug 16897 - Re-focus on "Add item" in Lists MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug 11325 add solved a focus on "Add item" missing in Lists page. Since revamping of this page, the add item form exists both in page. The one corrected by Bug 11325 is not visible because it checks a bad var allowaddingitem instead of can_add_biblios. This patch removes the first form and corrects the second form. It moves the form at left part of page so that it is always shown (usefull when there are a lot of items). It does not add the list name after "Add item" besause it whould be huggly for long names and because listname already exists in breadscrumbs and on top of the table. It also adds autocomplete="off" on barcode input because there can be problems with a scanning device. Test instructions: 1. Create a list 2. Make sure you have an object with an assigned barcode 3. Go to the list => The barcode entry interface should be at left and has the focus 4. Enter the barcode and press enter (or use a scanner) => The item is added to the list Signed-off-by: Owen Leonard This is a nice improvement, thanks! Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit fcf2e1325e6cf056b5b7e5e95545adcd322d1b52) Signed-off-by: Frédéric Demians (cherry picked from commit 723711ba9d512349dcbfabab609d0dc9a7a79dfd) Signed-off-by: Julian Maurice --- .../prog/en/modules/virtualshelves/shelves.tt | 35 +++++-------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index f69036422c..cd6d213caf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -491,26 +491,6 @@ function placeHold () { [% END %] -[% IF can_add_biblios %] -
-
-
- Add an item to [% shelf.shelfname | html %] -
    -
  1. - - - - - - -
  2. -
-
-
-
-[% END %] - [% IF op == 'add_form' OR op == 'edit_form' %]
@@ -670,17 +650,18 @@ function placeHold () {
-[% IF ( allowaddingitem ) %] +[% IF ( can_add_biblios ) %]
-
+
Add an item
  1. - - - - + + + + +
@@ -689,7 +670,7 @@ function placeHold () {
-[% END %] +[% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5