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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
[% IF allow_creation %]
<script>
$(function () {
$('#update_form_content').hide();
$('#display_update').show();
$('#display_update').click( function () {
$('#update_form_content').show();
$('#display_update').hide();
$('#create_new').hide();
$('#form_update').focus();
});
});
</script>
<div id="create_new">
<h2> Create a <strong>new</strong> report near this location </h2>
<p>
If you've discovered a new, or recurring problem (even if it's similar to the one in this
report) then :
</p>
<form method="post" action="/report/new">
<input type="hidden" name="latitude" value="[% problem.latitude %]">
<input type="hidden" name="longitude" value="[% problem.longitude %]">
<input type="submit" class="green-btn" value="CREATE A NEW PROBLEM NEARBY">
</form>
<p><strong>OR...</strong></p>
</div>
<div id="update_form">
<h2> Discuss <strong>this</strong> report </h2>
<p>
This allows you to comment on this report, and discuss with local residents.
</p>
<input type="button" id="display_update" class="green-btn" value="Comment on this report"
style="display:none">
<div id="update_form_content">
<h2>[% loc( 'Provide an update') %]</h2>
[% IF c.cobrand.moniker != 'stevenage' %]
<div class="general-notes">
[% INCLUDE 'report/updates-sidebar-notes.html' %]
</div>
[% END %]
[% INCLUDE 'errors.html' %]
<form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
<fieldset>
<input type="hidden" name="submit_update" value="1">
<input type="hidden" name="id" value="[% problem.id | html %]">
[% IF c.cobrand.allow_photo_upload %]
<input type="hidden" name="upload_fileid" value="[% upload_fileid %]">
<label for="form_photo">[% loc('Photo') %]</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 update. Note that you can attach a maximum of 3 to this update (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 %]
<label for="form_update">[% loc( 'Update:' ) %]
<span class="label-warning public-warning">
[% loc('public') %]
</span>
</label>
[% IF field_errors.update %]
<div class='form-error'>[% field_errors.update %]</div>
[% END %]
<textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea>
[% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %]
<label for="form_state">[% loc( 'State' ) %]</label>
<select name="state" id="form_state">
[% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating',
loc('Investigating')], ['action scheduled', loc('Action Scheduled')],
['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')],
['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')],
['fixed', loc('Fixed')] ] %]
<option [% 'selected ' IF state.0 == problem.state_display %] value="[% state.0 %]">[% state.1 %]</option>
[% END %]
</select>
[% ELSE %]
[% IF problem.is_fixed AND ((c.user_exists AND c.user.id == problem.user_id) OR alert_to_reporter) %]
<input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]>
<label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label>
[% ELSIF !problem.is_fixed %]
<div class="checkbox-group">
<input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]>
<label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label>
</div>
[% END %]
[% END %]
[% IF c.user_exists %]
[% INCLUDE name %]
<input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]">
[% ELSE %]
<label for="form_rznvy">[% loc('Your email' ) %]
<span class="muted">([% loc('We never show your email') %])</span>
</label>
[% IF field_errors.email %]
<p class='form-error'>[% field_errors.email %]</p>
[% END %]
<input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required>
<div id="form_sign_in">
<h3>[% loc("Now to submit your update…") %]</h3>
<h2>[% loc("Do you have a FixMyStreet password?") %]</h2>
<div id="form_sign_in_yes" class="form-box">
<h5>[% loc('<strong>Yes</strong> I have a password') %]</h5>
<label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label>
[% IF field_errors.password %]
<p class='form-error'>[% field_errors.password %]</p>
[% END %]
<div class="form-txt-submit-box">
<input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]">
<input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]">
</div>
<div class="checkbox-group">
<input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]>
<label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label>
</div>
<div class="general-notes">
<p><strong>[% loc('Forgotten your password?') %]</strong>
[% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p>
</div>
</div>
<div id="form_sign_in_no" class="form-box">
<h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5>
[% INCLUDE name %]
<label for="password_register">[% loc('Password (optional)') %]</label>
<div class="general-notes">
<p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p>
</div>
<div class="form-txt-submit-box">
<input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]">
<input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]">
</div>
</div>
</div>
[% END %]
</fieldset>
</form>
</div> <!-- update_form_content -->
</div>
[% END %]
[% BLOCK name %]
[% INCLUDE 'report/new/extra_name.html' %]
[% name_public = update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]
<label for="form_name">[% loc('Name') %]
<span id="name-public-warning" class="label-warning public-warning name-warning">
[% loc('public') %]
</span>
</label>
[% IF field_errors.name %]
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
<input type="text" [% IF problem.bodies_str == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
<div class="checkbox-group">
<input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF name_public %]>
<label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label>
</div>
<div class="checkbox-group">
<input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]>
<label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label>
</div>
[% END %]
|