Bugzilla – Attachment 169775 Details for
Bug 35239
Missing form field ids in batch patron modification template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35239: (follow-up) Correct more missing label inconsistencies
Bug-35239-follow-up-Correct-more-missing-label-inc.patch (text/plain), 4.16 KB, created by
Owen Leonard
on 2024-07-26 18:52:54 UTC
(
hide
)
Description:
Bug 35239: (follow-up) Correct more missing label inconsistencies
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-07-26 18:52:54 UTC
Size:
4.16 KB
patch
obsolete
>From 07acb8c0b366781a2eeeb2dd6cf02eefddac8a9c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 26 Jul 2024 18:17:11 +0000 >Subject: [PATCH] Bug 35239: (follow-up) Correct more missing label > inconsistencies > >This patch corrects a couple more labels and modifies the process of >cloning a patron attribute field so that each new cloned row has >matching label and input. > >To test, apply the patch and, if necessary, create some patron attribute >types: > >- Go to Administration -> Patron attribute types >- Create at least two new patron attribute types. >- Go to Tools -> Batch patron modification. >- Submit a batch of patrons for batch modification >- In the list of fields to modify, test that clicking each label gives > focus to the corresponding field (except date fields, we need to fix > that globally). >- Click "New" next to the patron attribute field. > - A copy of the field should be created. Test that the new field also > has matching label and <select> > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/modules/tools/modborrowers.tt | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index a1058b1c2c..d2a87267d2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -370,7 +370,7 @@ > [% END %] > [% IF ( field.type == 'select' ) %] > [% IF field.option.size %] >- <select name="[% field.name | html %]" > >+ <select id="[%field.name | html %]" name="[% field.name | html %]" > > [% FOREACH opt IN field.option %] > <option value="[% opt.value | html %]">[% opt.lib | html %]</option> > [% END %] >@@ -393,10 +393,10 @@ > [% END %] > [% IF ( patron_attributes_codes ) %] > <li class="attributes"> >- <label style="width:auto;"> >+ <label for="patron_attributes" style="width:auto;"> > <span>Patron attribute:</span> > </label> >- <select name="patron_attributes"> >+ <select id="patron_attributes" name="patron_attributes"> > <option value=""></option> > [% FOREACH pac IN patron_attributes_codes %] > <option value="[% pac.attribute_code | html %]" data-type="[% pac.type | html %]" data-category="[% pac.category_lib | html %]">[% pac.attribute_lib | html %]</option> >@@ -571,12 +571,16 @@ > } > > function add_attributes() { >+ var count = $("li.attributes").length; > var li_node = $("li.attributes:last"); > var li_clone = $(li_node).clone(); > if ( $(li_clone).find("a.del_attributes").length == 0 ) { > var add_attributes = $(li_clone).find("a.add_attributes") > $(add_attributes).after('<a href="#" title="' + _("Delete") + '" class="del_attributes"><i class="fa fa-fw fa-trash-can"></i> ' + _("Delete") + '</a>'); > } >+ li_node.find("label").attr("for", li_node.find("label").attr("for") + "_" + count ); >+ li_node.find("input, select").attr("id", li_node.find("select").attr("id") + "_" + count ); >+ > $(li_clone).find('select[name="patron_attributes"]').change(function() { > updateAttrValues(this); > } ); >-- >2.39.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 35239
:
169627
|
169774
|
169775
|
169797
|
169798