Bug 26946: Set maxlength for cash register name

The cash register names is limited to 24 characters at the database
level and so that restriction should also be reflected in the UI.

Test plan
1/ Add or Edit a cash register ( admin > accounts > cash registers )
2/ Note that you can enter a cash register name longer than 24
characters, but upon save the value is truncated.
3/ Apply patch
4/ Note you can not longer enter a cash register name longer than 24
characters.
5/ Signoff

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2020-11-09 12:57:13 +00:00 committed by Jonathan Druart
parent 9b62806a97
commit 012229c5ea
1 changed files with 3 additions and 3 deletions

View File

@ -75,13 +75,13 @@
<li>
<label for="name" class="required">Name: </label>
<input type="text" name="name" id="name" size="80" value="[% cash_register.name | html %]" class="required" />
<input type="text" name="name" id="name" size="24" maxlength="24" value="[% cash_register.name | html %]" class="required" />
<span class="required">Required</span>
</li>
<li>
<label for="description">Description: </label>
<input type="text" name="description" id="description" value="[% cash_register.description | html %]"/>
<input type="text" name="description" id="description" size="24" value="[% cash_register.description | html %]"/>
</li>
<li>
<label for="branch">Library: </label>
@ -96,7 +96,7 @@
<li>
<label for="starting_float">Initial float: </label>
<input type="text" pattern='^\d+(?:\.\d{0,2})$' name="starting_float" id="starting_float" value="[% cash_register.starting_float | $Price on_editing => 1 %]" />
<input type="text" pattern='^\d+(?:\.\d{0,2})$' name="starting_float" id="starting_float" size="24" value="[% cash_register.starting_float | $Price on_editing => 1 %]" />
</li>
</ol>
</fieldset>