aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/web/default/around/display_location.html2
-rw-r--r--templates/web/default/auth/general.html4
-rw-r--r--templates/web/default/js_validation_msgs.html5
-rw-r--r--templates/web/default/report/display.html6
-rw-r--r--templates/web/default/report/new/fill_in_details.html4
-rw-r--r--web/js/fixmystreet.js2
6 files changed, 14 insertions, 9 deletions
diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html
index 242253ab8..4026286ce 100755
--- a/templates/web/default/around/display_location.html
+++ b/templates/web/default/around/display_location.html
@@ -35,7 +35,7 @@
robots => 'noindex,nofollow';
%]
-<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data">
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate">
[% 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/default/auth/general.html b/templates/web/default/auth/general.html
index 234aadf52..607eebd2d 100644
--- a/templates/web/default/auth/general.html
+++ b/templates/web/default/auth/general.html
@@ -2,7 +2,7 @@
<h1>[% loc('Sign in') %]</h1>
-<form action="[% c.uri_for() %]" method="post" name="general_auth">
+<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate">
<input type="hidden" name="r" value="[% c.req.params.r | html %]">
[% IF email_error;
@@ -25,7 +25,7 @@
<div class="form-field">
<label class="n" for="email">[% loc('Your email address:') %]</label>
- <input type="email" size="30" id="email" name="email" value="[% email | html %]">
+ <input type="email" class="required email" size="30" id="email" name="email" value="[% email | html %]">
</div>
<div id="form_sign_in">
diff --git a/templates/web/default/js_validation_msgs.html b/templates/web/default/js_validation_msgs.html
index 140f22964..2466ce175 100644
--- a/templates/web/default/js_validation_msgs.html
+++ b/templates/web/default/js_validation_msgs.html
@@ -1,5 +1,6 @@
<script type="text/javascript">
validation_strings = {
+ update: '[% loc('Please enter a message') %]',
title: '[% loc('Please enter a subject') %]',
detail: '[% loc('Please enter some details') %]',
name: {
@@ -7,6 +8,10 @@
validName: '[% loc('Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box') %]',
},
category: '[% loc('Please choose a category') %]',
+ rznvy: {
+ required: '[% loc('Please enter your email') %]',
+ email: '[% loc('Please enter a valid email') %]',
+ },
email: {
required: '[% loc('Please enter your email') %]',
email: '[% loc('Please enter a valid email') %]',
diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html
index fe26ec60d..45e3e0182 100644
--- a/templates/web/default/report/display.html
+++ b/templates/web/default/report/display.html
@@ -72,7 +72,7 @@
[% INCLUDE 'errors.html' %]
- <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" id="fieldset"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+ <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" id="fieldset"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate">
<input type="hidden" name="submit_update" value="1">
<input type="hidden" name="id" value="[% problem.id | html %]">
@@ -82,7 +82,7 @@
[% END %]
<div class="form-field">
<label for="form_update">[% loc( 'Update:' ) %]</label>
- <textarea name="update" id="form_update" rows="7" cols="30">[% update.text | html %]</textarea>
+ <textarea class="required" name="update" id="form_update" rows="7" cols="30">[% update.text | html %]</textarea>
</div>
[% IF c.user && c.user.belongs_to_council( problem.council ) %]
@@ -139,7 +139,7 @@
[% END %]
<div class="form-field">
<label for="form_rznvy">[% loc('Your email:' ) %]</label>
- <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30">
+ <input type="email" class="required email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30">
</div>
<div id="form_sign_in">
diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html
index a9a113283..701a9bafa 100644
--- a/templates/web/default/report/new/fill_in_details.html
+++ b/templates/web/default/report/new/fill_in_details.html
@@ -4,14 +4,14 @@
%]
[% IF report.used_map %]
-<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate">
[% IF c.req.params.map_override %]
<input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]">
[% END %]
<input type="hidden" name="pc" value="[% pc | html %]">
[% c.cobrand.form_elements('mapForm') %]
[% ELSE %]
-<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]>
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %] class="validate">
<input type="hidden" name="pc" value="[% pc | html %]">
<input type="hidden" name="skipped" value="1">
[% c.cobrand.form_elements('mapSkippedForm') %]
diff --git a/web/js/fixmystreet.js b/web/js/fixmystreet.js
index e1901c3c8..a9ada1fd5 100644
--- a/web/js/fixmystreet.js
+++ b/web/js/fixmystreet.js
@@ -61,7 +61,7 @@ $(function(){
var validNamePat = /\ba\s*n+on+((y|o)mo?u?s)?(ly)?\b/i;
return this.optional(element) || value.length > 5 && value.match( /\S/ ) && !value.match( validNamePat ) }, validation_strings['category'] );
- $("#mapForm").validate({
+ $("form.validate").validate({
messages: validation_strings,
onkeyup: false,
errorElement: 'div',