blob: 1eeff9ab51bfaad4eb4bc7467509b5bb40f0172a (
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
|
[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%]
[% BLOCK highlightchanged_yesno %]
[%- output = loc('No') %]
[%- IF new.$value %][% output = loc('Yes') %][% END %]
[%- IF old && old.$value != new.$value %]<strong>[% output %]</strong>[% ELSE %][% output %][% END %]
[%- END %]
[% BLOCK highlightchanged %]
[%- IF old && old.$value != new.$value %]<strong>[% new.$value %]</strong>[% ELSE %][% new.$value %][% END %]
[%- END %]
<p>
<em>[% updated %]</em>
</p>
<p>
[% IF example_pc %]
<a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a>
[% END %]
</p>
<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
<p><strong>[% loc('Category:') %] </strong>[% contact.category | html %]
<input type="hidden" name="category" value="[% contact.category | html %]" >
<input type="hidden" name="token" value="[% token %]" >
<p><strong>[% loc('Email:') %] </strong>
<input type="text" name="email" value="[% contact.email | html %]" size="30">
<p>
[% IF c.cobrand.moniker != 'zurich' %]
<input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed %]>
<label class="inline" for="confirmed">[% loc('Confirmed' ) %]</label>
[% ELSE %]
<input type="hidden" name="confirmed" value="1">
[% END %]
<input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]>
<label class="inline" for="deleted">[% loc('Deleted') %]</label>
[% IF c.cobrand.moniker != 'zurich' %]
<input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]>
<label class="inline" for="non_public">[% loc('Private') %]</label>
[% END %]
</p>
<p><strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea>
[% IF body.can_be_devolved %]
<h2>[% loc('Configure Endpoint') %]</h2>
<form method="post" action="[% c.uri_for('body', body_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="[% contact.endpoint %]" size="50">
</p>
<p>
<label for="jurisdiction">Jurisdiction</label>
<input type="text" name="jurisdiction" id="jurisdiction" value="[% contact.jurisdiction %]" size="50">
</p>
<p>
<label for="api_key">Api Key</label>
<input type="text" name="api_key" id="api_key" value="[% contact.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 contact.send_method == method %]>[% method %]</option>
[% END %]
</select>
</p>
[% END %]
<input type="hidden" name="posted" value="new">
<p><input type="submit" name="Save changes" value="[% loc('Save changes') %]">
</form>
<h2>[% loc('History') %]</h2>
<table border="1">
<tr>
<th>[% loc('When edited') %]</th>
<th>[% loc('Email') %]</th>
<th>[% loc('Confirmed') %]</th>
<th>[% loc('Deleted') %]</th>
<th>[% loc('Editor') %]</th>
<th>[% loc('Note') %]</th>
</tr>
[%- prev = '' %]
[%- WHILE ( contact = history.next ) %]
<tr>
<td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td>
<td>[% PROCESS highlightchanged old=prev new=contact value='email' %]</td>
<td>[% PROCESS highlightchanged_yesno old=prev new=contact value='confirmed' %]</td>
<td>[% PROCESS highlightchanged_yesno old=prev new=contact value='deleted' %]</td>
<td>[% contact.editor %]</td>
<td>[% contact.note | html %]</td>
</tr>
[%- prev = contact %]
[%- END %]
</table>
[% INCLUDE 'admin/footer.html' %]
|