aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-10-05 14:16:42 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-11-11 10:31:33 +0000
commit2e1c10996a0a08b9bf50af05300fef5c253854e7 (patch)
tree4fc93f71dd6fc30fe784096603dcbcd35772ba6e /templates
parent5e645b3e795e0d9a60425f0d8240c2263dc5a89d (diff)
[Bromley] Nuanced template resolution codes.
Have the response template external status code be a combination of resolution code, task type ID, and task state.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/templates/_external.html12
-rw-r--r--templates/web/base/admin/templates/edit.html13
-rw-r--r--templates/web/bromley/admin/templates/_external.html24
3 files changed, 37 insertions, 12 deletions
diff --git a/templates/web/base/admin/templates/_external.html b/templates/web/base/admin/templates/_external.html
new file mode 100644
index 000000000..d25d2b39c
--- /dev/null
+++ b/templates/web/base/admin/templates/_external.html
@@ -0,0 +1,12 @@
+[% IF errors.external_status_code %]
+ <div class="form-error">[% errors.external_status_code %]</div>
+[% END %]
+<div class="admin-hint">
+ <p>
+ [% loc('If you want to use this template to prefill the update field when a report&rsquo;s <strong>external</strong> (e.g. Confirm) status code changes, enter the status code here.') %]
+ </p>
+</div>
+<p>
+ <label for="external_status_code">[% loc('External status code') %]</label>
+ <input type="text" id="external_status_code" name="external_status_code" class="form-control" size="30" value="[% rt.external_status_code | html %]">
+</p>
diff --git a/templates/web/base/admin/templates/edit.html b/templates/web/base/admin/templates/edit.html
index 7ce67f96f..f52c26b49 100644
--- a/templates/web/base/admin/templates/edit.html
+++ b/templates/web/base/admin/templates/edit.html
@@ -51,18 +51,7 @@
[% INCLUDE 'report/inspect/state_groups_select.html' current_state=rt.state include_empty=1 %]
</p>
- [% IF errors.external_status_code %]
- <div class="form-error">[% errors.external_status_code %]</div>
- [% END %]
- <div class="admin-hint">
- <p>
- [% loc('If you want to use this template to prefill the update field when a report&rsquo;s <strong>external</strong> (e.g. Confirm) status code changes, enter the status code here.') %]
- </p>
- </div>
- <p>
- <label for="external_status_code">[% loc('External status code') %]</label>
- <input type="text" name="external_status_code" class="form-control" size="30" value="[% rt.external_status_code | html %]">
- </p>
+ [% PROCESS 'admin/templates/_external.html' %]
[% IF errors.auto_response %]
<div class="form-error">[% errors.auto_response %]</div>
diff --git a/templates/web/bromley/admin/templates/_external.html b/templates/web/bromley/admin/templates/_external.html
new file mode 100644
index 000000000..6015950de
--- /dev/null
+++ b/templates/web/bromley/admin/templates/_external.html
@@ -0,0 +1,24 @@
+[% parts = rt.external_status_code.split(',') ~%]
+
+[% IF errors.external_status_code %]
+ <div class="form-error">[% errors.external_status_code %]</div>
+[% END %]
+<p>
+ <label for="resolution_code">External status code / Resolution Code ID</label>
+ <input type="text" id="resolution_code" name="resolution_code" class="form-control" size="30" value="[% parts.0 %]">
+</p>
+
+<p>
+ <label for="task_type">Task type ID</label>
+ <input type="text" id="task_type" name="task_type" class="form-control" size="30" value="[% parts.1 %]">
+</p>
+
+<p>
+ <label for="task_state">Task state</label>
+ <select class="form-control" name="task_state" id="task_state">
+ <option value="">---</option>
+ [% FOR opt IN ['Completed', 'Not Completed'] %]
+ <option value="[% opt %]"[% ' selected' IF parts.2 == opt %]>[% opt %]</option>
+ [% END %]
+ </select>
+</p>