client-ui
Version:
Testing implementation of nodeJs Backend, angular frontend, and hopefully in a way that this can be deployed to s3/cloudfront
90 lines (86 loc) • 5.68 kB
HTML
<div class="row text-justify">
<div ng-if="!loginController.loading">
<div class="col-sm-4 hidden-xs text-center">
<img class="login-rocket" src="images/rocket-padlock-screen.svg"/>
</div>
<div class="col-sm-8">
<h3>Let's get you signed in</h3>
<p>
You can use this page to login to your RocketLoans account or change your account password. If you have forgotten your password, you can reset it by entering in your email address and clicking “Forgot your Password?”. Then, we'll send you a password-reset link to quickly get you back on track to accessing your RocketLoans account.
</p>
<form name="loginController.loginForm" xt-form role="form" focus-error="true"
ng-submit="loginController.submit(); loginController.loginForm.$setPristine()"
novalidate
ng-hide="loginController.passwordResetRequested">
<div class="form-group input-group"
ng-class="{'has-error': loginController.loginForm.email.$invalid && loginController.loginForm.$submitted}">
<span class="input-group-addon">
<i class="fa fa-user fa-lg"></i>
</span>
<input type="email" autofocus
name="email"
id="email"
class="form-control"
placeholder="Email address"
ng-model="loginController.credentials.email"
msg-required="Please enter email"
msg-email="Invalid email"
xt-validation-tooltip
required
/>
</div>
<div class="form-group"
ng-class="{'has-error': loginController.loginForm.password.$invalid && loginController.loginForm.$submitted}">
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-lock fa-lg"></i>
</span>
<input type="password"
name="password"
class="form-control"
placeholder="Password"
required
ng-model="loginController.credentials.password"
xt-validation-tooltip
msg-required="Invalid password"
/>
</div>
<div class="text-right"><a href ng-click="loginController.requestPasswordReset()" ng-class="loginController.attemptsRemaining < 2 || loginController.errorCode === 'MAX_FAILED_LOGINS' ? 'btn btn-large btn-danger' : 'small'">Forgot your password?</a></div>
<p ng-if="loginController.passwordResetMessage" class="text-danger">{{loginController.passwordResetMessage}}</p>
</div>
<div>
<button class="btn btn-success large-btn" type="submit" ladda="loginController.working" data-style="expand-left">
Sign in
</button>
<div>
No account? <a href="#/account-creation" class="underline">Sign up</a>
</div>
<div class="alert alert-danger no-bottom-margin" ng-show="loginController.logoutError">
{{loginController.logoutError}}
</div>
</div>
</form>
<div ng-if="loginController.passwordResetRequested">
<span class="text-warning">Your request was received. If <b>{{loginController.credentials.email}}</b> is registered in our system, you will receive instructions to reset your password in the next few minutes. Please remember to check your spam or junk folder, too!</span>
<br/><br/>
<small>Were you trying the wrong email address? <a href ng-click="loginController.init()">Click here to try again</a>. Otherwise, you can close this window.</small>
</div>
<br/>
<div ng-if="loginController.errorCode" class="alert alert-danger no-bottom-margin" ng-switch="loginController.errorCode">
<span ng-switch-when="LOGIN_FAIL">
We could not log you in with that email and password.
<span ng-if="loginController.attemptsRemaining < 4">Your account will be locked after {{loginController.attemptsRemaining}} more failed login attempt{{loginController.attemptsRemaining > 1 ? 's' : ''}}.</span>
</span>
<span ng-switch-when="INVALID_LOGIN">We could not log you in with that email and password.</span>
<span ng-switch-when="MAX_FAILED_LOGINS">Your account has been suspended. Please <a href ng-click="loginController.requestPasswordReset()">reset your password</a> to continue.</span>
<span ng-switch-when="ACCOUNT_SUSPENDED">Your account has been suspended. Please contact us for more information.</span>
<span ng-switch-default>We couldn't log you in. If you continue to see this message, please contact us!</span>
</div>
</div>
</div>
<div class="col-sm-8 text-center" ng-if="loginController.loading">
<h5>Loading...</h5>
<br>
<i class="fa fa-spinner fa-pulse fa-4x"></i>
</div>
</div>