diff options
-rw-r--r-- | www/js/strings.js | 4 | ||||
-rw-r--r-- | www/js/views/login.js | 7 | ||||
-rw-r--r-- | www/templates/en/login.html | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/www/js/strings.js b/www/js/strings.js index 13b149f..08e2cd0 100644 --- a/www/js/strings.js +++ b/www/js/strings.js @@ -20,7 +20,9 @@ password: 'Please enter a password' }, strings: { - login_error: 'There was a problem logging you in. Please check your email and password', + login_error: 'There was a problem logging you in. Please try later', + logout_error: 'There was a problem logging you out. Please try later', + login_details_error: 'There was a problem logging you in. Please check your email and password', location_error: 'Location error', location_problem: 'There was a problem looking up your location', multiple_locations: 'More than one location matched that name', diff --git a/www/js/views/login.js b/www/js/views/login.js index 9f3d197..f85745c 100644 --- a/www/js/views/login.js +++ b/www/js/views/login.js @@ -43,11 +43,11 @@ $('#logout').focus(); } else { $('#login').focus(); - that.validationError('form_email', FMS.strings.login_error); + that.validationError('form_email', FMS.strings.login_details_error); } }, error: function() { - alert('boo :('); + that.validationError('form_email', FMS.strings.login_error); } } ); } @@ -71,8 +71,7 @@ that.$('#password_row').show(); }, error: function() { - // TODO fix this - alert( 'There was a problem signing you out'); + that.validationError('err', FMS.strings.logout_error); } } ); }, diff --git a/www/templates/en/login.html b/www/templates/en/login.html index 69aa630..02733da 100644 --- a/www/templates/en/login.html +++ b/www/templates/en/login.html @@ -7,6 +7,7 @@ <% if ( FMS.isLoggedIn ) { %> <div id="signed_in_row"> <p>You are signed in as <%= email %></p> + <div id="err" class="nodisplay"></div> <input type="button" id="logout" name="logout" value="Sign Out" data-theme="a"> </div> <div id="password_row" class="nodisplay"> @@ -30,6 +31,7 @@ <p> Signed in! </p> + <div id="err" class="nodisplay"></div> <input type="button" id="logout" name="logout" value="Sign Out" data-theme="a"> </div> </div> |