Skip to content

Commit

Permalink
[TfL] Contact email may not be an email address.
Browse files Browse the repository at this point in the history
Or can be a list of email addresses.
See e.g. validate_contact_email in Cobrand::TfL.
  • Loading branch information
dracos committed May 14, 2024
1 parent 2a854e0 commit 0b261cf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions templates/web/base/admin/bodies/contact-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,17 @@

<label for="destination">[% loc('Destination') %]</label>
<p class="form-hint" id="destination-hint">
[% SET field_type = 'text' %]
[% IF body.can_be_devolved %]
[% loc('An email address or service ID (Open311 or similar).') %]
[% ELSIF body.send_method == 'Open311' %]
[% loc('A service ID (Open311 or similar).') %]
[% ELSIF body.send_method.match('Email') OR NOT body.send_method %]
[% loc('An email address.') %]
[% SET field_type = 'email' %]
[% ELSE %]
[% loc('An email address or service ID (Open311 or similar).') %]
[% END %]
</p>
<input type="[% field_type %]" [% IF field_type == 'email' %]
autocomplete="email" [% END %] class="form-control" id="destination" aria-describedby="destination-hint" name="email" size="30" value="[% contact.email | html %]" required>
<input type="text" class="form-control" id="destination" aria-describedby="destination-hint" name="email" size="30" value="[% contact.email | html %]" required>

[% TRY %][% PROCESS 'admin/bodies/_type_field.html' %][% CATCH file %][% END %]

Expand Down

0 comments on commit 0b261cf

Please sign in to comment.