aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-09-06 13:20:42 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-09 08:06:52 +0100
commitab49400b3ac3075aeca862caf463f29d6b4c6753 (patch)
treeab5e08ae9c204ee2f0b8034e6c7444304eeb7c00
parentb2d6e1367210de416da25ac44ee370d03ab8962f (diff)
Add validName validation to update form.
-rw-r--r--templates/web/base/report/update/form_name.html3
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js5
2 files changed, 2 insertions, 6 deletions
diff --git a/templates/web/base/report/update/form_name.html b/templates/web/base/report/update/form_name.html
index e65ab1790..c727020f0 100644
--- a/templates/web/base/report/update/form_name.html
+++ b/templates/web/base/report/update/form_name.html
@@ -25,8 +25,7 @@
<p class='form-error'>[% field_errors.name %]</p>
[% END %]
-<input type="text"
- [%- IF c.cobrand.moniker.match('fixmystreet|bromley') AND problem.bodies_str == '2482' %]class="validName" [% END -%]
+<input type="text" class="validName"
name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]">
<div class="checkbox-group">
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 5c5e5cf9b..666527807 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -263,10 +263,7 @@ $.extend(fixmystreet.set_up, {
$('#submit_register').click( function(e) {
$('#form_category').addClass('required validCategory').removeClass('valid');
- $('#form_name').addClass('required');
- if ( $('#mapForm').length ) {
- $('#form_name').addClass('validName');
- }
+ $('#form_name').addClass('required validName');
$('#form_first_name').addClass('required');
$('#form_last_name').addClass('required');
$('#form_fms_extra_title').addClass('required');