blob: 1a156773d57523409b4593ccf8cd391291e36f51 (
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
|
[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%]
[% PROCESS 'admin/report_blocks.html' %]
[% IF updated %]
<p>
<em>[% updated %]</em>
</p>
[% END %]
[% IF admin_type == 'super' AND body.parent AND NOT body.parent.parent # A division %]
[% IF NOT errors %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('Category') %]</th>
<th>[% loc('Email') %]</th>
<th>[% loc('Last editor') %]</th>
<th>[% loc('Note') %]</th>
<th>[% loc('When edited') %]</th>
</tr>
[% WHILE ( cat = contacts.next ) %]
<tr[% IF cat.deleted %] class="is-deleted"[% END %]>
<td><a href="[% c.uri_for( 'body', body_id, cat.category ) %]">[% cat.category %]</a></td>
<td>[% cat.email | html %]</td>
<td>[% cat.editor %]</td>
<td>[% cat.note | html %]</td>
<td>[% PROCESS format_date this_date=cat.whenedited %]</td>
</tr>
[% END %]
</table>
<h2>[% loc('Add new category') %]</h2>
[% END %][%# Only show all the above if no errors with below form %]
[% IF errors %]
<div class="fms-admin-warning">
[% errors.values.join('<br>') %]
</div>
[% END %]
<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><input type="text" name="category" size="30" value="[% contact.category | html %]">
</p>
<p>
<strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30" value="[% contact.email | html %]">
</p>
<input type="hidden" name="confirmed" value="1" id="confirmed">
<p>
<strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea>
</p>
<p>
<input type="hidden" name="posted" value="new" >
<input type="hidden" name="token" value="[% csrf_token %]" >
<input type="submit" name="Create category" value="[% errors ? loc('Save changes') : loc('Create category') %]">
</p>
<div>
<input type="hidden" name=".cgifields" value="confirmed" >
<input type="hidden" name=".cgifields" value="deleted" >
</div>
</form>
[% END %]
[% IF NOT errors %]
<h2>[% loc('Edit body details') %]</h2>
[% INCLUDE 'admin/body-form.html' %]
[% END %]
[% INCLUDE 'admin/footer.html' %]
|