Bug 24959: Fix id/label pairs in saved reports table

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>
This commit is contained in:
Owen Leonard 2020-03-23 20:10:15 +00:00 committed by Martin Renvoize
parent e87908078f
commit 066ff4e787
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 2 additions and 2 deletions

View File

@ -249,12 +249,12 @@
[% 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 ) %]