Bugzilla – Attachment 184598 Details for
Bug 40497
Item add form does not respect framework maxlength setting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40497: Item add form does not respect framework maxlength setting
Bug-40497-Item-add-form-does-not-respect-framework.patch (text/plain), 5.51 KB, created by
Owen Leonard
on 2025-07-24 16:25:47 UTC
(
hide
)
Description:
Bug 40497: Item add form does not respect framework maxlength setting
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-07-24 16:25:47 UTC
Size:
5.51 KB
patch
obsolete
>From 49f90722ee7a962dba39c96c77461e1970b3b9ba Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 24 Jul 2025 16:11:24 +0000 >Subject: [PATCH] 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 >--- > .../prog/en/includes/html_helpers.inc | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 214b29cf401..81a5d33da79 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -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 %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40497
: 184598