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
|
[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%]
[% PROCESS 'admin/report_blocks.html' %]
[% status_message %]
<form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<input type="hidden" name="token" value="[% token %]" >
<input type="hidden" name="submit" value="1" >
<ul>
[%- cobrand_data = problem.cobrand_data;
cobrand_data = c.data_for_generic_problem IF !problem.cobrand;
IF cobrand_data;
uri = c.uri_for_email( '/report', problem.id, cobrand_data );
ELSE;
uri = c.uri_for_email( '/report', problem.id );
END;
%]
<li><a href="[% uri %]" class="admin-offsite-link">[% loc('View report on site' )%]</a></li>
<li><label for='title'>[% loc('Subject:') %]</label> <input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></li>
<li><label for='detail'>[% loc('Details:') %]</label>
<textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li>
<li>[% loc('Co-ordinates:') %]
<a href="[% c.config.MAPIT_URL %][%
'/' UNLESS c.config.MAPIT_URL.search('/$')
%]point/4326/[% problem.longitude %],[% problem.latitude %].html"
class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
( [%
SET postcode_safe = problem.postcode | html;
tprintf( loc('originally entered: “%s”'), postcode_safe )
%],
[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Body:') %]
[% IF problem.bodies_str %]
[% FOREACH body IN problem.bodies.values %]
<a href="[% c.uri_for('body', body.id) %]">[% body.name | html %]</a>
[%- ',' IF NOT loop.last %]
[% END %]
[% ELSE %]
<em>[% loc('None' ) %]</em>
[% END %]
([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li>
[% IF problem.extra.address %]
<li>[% loc('Property address:') %] [% problem.extra.address | html %]</li>
[% END %]
<li><label class="inline" for="state">[% loc('State:') %]</label> <select name="state" id="state">
[% FOREACH group IN [
[ loc('Open'), [
[ 'confirmed', loc('Open') ], [ 'investigating', loc('Investigating') ],
[ 'planned', loc('Planned') ], [ 'in progress', loc('In progress') ],
[ 'action scheduled', loc('Action Scheduled') ],
] ],
[ loc('Fixed'), [
[ 'fixed', loc('Fixed') ], [ 'fixed - user', loc('Fixed - User') ],
[ 'fixed - council', loc('Fixed - Council') ]
] ],
[ loc('Closed'), [
[ 'unable to fix', loc('Unable to fix') ], [ 'not responsible', loc('Not Responsible') ],
[ 'duplicate', loc('Duplicate') ], [ 'closed', loc('Closed') ],
[ 'internal referral', loc('Internal referral') ],
] ],
[ loc('Hidden'), [
[ 'hidden', loc('Hidden') ], [ 'partial', loc('Partial') ], [ 'unconfirmed',loc('Unconfirmed') ]
] ]
] %]
<optgroup label="[% group.0 %]">
[% FOREACH state IN group.1 %]
<option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
[% END %]
</optgroup>
[% END %]
</select></li>
<li>[% loc('Category:') %] [% problem.category | html %] </li>
<li><label class="inline" for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous">
<option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option>
<option [% 'selected ' IF !problem.anonymous %]value="0">[% loc('No') %]</option>
</select></li>
<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% problem.name | html %]'></li>
<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% problem.user.email | html %]'> [% PROCESS abuse_button %] [% PROCESS flag_button user=problem.user %]</li>
<li>[% loc('Phone:') %] [% problem.user.phone | html %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=problem.created %]</li>
<li>[% loc('Confirmed:') %] [% PROCESS format_time time=problem.confirmed no_time='-' %]</li>
<li>[% loc('Sent:') %] [% PROCESS format_time time=problem.whensent %]
[% IF problem.state == 'confirmed' AND problem.whensent %]<input onclick="return confirm('[% loc('You really want to resend?') %]')" type="submit" name="resend" value="[% loc('Resend report') %]">[% END %]
[% IF NOT problem.whensent %]<input type="submit" name="mark_sent" value="[% loc('Mark as sent') %]">[% END %]
</li>
<li>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %]</li>
<li>[% loc('Service:') %] [% problem.service %]</li>
<li>[% loc('Cobrand:') %] [% problem.cobrand %]</li>
<li>[% loc('Cobrand data:') %] [% problem.cobrand_data %]</li>
<li>[% loc('Extra data:') %] [% problem.extra ? 'Yes' : 'No' %]</li>
<li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li>
<li><label class="inline" for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" name="flagged"[% ' checked' IF problem.flagged %]></li>
<li><label class="inline" for="non_public">[% loc('Private') %]:</label> <input type="checkbox" name="non_public"[% ' checked' IF problem.non_public %]></li>
[% IF problem.photo %]
[% photo = problem.get_photo_params %]
<li><img alt="Photo of this report" height="[% photo.height %]" width="[% photo.width %]" src="[% c.cobrand.base_url %]
[%~ IF problem.photo.length == 40 ~%]
/photo/[% problem.photo %].temp.jpeg
[%~ ELSE ~%]
[% photo.url %]
[%~ END %]">
<br>
<input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]">
<input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]">
<br>
<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
<label class="inline" for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li>
[% END %]
</ul>
<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
[% INCLUDE 'admin/list_updates.html' %]
[% INCLUDE 'admin/footer.html' %]
|