diff options
-rw-r--r-- | t/app/controller/admin/report_edit.t | 20 | ||||
-rw-r--r-- | templates/web/base/admin/reports/edit.html | 15 |
2 files changed, 30 insertions, 5 deletions
diff --git a/t/app/controller/admin/report_edit.t b/t/app/controller/admin/report_edit.t index 01f091412..f8101ab76 100644 --- a/t/app/controller/admin/report_edit.t +++ b/t/app/controller/admin/report_edit.t @@ -686,16 +686,28 @@ subtest "Test display of fields extra data" => sub { $mech->get_ok("/admin/report_edit/$report_id"); $mech->content_contains('Extra data: No'); - $report->push_extra_fields( { - name => 'report_url', - value => 'http://example.com', - }); + $report->push_extra_fields( + { + name => 'report_url', + value => 'http://example.com', + }, + { + name => 'sent_to', + value => [ 'onerecipient@example.org' ], + }, + { + name => 'sent_too', + value => [ 'onemorerecipient@example.org', 'another@example.org' ], + }, + ); $report->update; $report->discard_changes; $mech->get_ok("/admin/report_edit/$report_id"); $mech->content_contains('report_url</strong>: http://example.com'); + $mech->content_contains('sent_to</strong>: onerecipient@example.org'); + $mech->content_contains('sent_too</strong>: onemorerecipient@example.org, another@example.org'); $report->set_extra_fields( { description => 'Report URL', diff --git a/templates/web/base/admin/reports/edit.html b/templates/web/base/admin/reports/edit.html index d2b866d01..6e7cff4cf 100644 --- a/templates/web/base/admin/reports/edit.html +++ b/templates/web/base/admin/reports/edit.html @@ -131,7 +131,20 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a> <li><label class="inline-text" for="category">[% loc('Category:') %]</label> [% INCLUDE 'admin/report-category.html' %] </li> -<li>[% loc('Extra data:') %] [% IF extra_fields.size %]<ul>[% FOREACH field IN extra_fields %]<li><strong>[% field.name %]</strong>: [% field.val %]</li>[% END %]</ul>[% ELSE %]No[% END %]</li> +<li>[% loc('Extra data:') ~%] + [%~ IF extra_fields.size ~%] + <ul> + [%~ FOREACH field IN extra_fields ~%] + <li><strong>[%~ field.name ~%]</strong>: [% IF field.val.0.defined ~%] + [%~ field.val.list.join(", ") ~%] + [%~ ELSE ~%] + [%~ field.val ~%] + [%~ END ~%] + </li> + [%~ END ~%] + </ul> + [%~ ELSE %] No[% END ~%] +</li> <li><label class="inline-text" for="anonymous">[% loc('Anonymous:') %]</label> <select class="form-control" name="anonymous" id="anonymous"> <option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option> |