aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/public/js/views/login.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-05-25 19:12:01 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-05-25 19:12:01 +0200
commit78b499e0cb06be9fefd538324d7ec74144f103e5 (patch)
tree5706bc5fcfc2c9ee3963bb79bd7fa6c562fe2c78 /public/js/views/login.js
parentbe gone! (diff)
downloadDivid-78b499e0cb06be9fefd538324d7ec74144f103e5.tar.gz
deleted a bunch of files that doesn't actually get used
Diffstat (limited to 'public/js/views/login.js')
-rw-r--r--public/js/views/login.js51
1 files changed, 0 insertions, 51 deletions
diff --git a/public/js/views/login.js b/public/js/views/login.js
deleted file mode 100644
index 27fe31d..0000000
--- a/public/js/views/login.js
+++ /dev/null
@@ -1,51 +0,0 @@
-
-$(document).ready(function(){
-
- var lv = new LoginValidator();
- var lc = new LoginController();
-
-// main login form //
-
- $('#login-form').ajaxForm({
- beforeSubmit : function(formData, jqForm, options){
- if (lv.validateForm() == false){
- return false;
- } else{
- // append 'remember-me' option to formData to write local cookie //
- formData.push({name:'remember-me', value:$("input:checkbox:checked").length == 1})
- return true;
- }
- },
- success : function(responseText, status, xhr, $form){
- if (status == 'success') window.location.href = '/home';
- },
- error : function(e){
- lv.showLoginError('Login Failure', 'Please check your username and/or password');
- }
- });
- $('#user-tf').focus();
-
-// login retrieval form via email //
-
- var ev = new EmailValidator();
-
- $('#get-credentials-form').ajaxForm({
- url: '/lost-password',
- beforeSubmit : function(formData, jqForm, options){
- if (ev.validateEmail($('#email-tf').val())){
- ev.hideEmailAlert();
- return true;
- } else{
- ev.showEmailAlert("<b> Error!</b> Please enter a valid email address");
- return false;
- }
- },
- success : function(responseText, status, xhr, $form){
- ev.showEmailSuccess("Check your email on how to reset your password.");
- },
- error : function(){
- ev.showEmailAlert("Sorry. There was a problem, please try again later.");
- }
- });
-
-}) \ No newline at end of file