Bugzilla – Attachment 170442 Details for
Bug 36907
OAI set mapping form field maxlength should match table column sizes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36907: Add maxlength to OAI set mapping form fields
Bug-36907-Add-maxlength-to-OAI-set-mapping-form-fi.patch (text/plain), 3.85 KB, created by
Marcel de Rooy
on 2024-08-16 09:01:18 UTC
(
hide
)
Description:
Bug 36907: Add maxlength to OAI set mapping form fields
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-08-16 09:01:18 UTC
Size:
3.85 KB
patch
obsolete
>From c4dcb408fc5c05468d1b9ca33ea3966c229c9d6b Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 21 May 2024 15:09:59 +0000 >Subject: [PATCH] Bug 36907: Add maxlength to OAI set mapping form fields >Content-Type: text/plain; charset=utf-8 > >This patch adds a maxlength attribute to the field, subfield, and value >fields in the OAI set mapping form. This helps prevent an error when the >form data is too long for the database columns. > >Unrelated: The patch also adds quotes around two unquoted name >attributes. > >To test, apply the patch and go to Administration -> OAI sets. > >- If necessary, create a new set. >- Click Actions -> Define mappings. >- Test that each form field is limited correctly: > Field: 3 > Subfield: 1 > Value: 80 >- Test that the form can be submitted successfully with the maximum > number of characters in each field. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/admin/oai_set_mappings.tt | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >index 67ac3c0ff9..66df9095e4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_set_mappings.tt >@@ -81,9 +81,9 @@ > [% END %] > </select> > </td> >- <td><input type="text" name="marcfield" size="3" value="[% mapping.marcfield | html %]" /></td> >- <td><input type="text" name="marcsubfield" size="1" value="[% mapping.marcsubfield | html %]" /></td> >- <td><select name=operator> >+ <td><input type="text" name="marcfield" size="3" maxlength="3" value="[% mapping.marcfield | html %]" /></td> >+ <td><input type="text" name="marcsubfield" size="1" maxlength="1" value="[% mapping.marcsubfield | html %]" /></td> >+ <td><select name="operator"> > [% IF mapping.operator == 'equal' %] > <option value="equal" selected="selected">is equal to</option> > <option value="notequal">not equal to</option> >@@ -92,7 +92,7 @@ > <option value="notequal" selected="selected">not equal to</option> > [% END %] > </select></td> >- <td><input type="text" name="marcvalue" value="[% mapping.marcvalue | html %]" /></td> >+ <td><input type="text" name="marcvalue" maxlength="80" value="[% mapping.marcvalue | html %]" /></td> > <td> > [% IF ( loop.last ) %] > <button type="button" id="new_rule_button" class="btn btn-default btn-xs" title="Add another condition"><i class="fa fa-plus"></i> Add</button> >@@ -119,7 +119,7 @@ > </td> > <td><input type="text" name="marcfield" size="3" /></td> > <td><input type="text" name="marcsubfield" size="1" /></td> >- <td><select name=operator> >+ <td><select name="operator"> > <option value="equal">is equal to</option> > <option value="notequal">not equal to</option> > </select></td> >-- >2.30.2
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 36907
:
166984
|
167062
| 170442