[Koha-patches] [PATCH] Bug 12380 - can't tab to save buttons on add item

Owen Leonard oleonard at myacpl.org
Mon Jun 9 15:02:52 CEST 2014


Many form elements on the add item page are giving a tabindex of "1" by
the script. This seems to make it impossible to tab through the add item
form fields onto the save buttons. I don't see a reason to set an
explicit tabindex of "1," so this patch removes it.

To test, apply the patch and open an item for editing. Try tabbing
through the add item form fields. It should be possible to tab through
the fields and onto the submit buttons at the bottom. Test again when
adding a new item.
---
 cataloguing/additem.pl |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
index 268ef66..7110f7f 100755
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -154,8 +154,8 @@ sub generate_subfield_form {
 	    my $input = new CGI;
 	    $value = $input->param('barcode');
 	}
-        my $attributes_no_value = qq(tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" );
-        my $attributes_no_value_textarea = qq(tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" rows="5" cols="64" );
+        my $attributes_no_value = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" );
+        my $attributes_no_value_textarea = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" rows="5" cols="64" );
         my $attributes          = qq($attributes_no_value value="$value" );
         
         if ( $subfieldlib->{authorised_value} ) {
@@ -224,7 +224,6 @@ sub generate_subfield_form {
                     -override => 1,
                     -size     => 1,
                     -multiple => 0,
-                    -tabindex => 1,
                     -id       => "tag_".$tag."_subfield_".$subfieldtag."_".$index_subfield,
                     -class    => "input_marceditor",
                 );
-- 
1.7.9.5


More information about the Koha-patches mailing list