-
-
Notifications
You must be signed in to change notification settings - Fork 232
/
form_report.html
94 lines (73 loc) · 3.69 KB
/
form_report.html
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
86
87
88
89
90
91
92
93
94
[% SET form_show_category_only = NOT category || field_errors.category || disable_form_message || have_disable_qn_to_answer %]
[% TRY %][% PROCESS 'report/new/_form_labels.html' %][% CATCH file %][% END %]
<!-- report/new/form_report.html -->
[% INCLUDE 'report/new/form_after_heading.html' %]
[% IF field_errors.bodies %]
<p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
[% PROCESS 'report/new/form_public_councils_text.html' %]
[% IF public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% PROCESS "report/new/category_wrapper.html" %]
[% TRY %][% PROCESS 'report/new/after_category.html' %][% CATCH file %][% END %]
[% IF form_show_category_only %]
<div class="hidden-js">
<input class="btn btn--primary btn--block btn--final" type="submit" name="submit_category_part_only" value="[% loc('Submit') %]">
</div>
[% SET field_required = '' %]
[% ELSE %]
[% SET field_required = ' required' %]
[% END %]
<div class="js-hide-if-invalid-category[% ' hidden-nojs' IF form_show_category_only %]">
[% UNLESS public_councils_text_at_top %]
[% INCLUDE public_councils_text %]
[% END %]
[% INCLUDE 'report/new/form_title.html' %]
[% TRY %][% PROCESS 'report/new/after_title.html' %][% CATCH file %][% END %]
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
</label>
[% IF field_errors.photo %]
<p class='form-error'>[% field_errors.photo %]</p>
[% END %]
<div id="form_photos">
[% IF upload_fileid %]
<p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p>
[% FOREACH id IN upload_fileid.split(',') %]
<img align="right" src="/photo/temp.[% id %]" alt="">
[% END %]
[% END %]
<input type="file" name="photo1" id="form_photo">
<label for="form_photo2">[% loc('Photo') %]</label>
<input type="file" name="photo2" id="form_photo2">
<label for="form_photo3">[% loc('Photo') %]</label>
<input type="file" name="photo3" id="form_photo3">
</div>
[% END %]
[% TRY %][% PROCESS 'report/new/after_photo.html' %][% CATCH file %][% END %]
[% DEFAULT form_detail_label = loc('Explain what’s wrong') %]
<label for="form_detail">[% form_detail_label %]</label>
[%# You can prevent a hint being printed by setting form_detail_placeholder to a Falsey value %]
[% IF NOT form_detail_placeholder.defined %]
[% SET form_detail_placeholder = loc('e.g. ‘This pothole has been here for two months and…’') %]
[% END %]
[% IF form_detail_placeholder %]
<p class="form-hint" id="detail-hint">[% form_detail_placeholder %]</p>
[% END %]
[% IF field_errors.detail %]
<p class='form-error'>[% field_errors.detail %]</p>
[% END %]
<textarea class="form-control" rows="7" cols="26" name="detail" id="form_detail" [% IF form_detail_placeholder %]aria-describedby="detail-hint"[% END %][% field_required %]>[% report.detail | html %]</textarea>
[% TRY %][% PROCESS 'report/new/inline-tips.html' %][% CATCH file %][% END %]
[% IF partial_token %]
<input type="hidden" name="partial" value="[% partial_token.token %]">
[% END %]
<input type="hidden" id="single_body_only" name="single_body_only" value="">
<input type="hidden" id="do_not_send" name="do_not_send" value="">
<input type="hidden" name="submit_problem" value="1">
<input type="hidden" id="form_service" name="service" value="">
</div>
<!-- /report/new/form_report.html -->