aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand/form_extras
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-03-08 17:26:04 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-03-09 15:31:40 +0000
commita5636fc2acd3e03b853f3644fedc054e3eb8b905 (patch)
treed4e60f0e25c27574045fd069df9904f55dc3a1fb /t/cobrand/form_extras
parentb3c925c1b76b93e7c952f1925a959346fae72bef (diff)
Add cobrand-specific custom reporting fields.
This adds a new cobrand variable, report_form_extras, which contains a list of extra fields that will be saved in the 'extra' metadata of the report. Fields may optionally be marked as required.
Diffstat (limited to 't/cobrand/form_extras')
-rw-r--r--t/cobrand/form_extras/templates/report/new/after_photo.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/cobrand/form_extras/templates/report/new/after_photo.html b/t/cobrand/form_extras/templates/report/new/after_photo.html
new file mode 100644
index 000000000..b0c08ba20
--- /dev/null
+++ b/t/cobrand/form_extras/templates/report/new/after_photo.html
@@ -0,0 +1,12 @@
+<label for="form_address">Address</label>
+[% IF field_errors.address %]
+<p class='form-error'>[% field_errors.address %]</p>
+[% END %]
+<input type="text" value="[% report.get_extra_metadata('address') | html %]" name="address" id="form_address" required>
+
+<label for="form_passport">Passport number (optional)</label>
+[% IF field_errors.passport %]
+<p class='form-error'>[% field_errors.passport %]</p>
+[% END %]
+<input type="text" value="[% report.get_extra_metadata('passport') | html %]" name="passport" id="form_passport">
+