Bug 24959: Fix id/label pairs in saved reports table
authorOwen Leonard <oleonard@myacpl.org>
Mon, 23 Mar 2020 20:10:15 +0000 (20:10 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 26 Mar 2020 11:38:51 +0000 (11:38 +0000)
This patch adds a unique id attribute to each checkbox in the table of
saved reports. Also updated is the corresponding <label>'s "for"
attribute so that clicking the report id will toggle the checkbox.

To reproduce, go to Reports -> Use saved and click a number in the ID
column. Nothing happens.

After applying the patch clicking the number should check or uncheck the
corresponding checkbox.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works Ok, no errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt

index fee6ecc..a73aad9 100644 (file)
                                                 [% UNLESS ( loop.odd ) %]<tr class="odd">[% ELSE %]<tr>[% END %]
                                                     <td class="report_checkbox">
                                                         [% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS -->
-                                                            <input type="checkbox" name="ids" value="[% savedreport.id | html %]" />
+                                                            <input type="checkbox" name="ids" id="ids[% savedreport.id | html %]" value="[% savedreport.id | html %]" />
                                                         [% END %]
                                                         <input type="hidden" class="report_sql" value="[% savedreport.savedsql |html %]">
                                                     </td>
                                                     <td class="report_id">
-                                                        <label for="ids">[% savedreport.id | html %]</label>
+                                                        <label for="ids[% savedreport.id | html %]">[% savedreport.id | html %]</label>
                                                     </td>
                                                     <td class="report_name">
                                                         [% IF ( savedreport.report_name ) %]