blob: be855cb956bcf5e7b026f783c3271a8136cde9be (
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
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
|
[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%]
[% conf = open311.next %]
[% IF updated %]
<p>
<em>[% updated %]</em>
</p>
[% END %]
<p>
[% IF example_pc %]
<a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> |
[% END %]
[% IF c.cobrand.moniker == 'emptyhomes' %]
<a href="[% c.uri_for( 'search_reports', search => 'area:' _ area_id ) %]">[% loc('List all reported problems' ) %]</a>
[% ELSE %]
<a href="[% c.uri_for_email( '/reports/' _ area_id ) %]">[% loc('List all reported problems' ) %]</a>
[% END %]
<a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a>
</p>
[% IF open311.count > 0 %]
<h2>
Council contacts configured via Open311
</h2>
[% END %]
[% IF c.cobrand.moniker == 'fixmystreet' %]
<p class="error">Do not give these out except to people at the council.</p>
[% END %]
<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('Category') %]</th>
<th>[% loc('Email') %]</th>
<th>[% loc('Confirmed') %]</th>
<th>[% loc('Deleted') %]</th>
<th>[% loc('Devolved') %]</th>
<th>[% loc('Last editor') %]</th>
<th>[% loc('Note') %]</th>
<th>[% loc('Public') %]</th>
<th>[% loc('When edited') %]</th>
<th>[% loc('Confirm') %]</th>
</tr>
[% WHILE ( contact = contacts.next ) %]
<tr>
<td><a href="[% c.uri_for( 'council_edit', area_id, contact.category ) %]">[% contact.category %]</a></td>
<td>[% contact.email | html %]</td>
<td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
<td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
<td>[% IF conf.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
<td>[% contact.editor %]</td>
<td>[% contact.note | html %]</td>
<td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td>
<td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td>
<td><input type="checkbox" name="confirmed" value="[% contact.category %]"></td>
</tr>
[% END %]
</table>
<p>
<input type="hidden" name="area_id" value="[% area_id %]">
<input type="hidden" name="posted" value="update">
<input type="hidden" name="token" value="[% token %]">
<input type="submit" name="Update statuses" value="[% loc('Update statuses') %]">
</p>
</form>
<h2>[% loc('Add new category') %]</h2>
<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
[% IF c.cobrand.moniker != 'emptyhomes' %]
<p>
<strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30">
</p>
[% END %]
<p>
<strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30">
</p>
<p>
<input type="checkbox" name="confirmed" value="1" id="confirmed">
<label for="confirmed" class="inline">[% loc('Confirmed') %]</label>
<input type="checkbox" name="deleted" value="1" id="deleted">
<label for="deleted" class="inline">[% loc('Deleted') %]</label>
</p>
<p>
<strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea>
</p>
<p>
<input type="checkbox" name="non_public" value="1" id="non_public">
<label for="non_public" class="inline">[% loc('Private') %]</label>
</p>
<p>
<input type="hidden" name="area_id" value="[% area_id %]" >
<input type="hidden" name="posted" value="new" >
<input type="hidden" name="token" value="[% token %]" >
<input type="submit" name="Create category" value="[% loc('Create category') %]" >
</p>
<div>
<input type="hidden" name=".cgifields" value="confirmed" >
<input type="hidden" name=".cgifields" value="deleted" >
</div>
</form>
<h2>[% loc('Configure Open311 integration') %]</h2>
<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p>
<label for="endpoint">Endpoint</label>
<input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50">
</p>
<p>
<label for="jurisdiction">Jurisdiction</label>
<input type="text" name="jurisdiction" id="jurisdiction" value="[% conf.jurisdiction %]" size="50">
</p>
<p>
<label for="api_key">Api Key</label>
<input type="text" name="api_key" id="api_key" value="[% conf.api_key %]" size="25">
</p>
<p>
<label for="send_method">Send Method</label>
<select name="send_method">
<option value=""> -- Select a method -- </option>
[% FOR method IN send_methods %]
<option value="[% method %]"[% ' selected' IF conf.send_method == method %]>[% method %]</option>
[% END %]
</select>
</p>
<p>
<input type="checkbox" name="send_comments"[% ' checked' IF conf.send_comments %]>
<label for="send_comments" class="inline">Use Open311 comment sending extension</label>
</p>
<p>
<label for"comment_user_id">User to attribute fetched comments to</label>
<input type="text" name="comment_user_id" value="[% conf.comment_user_id %]">
</p>
<p>
<input type="checkbox" name="suppress_alerts"[% ' checked' IF conf.suppress_alerts %]>
<label for="suppress_alerts" class="inline">Do not send email alerts on fetched comments to problem creator</label>
</p>
<p>
<input type="checkbox" name="devolved"[% ' checked' IF conf.can_be_devolved %]>
<label for="devolved" class="inline">Endpoint lookup can be devolved to contacts</label>
</p>
<p>
<input type="hidden" name="open311_id" value="[% conf.id %]">
<input type="hidden" name="area_id" value="[% area_id %]">
<input type="hidden" name="posted" value="open311">
<input type="hidden" name="token" value="[% token %]">
<input type="submit" name="Configure Open311" value="[% loc('Configure Open311') %]">
</p>
</form>
[% INCLUDE 'admin/footer.html' %]
|