Bug 8431 - Followup - Switch from text input to textarea
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 24 Jul 2012 15:23:05 +0000 (11:23 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 13 Sep 2012 09:06:26 +0000 (11:06 +0200)
Switch the text input to a textarea will make editing larger
borrower attritube values much easier. Since modern browsers
allow for dynamic resizing of textareas, we can keep it small
by default and let the library resize it if neccessary.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

index f4734c0..ef7a12a 100644 (file)
@@ -36,8 +36,8 @@
     });
 
     function clear_entry(node) {
-        var original = node.parentNode;
-        $("input[type=text]", original).attr('value', '');
+        var original = node.parentNode.parentNode;
+        $("textarea", original).attr('value', '');
         $("select", original).attr('value', '');
     }
 
                             </select>
                         [% ELSE %]
                             [% IF ( opduplicate ) %]
-                            <input type="text" maxlength="64" value="[% patron_attribute.value %]"
-                                   id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" />
+                            <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" onclick="this.value=''" >[% patron_attribute.value %]</textarea>
                             [% ELSE %]
-                            <input type="text" maxlength="64" value="[% patron_attribute.value %]"
-                                   id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]" />
+                            <textarea rows="2" cols="30" id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">[% patron_attribute.value %]</textarea>
                             [% END %]
                         [% END %]
                         [% IF ( patron_attribute.password_allowed ) %]