diff options
-rwxr-xr-x | templates/web/base/around/display_location.html | 2 | ||||
-rw-r--r-- | templates/web/seesomething/around/display_location.html | 2 | ||||
-rw-r--r-- | web/js/fixmystreet.js | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/templates/web/base/around/display_location.html b/templates/web/base/around/display_location.html index 182c1249e..dbe7d9ffd 100755 --- a/templates/web/base/around/display_location.html +++ b/templates/web/base/around/display_location.html @@ -39,7 +39,7 @@ %] [% IF allow_creation %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate" novalidate> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> [% END %] diff --git a/templates/web/seesomething/around/display_location.html b/templates/web/seesomething/around/display_location.html index e90d1aa0e..ea0a499f7 100644 --- a/templates/web/seesomething/around/display_location.html +++ b/templates/web/seesomething/around/display_location.html @@ -19,7 +19,7 @@ %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate" novalidate> [% IF c.req.params.map_override %] <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> [% END %] diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js index 7d75c8b65..c8f1fe697 100644 --- a/web/js/fixmystreet.js +++ b/web/js/fixmystreet.js @@ -203,6 +203,10 @@ $(function(){ }); }); + // Map form doesn't work in some browsers with HTML5 validation and hidden form, so + // we disable validation by default, and add it in the JS case. + // For some reason, the removeAttr doesn't work if we place it at beginning. + $('#mapForm').removeAttr('novalidate'); }); })(jQuery); |