Created
November 5, 2013 15:37
-
-
Save tangorri/7320937 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
angular.module('App').controller('AccountCtrl', function($scope, Account, Profile) { | |
$scope.login = ''; | |
$scope.password = ''; | |
$scope.passwordConfirm = ''; | |
function signin() { | |
Account.signin($scope.login, $scope.password); | |
} | |
function signout() { | |
Account.signout(); | |
} | |
function signup() { | |
Account.signup($scope.login, $scope.password, $scope.passwordConfirm, 1, 1); | |
} | |
$scope.onSinginSubmit = function() { | |
signin(); | |
}; | |
$scope.onSignOutPressed = function() { | |
signout(); | |
}; | |
$scope.onSingupSubmit = function() { | |
signup(); | |
}; | |
}); |
This file contains hidden or 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
<form name="signupForm" ng-submit="onSingupSubmit()"> | |
<div class="account-form white-rounded-top"> | |
<h3 translate>PAGE_ACCOUNT.SIGNUP</h3> | |
<input ng-model="login" type="email" name="login" placeholder="{{'PAGE_ACCOUNT.EMAIL' | translate }}"> | |
<input ng-model="password" type="password" name="password" placeholder="{{'PAGE_ACCOUNT.PASSWORD' | translate }}"> | |
<input ng-model="passwordConfirm" type="password" name="password_confirmation" placeholder="{{'PAGE_ACCOUNT.PASSWORD_CONFIRM' | translate }}"> | |
<button translate class="validation-btn">PAGE_ACCOUNT.SIGNUP</button> | |
<a translate href="#/Account/Signin/" class="small_link">PAGE_ACCOUNT.ALLREADY_HAVE_ACCOUNT</a> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment