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
|
<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" id="category_edit">
[% IF contact.in_storage %]
<p>
<h1>[% contact.category | html %]</h2>
<input type="hidden" name="category" value="[% contact.category | html %]" >
</p>
[% ELSE %]
<div class="admin-hint">
<p>
[% loc('Choose a <strong>category</strong> name that makes sense to the public (e.g., "Pothole", "Street lighting") but is helpful
to the body too. These will appear in the drop-down menu on the report-a-problem page.') %]
<br>
[% loc("If two or more bodies serve the same location, FixMyStreet combines identical categories into a single entry in
the menu. Make sure you use the same category name in the bodies if you want this to happen.") %]
</p>
</div>
<p>
<strong>[% loc('Category') %] </strong><input type="text" class="form-control" name="category" size="30" value="[% contact.category | html %]" required>
</p>
[% END %]
<div class="admin-hint">
<p>
[% loc("The <strong>email address</strong> is the destination to which reports about this category will be sent.
Other categories for this body may have the same email address.") %]
</p>
[% IF (body.send_method AND body.send_method != 'Email') OR body.can_be_devolved %]
<p>
[% loc("If you're using <strong>a send method that is not email</strong>, enter the service ID (Open311) or equivalent identifier here.") %]
</p>
[% END %]
</div>
<p>
<strong>[% loc('Email address') %] </strong><input type="text" class="form-control" name="email" size="30" value="[% contact.email | html %]" required>
</p>
<div class="admin-hint">
<p>
[% loc("Check <strong>confirmed</strong> to indicate that this contact has been confirmed as correct.
If you are not sure of the origin or validity of the contact, leave this unchecked.") %]
</p>
</div>
<p>
<input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed OR contact.confirmed == "" %]>
<label for="confirmed" class="inline">[% loc('Confirmed') %]</label>
</p>
<div class="admin-hint">
<p>
[% loc("Check <strong>deleted</strong> to remove the category from use.
It will not appear as an available category in the drop-down menu on the report-a-problem page.") %]
</p>
</div>
<p>
<input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]>
<label for="deleted" class="inline">[% loc('Deleted') %]</label>
</p>
<div class="admin-hint">
<p>
[% loc("Check <strong>private</strong> if reports in this category should <strong>never be displayed on the website</strong>.
<br>
Normally, categories are not private.
<br>
This is suitable for issues that you want to allow users to report to the body, but for which there is no public
interest in displaying the report. In the UK, we've used this for services like requesting an extra rubbish bin
at a specific address.") %]
</p>
</div>
<p>
<input type="checkbox" name="non_public" value="1" id="non_public" [% ' checked' IF contact.non_public %]>
<label for="non_public" class="inline">[% loc('Private') %]</label>
</p>
<div class="admin-hint">
<p>
[% loc("Check <strong>inspection required</strong> if reports in this category <strong>must be inspected</strong> before being sent.") %]
</p>
</div>
<p>
<input type="checkbox" name="inspection_required" value="1" id="inspection_required" [% 'checked' IF contact.get_extra_metadata('inspection_required') %]>
<label for="inspection_required" class="inline">[% loc('Inspection required') %]</label>
</p>
<div class="admin-hint [% 'hidden' UNLESS contact.get_extra_metadata('inspection_required') %]">
<p>
[% loc("Reports will automatically be sent without needing to be inspected if the user's <strong>reputation</strong> is at or above this value. Set to <strong>0</strong> if all reports must be inspected regardless.") %]
</p>
</div>
<p [% 'class=hidden' UNLESS contact.get_extra_metadata('inspection_required') %]>
<label>
[% loc('Reputation threshold') %]
<input type="text" class="form-control" name="reputation_threshold" id="reputation_threshold"
value="[% contact.get_extra_metadata('reputation_threshold') | html %]" size="30">
</label>
</p>
[% IF body.can_be_devolved %]
<div class="admin-hint">
<p>
[% loc(
"The <strong>send method</strong> determines how problem reports will be sent to the body.
If you leave this blank, <strong>send method defaults to email</strong>."
) %]
</p>
</div>
<p>
<label for="send_method">Send Method</label>
<select class="form-control" name="send_method" id="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>
[% INCLUDE 'admin/open311-form-fields.html', object = contact%]
[% END %]
<div class="admin-hint">
<p>
[% loc("Use this field to record details that are only displayed in the admin. Input is not shown publicly, and is not sent to the body.") %]
</p>
</div>
<p>
<label>
[% loc('Summarise your changes') %]
<input class="form-control" type="text" name="note" size="30" required>
</label>
</p>
<p>
<input type="hidden" name="posted" value="new" >
<input type="hidden" name="token" value="[% csrf_token %]" >
<input type="submit" class="btn" name="Create category" value="[% contact.in_storage ? loc('Save changes') : loc('Create category') %]" >
</p>
</form>
|