Created
March 5, 2014 16:12
-
-
Save lorenzoplanas/9370317 to your computer and use it in GitHub Desktop.
Login function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Handle login form submit | |
this.logIn = function(e) { | |
e.preventDefault(); | |
$(".error", this.$el).remove(); | |
options.user.login({ | |
email: $("input[name='email']", this.$el).val(); | |
password: $("input[name='password']", this.$el).val(); | |
}) | |
.fail(this.loginError.bind(this)) | |
.done(this.loginSuccess.bind(this)); | |
return this; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment