aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/zurich/admin/index-dm.html2
-rw-r--r--templates/web/zurich/admin/report_edit.html132
2 files changed, 84 insertions, 50 deletions
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
index cf7ebf13d..4f755cb69 100644
--- a/templates/web/zurich/admin/index-dm.html
+++ b/templates/web/zurich/admin/index-dm.html
@@ -12,6 +12,8 @@
}
%]
+[% status_message %]
+
<h2>New reports</h2>
[% INCLUDE list, problems = unconfirmed.all %]
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 85f8b901f..2cf65db82 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -7,26 +7,7 @@
<input type="hidden" name="token" value="[% token %]" >
<input type="hidden" name="submit" value="1" >
-<!--
-[% IF NOT state OR state.0 == 'unconfirmed' %]
-<p>[% loc('Body:') %]
- <select name="body_external">
- [% FOR body IN bodies %]
- [% NEXT IF !body.parent AND !body.bodies %]
- <option value="[% body.id %]"[% IF body.id == problem.bodies_str%] selected[% END %]>[% body.name %]</option>
- [% END %]
- </select>
-
-<p>[% loc('Body:') %]
- <select name="body_external">
- [% FOR body IN bodies %]
- [% NEXT IF body.parent OR body.bodies %]
- <option value="[% body.id %]"[% IF body.id == problem.bodies_str%] selected[% END %]>[% body.name %]</option>
- [% END %]
- </select>
-
-[% END %]
--->
+<div style="float:left; width:48%; margin-right:2%">
<ul>
[%- cobrand_data = problem.cobrand_data %]
@@ -36,37 +17,10 @@
<li><label for='detail'>[% loc('Details:') %]</label>
<textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea></li>
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %]) ([% loc('originally entered') %] &lsquo;[% problem.postcode | html %]&rsquo;, [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
-<li>[% loc('Body:') %]
- <select name="body">
- [% FOR body IN bodies %]
- <option value="[% body.id %]"[% IF body.id == problem.bodies_str%] selected[% END %]>[% body.name %]</option>
- [% END %]
- </select>
- <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]>
- <label for="third_personal" class="inline">Include reporter personal details</label>
-</li>
-<li>[% loc('State:') %] <select name="state" id="state">
- [% FOREACH state IN [
- ['unconfirmed',loc('Submitted')]
- ['confirmed', loc('Open')],
- ['in progress', loc('In progress')],
- ['planned', loc('Planned')],
- ['fixed - council', loc('Closed')],
- ['closed', loc('Closed')],
- ['hidden', loc('Hidden')],
- ] %]
- <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option>
- [% END %]
-</select></li>
-
-<li><label for="internal_notes">[% loc('Internal notes:') %]</label>
-<textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></li>
-
-<li>[% loc('Category:') %] [% problem.category | html %] </li>
<input type="hidden" name="anonymous" value="[% problem.anonymous %]">
-<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 %]'>
+<li>[% loc('Name:') %] [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li>
+<li>[% loc('Email:') %] [% problem.user.email | html %] <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'>
[% IF problem.extra.email_confirmed %][% loc('Confirmed') %][% END %]
</li>
<li>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li>
@@ -86,7 +40,85 @@
<label class="inline" for="publish_photo">[% loc("Publish photo") %]</label></li>
[% END %]
</ul>
-<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
+</div>
+
+<div style="float:right;width:48%">
+
+<p><label for="internal_notes">[% loc('Internal notes:') %]</label>
+<textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></p>
+
+[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %]
+
+ <p>[% loc('State:') %] <select name="state" id="state">
+ <option value="">--</option>
+ [% FOREACH s IN [
+ ['unconfirmed',loc('Submitted')]
+ ['confirmed', loc('Open')],
+ ['hidden', loc('Hidden')],
+ ] %]
+ <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option>
+ [% END %]
+ </select></p>
+
+<ul>
+<li><label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision">
+ <option value="">--</option>
+ [% FOR body IN bodies %]
+ [% NEXT UNLESS body.parent.id == c.user.from_body.id %]
+ <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option>
+ [% END %]
+ </select>
+
+<li>
+<label for="category">
+[% loc('Category:') %] [% problem.category %]<br>
+[% loc('Assign to different category:') %]</label>
+ <select name="category" id="category">
+ <option value="">--</option>
+ [% FOREACH cat IN categories %]
+ <option value="[% cat %]">[% cat %]</option>
+ [% END %]
+ </select></li>
+
+<li><label for="body_external">[% loc('Assign to external body:') %]</label>
+ <select name="body_external" id="body_external">
+ <option value="">--</option>
+ [% FOR body IN bodies %]
+ [% NEXT IF body.parent OR body.bodies %]
+ <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option>
+ [% END %]
+ </select>
+ <br>
+ <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]>
+ <label for="third_personal" class="inline">Include reporter personal details</label>
+
+</ul>
+
+[% ELSIF problem.state == 'planned' %]
+
+ <p>[% loc('State:') %] <select name="state" id="state">
+ <option value="">--</option>
+ [% FOREACH s IN [
+ ['planned', loc('Planned')],
+ ['hidden', loc('Hidden')],
+ ] %]
+ <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option>
+ [% END %]
+ </select></p>
+
+ <ul>
+ <li>TODO: Leave public update to finish</li>
+ </ul>
+
+[% END %]
+
+</div>
+
+<div style="clear:both"></div>
+<p align="right"><input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></p>
+
+</form>
[% INCLUDE 'admin/list_updates.html' %]