[Koha-patches] [PATCH] Bug 10130 - Input fields for branch configuration are too short

Owen Leonard oleonard at myacpl.org
Mon Aug 19 21:15:01 CEST 2013


Most input fields in the library entry form (admin/branches.pl) have no
explicit with, so they display with a browser-default width. This patch
gives explicit widths to those fields, giving more room for entry.

Other fields have been given an explicit width and/or maxwidth according
to the database table structure.

To test, add or edit a library in Administration -> Libraries and
Groups. Form fields should be more comfortable for entry, and add/edit
actions should complete correctly.
---
 .../prog/en/modules/admin/branches.tt              |   28 ++++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
index 86fb8ce..5bf9567 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
@@ -92,7 +92,7 @@ tinyMCE.init({
             <label for="branchcode" class="required">Library code: </label>
                 <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% branchcode |html %]" class="required" required="required" /> <span class="required">Required</span>
             [% ELSE %]
-            <label for="branchcode" class="required">Library code: </label>
+            <span class="label">Library code: </span>
                 <input type="hidden" name="branchcode" value="[% branchcode |html %]" />
                 [% branchcode %]
             [% END %]
@@ -119,19 +119,19 @@ tinyMCE.init({
 </fieldset>[% END %]
 	<fieldset class="rows">
 	<ol>
-        <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" value="[% branchaddress1 |html %]" /></li>
-        <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" value="[% branchaddress2 |html %]" /></li>
-        <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" value="[% branchaddress3 |html %]" /></li>
-        <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" value="[% branchcity |html %]" /></li>
-        <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" value="[% branchstate |html %]" /></li>
-        <li><label for="branchzip">Zip/Postal code: </label><input type="text" name="branchzip" id="branchzip" value="[% branchzip |html %]" /></li>
-        <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" value="[% branchcountry |html %]" /></li>
-        <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" value="[% branchphone |html %]" /></li>
-        <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" value="[% branchfax |html %]" /></li>
-        <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" value="[% branchemail |html %]" /></li>
-        <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" class="url" /></li>
+        <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% branchaddress1 |html %]" /></li>
+        <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% branchaddress2 |html %]" /></li>
+        <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% branchaddress3 |html %]" /></li>
+        <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% branchcity |html %]" /></li>
+        <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% branchstate |html %]" /></li>
+        <li><label for="branchzip">Zip/Postal code: </label><input type="text" name="branchzip" id="branchzip"  size="25" maxlength="25" value="[% branchzip |html %]" /></li>
+        <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% branchcountry |html %]" /></li>
+        <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% branchphone |html %]" /></li>
+        <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% branchfax |html %]" /></li>
+        <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email"  size="80" value="[% branchemail |html %]" /></li>
+        <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl"  size="80" value="[% branchurl |html %]" class="url" /></li>
         <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% opac_info |html %]</textarea></li>
-        <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
+        <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip"  size="15" maxlength="15" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
 		<!--
         <li><label for="branchprinter">Library Printer: </label>
             <select id="branchprinter" name="branchprinter">
@@ -145,7 +145,7 @@ tinyMCE.init({
                 [% END %]
             </select></li>
 			-->
-        <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" value="[% branchnotes |html %]" /></li>
+        <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% branchnotes |html %]" /></li>
         </ol>
         </fieldset>
         <fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
-- 
1.7.9.5


More information about the Koha-patches mailing list