aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/admin')
-rw-r--r--templates/web/base/admin/report-category.html14
-rw-r--r--templates/web/base/admin/report_edit.html16
2 files changed, 16 insertions, 14 deletions
diff --git a/templates/web/base/admin/report-category.html b/templates/web/base/admin/report-category.html
new file mode 100644
index 000000000..ecb5f66f4
--- /dev/null
+++ b/templates/web/base/admin/report-category.html
@@ -0,0 +1,14 @@
+<select class="form-control" name="category" id="category">
+ [% IF NOT problem.category OR NOT categories.grep(problem.category).size %]
+ <optgroup label="[% loc('Existing category') %]">
+ <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
+ </optgroup>
+ [% END %]
+ [% IF categories.size %]
+ <optgroup label="[% loc('Available categories') %]">
+ [% FOREACH cat IN categories %]
+ <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
+ [% END %]
+ </optgroup>
+ [% END %]
+</select>
diff --git a/templates/web/base/admin/report_edit.html b/templates/web/base/admin/report_edit.html
index 911b1995a..3c8134b80 100644
--- a/templates/web/base/admin/report_edit.html
+++ b/templates/web/base/admin/report_edit.html
@@ -117,20 +117,8 @@ class="admin-offsite-link">[% problem.latitude %], [% problem.longitude %]</a>
[% INCLUDE 'admin/state_groups_select.html' %]
</li>
<li><label class="inline-text" for="category">[% loc('Category:') %]</label>
-<select class="form-control" name="category" id="category">
- [% IF NOT problem.category OR NOT categories.grep(problem.category).size %]
- <optgroup label="[% loc('Existing category') %]">
- <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
- </optgroup>
- [% END %]
- [% IF categories.size %]
- <optgroup label="[% loc('Available categories') %]">
- [% FOREACH cat IN categories %]
- <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
- [% END %]
- </optgroup>
- [% END %]
-</select></li>
+ [% INCLUDE 'admin/report-category.html' %]
+</li>
<li><label class="inline-text" for="anonymous">[% loc('Anonymous:') %]</label>
<select class="form-control" name="anonymous" id="anonymous">
<option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option>