Bug 40497: Item add form does not respect framework maxlength setting
This patch corrects the template variable which populates the maxlenth
attribute on text fields in the add/edit item form.
To test, apply the patch and go Administratoin -> MARC bibliographic
frameworks -> (framework) -> Tag 952 -> Edit subfields.
- Click the "p" tab and set the "Max length" field to "20"
- Save the framework and go to Cataloging.
- Locate a bibliographic record that uses the framework you edited.
- Add or edit an item on that bibliographic record.
- Check the "Barcode" field. The input tag should limit your entry to 20
characters.
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7eae54f82)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
f6e0424add
commit
d044ba1899
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
[% SET mv = subfield.marc_value %]
|
||||
[% IF ( mv.type == 'hidden' ) %]
|
||||
<input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
<input type="hidden" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- subfield.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
[% ELSIF ( mv.type == 'select' ) %]
|
||||
[% SET select_readonly = '' %]
|
||||
[% SET select_disabled = '' %]
|
||||
|
|
@ -152,12 +152,12 @@
|
|||
id="[%- mv.id | html -%]"
|
||||
name="[% kohafield | html %]"
|
||||
class="input_marceditor [% kohafield | html %]"
|
||||
maxlength="[%- mv.maxlength | html -%]"
|
||||
maxlength="[%- subfield.maxlength | html -%]"
|
||||
value="[%- mv.value | html -%]"
|
||||
readonly="readonly"
|
||||
/>
|
||||
[% ELSE %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- subfield.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
[% SET dopop = "Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=\"${mv.authtypecode}\"&index=${mv.id}','${mv.id}')" %]
|
||||
<a href="#" class="buttonDot tag_editor" onclick="[%- dopop | html -%]; return false;" title="Tag editor">...</a>
|
||||
[% END %]
|
||||
|
|
@ -168,7 +168,7 @@
|
|||
id="[%- mv.id | html -%]"
|
||||
name="[% kohafield | html %]"
|
||||
class="input_marceditor [% kohafield | html %]"
|
||||
maxlength="[%- mv.maxlength | html -%]"
|
||||
maxlength="[%- subfield.maxlength | html -%]"
|
||||
value="[%- mv.value | html -%]"
|
||||
readonly="readonly"
|
||||
/>
|
||||
|
|
@ -178,7 +178,7 @@
|
|||
id="[%- mv.id | html -%]"
|
||||
name="[% kohafield | html %]"
|
||||
class="input_marceditor framework_plugin [% kohafield | html %]"
|
||||
maxlength="[%- mv.maxlength | html -%]"
|
||||
maxlength="[%- subfield.maxlength | html -%]"
|
||||
value="[%- mv.value | html -%]"
|
||||
data-plugin="[% mv.plugin | html %]"
|
||||
/>
|
||||
|
|
@ -199,12 +199,12 @@
|
|||
id="[%- mv.id | html -%]"
|
||||
name="[% kohafield | html %]"
|
||||
class="input_marceditor [% kohafield | html %]"
|
||||
maxlength="[%- mv.maxlength | html -%]"
|
||||
maxlength="[%- subfield.maxlength | html -%]"
|
||||
value="[%- mv.value | html -%]"
|
||||
readonly="readonly"
|
||||
/>
|
||||
[% ELSE %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- subfield.maxlength | html -%]" value="[%- mv.value | html -%]" />
|
||||
[% END %]
|
||||
[% ELSIF ( mv.type == 'textarea' ) %]
|
||||
[% IF mv.readonly %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue