blob: 771942b16e8c3fda7e6385cf03636ce606f4bebc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
[% permissions = c.user.permissions(problem) %]
[% second_column = BLOCK -%]
<div id="side-inspect">
<h2 class="inspect-form-heading">[% loc('Inspect report') %]</h2>
[% INCLUDE 'errors.html' %]
<form name="report_inspect_form" id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id ) %]" class="validate">
[% INCLUDE 'report/inspect/information.html' %]
[% IF permissions.report_edit_category OR permissions.report_inspect %]
<div class="inspect-section">
<p>
<label for="category">[% loc('Category') %]</label>
[% INCLUDE 'admin/report-category.html' %]
</p>
[% FOREACH category IN category_options %]
[% cat_name = category.category;
cat_prefix = cat_name | lower | replace('[^a-z]', '');
cat_prefix = "category_" _ cat_prefix _ "_" %]
<p data-category="[% cat_name | html %]"
[%~ IF cat_name != problem.category %] class="hidden"[% END %]
data-priorities='[% priorities_by_category.$cat_name | html %]'
data-templates='[% templates_by_category.$cat_name | html %]'>
[% INCLUDE 'report/new/category_extras_fields.html' metas=category_extras.$cat_name hide_notices=1 show_hidden=1 %]
</p>
[% END %]
[% IF permissions.report_inspect %]
<p>
<label for="state">[% loc('State') %]</label>
[% INCLUDE 'report/inspect/state_groups_select.html' %]
</p>
<div id="js-duplicate-reports" class="[% "hidden" UNLESS problem.duplicate_of %]">
<input type="hidden" name="duplicate_of" value="[% problem.duplicate_of.id %]">
<p class="[% "hidden" UNLESS problem.duplicate_of %]"><strong>[% loc('Duplicate of') %]</strong></p>
<p class="[% "hidden" IF problem.duplicate_of %]">[% loc('Which report is it a duplicate of?') %]</p>
<ul class="item-list item-list--inspect-duplicates">
[% IF problem.duplicate_of %]
[% INCLUDE 'report/_item_expandable.html' item_extra_class = 'item-list__item--selected' problem = problem.duplicate_of %]
<li class="item-list__item"><a class="btn" href="#" id="js-change-duplicate-report">[% loc('Choose another') %]</a></li>
[% END %]
</ul>
</div>
[% IF problem.duplicates.size %]
<p><strong>[% loc('Duplicates') %]</strong></p>
<ul class="item-list item-list--inspect-duplicates">
[% FOR duplicate IN problem.duplicates %]
[% INCLUDE 'report/_item_expandable.html' problem = duplicate %]
[% END %]
</ul>
[% END %]
[% END %]
</div>
[% END %]
[% IF permissions.report_edit_priority OR permissions.report_inspect %]
<div class="inspect-section">
[% INCLUDE 'report/inspect/extra_details.html' %]
</div>
[% END %]
<div class="inspect-section">
[% IF permissions.report_inspect %]
[% INCLUDE 'report/inspect/public_update.html' %]
[% END %]
<p>
<input type="hidden" name="token" value="[% csrf_token %]" />
[% IF permissions.planned_reports %]
<input type="hidden" name="post_inspect_url" value="[% post_inspect_url | html %]" />
[% END %]
<input class="btn btn-primary" type="submit" value="[% loc('Save changes') %]" data-value-original="[% loc('Save changes') %]" data-value-duplicate="[% loc('Save + close as duplicate') %]" name="save" />
</p>
</div>
<input type="hidden" name="js" value="">
</form>
</div>
[%- END %]
|