aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-10-18 14:24:31 +0100
committerStruan Donald <struan@exo.org.uk>2018-11-26 09:43:10 +0000
commitcd34f8336f9fe5b3f334d350027948dbddc04345 (patch)
tree78d0bda1681fd670d9e63971ee917b06ab069152 /templates
parentd191b211cc25c60d2a1464711ff4212f4d4a5e6e (diff)
[UK] server side cobrand specific validation
`report_check_for_errors` now fetches the cobrand for the current report and, if present, runs `report_validation` method from cobrand over the report.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/new/form_user_loggedin.html3
-rw-r--r--templates/web/base/report/new/form_user_loggedout_by_email.html3
-rw-r--r--templates/web/bromley/report/new/form_user_loggedout_by_email.html3
3 files changed, 9 insertions, 0 deletions
diff --git a/templates/web/base/report/new/form_user_loggedin.html b/templates/web/base/report/new/form_user_loggedin.html
index 8c53b4365..f8e34a313 100644
--- a/templates/web/base/report/new/form_user_loggedin.html
+++ b/templates/web/base/report/new/form_user_loggedin.html
@@ -50,6 +50,9 @@
[% IF NOT c.user.phone_verified AND NOT c.cobrand.call_hook('disable_phone_number_entry') %]
<label for="form_phone">[% loc('Phone number (optional)') %]</label>
+ [% IF field_errors.phone %]
+ <p class='form-error'>[% field_errors.phone %]</p>
+ [% END %]
<input class="form-control" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
[% END %]
[% IF NOT c.user.email_verified %]
diff --git a/templates/web/base/report/new/form_user_loggedout_by_email.html b/templates/web/base/report/new/form_user_loggedout_by_email.html
index 73db38795..5171abd59 100644
--- a/templates/web/base/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/base/report/new/form_user_loggedout_by_email.html
@@ -13,6 +13,9 @@
[% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
<div id="js-hide-if-username-phone">
<label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ [% IF field_errors.phone %]
+ <p class='form-error'>[% field_errors.phone %]</p>
+ [% END %]
<input class="form-control form-focus-hidden" type="text" value="[% phone | html %]" name="phone" id="form_phone">
</div>
[% END %]
diff --git a/templates/web/bromley/report/new/form_user_loggedout_by_email.html b/templates/web/bromley/report/new/form_user_loggedout_by_email.html
index 7613ca339..8c772ac53 100644
--- a/templates/web/bromley/report/new/form_user_loggedout_by_email.html
+++ b/templates/web/bromley/report/new/form_user_loggedout_by_email.html
@@ -9,6 +9,9 @@
[% UNLESS c.cobrand.call_hook('disable_phone_number_entry') %]
<div id="js-hide-if-username-phone">
<label class="form-focus-hidden" for="form_phone">[% loc('Phone number (optional)') %]</label>
+ [% IF field_errors.phone %]
+ <p class='form-error'>[% field_errors.phone %]</p>
+ [% END %]
<input class="form-control form-focus-hidden" type="text" value="[% report.user.phone_display | html %]" name="phone" id="form_phone">
</div>
[% END %]