UNPKG

client-ui

Version:

Testing implementation of nodeJs Backend, angular frontend, and hopefully in a way that this can be deployed to s3/cloudfront

96 lines (95 loc) 5.9 kB
<div ng-init="_ctrl = passwordResetController; _ctrl.init()"> <div class="row"> <div class="col-sm-8 col-sm-offset-2"> <div ng-if="_ctrl.resetform.$invalid && _ctrl.submitted" ng-switch="_ctrl.errorCode"> <div ng-repeat="(key,value) in _ctrl.resetform.$error"> <div class="alert alert-danger" ng-if="value !== false" ng-switch on="key"> <span ng-switch-when="required">All fields are required</span> <span ng-switch-when="isstrong">Passwords must be at least "average" strength</span> </div> </div> </div> <div ng-if="_ctrl.errorCode !== false" class="alert alert-danger" ng-switch="_ctrl.errorCode"> <span ng-switch-when="PASSWORD_MISMATCH">The passwords you entered did not match</span> <span ng-switch-when="BAD_HASH">Your password could not be changed. Did you receive more than one password reset emails from us? If so, please make sure you click on the most recent one.</span> <span ng-switch-when="NOT_EXIST_HASH">Your password could not be changed. Did you complete this process earlier? <a ui-sref="login" class="show-pointer">Go sign in</a>!</span> <span ng-switch-when="EXPIRED_HASH">The password reset link that you used has expired. Click <a ui-sref="request-password-reset">here</a> to request another.</span> <span ng-switch-default>There was an error processing your request</span> </div> <div class="panel panel-default "> <div class="about-us-header text-center"> <h5 >Enter your new password</h5><br /> </div> <div class="panel-body"> <form name="_ctrl.resetform" xt-form ng-submit="_ctrl.submit(_ctrl.resetform)"> <fieldset class="text-center"> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"> <i class="fa fa-lock"></i> </span> <label for="inputPassword" class="sr-only">Enter Password</label> <input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="Enter Password" score="_ctrl.score" is-strong min-score="2" required maxlength=32 ng-model="_ctrl.resetform.password" xt-validation-tooltip data-placement="top" msg-isstrong="Must be at least Average strength" msg-required="Password is required" /> </div> </div> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"> <i class="fa fa-lock"></i> </span> <label for="inputPasswordConfirm" class="sr-only">Re-enter Password</label> <input type="password" id="inputPasswordConfirm" class="form-control" placeholder="Re-enter password" ng-model="_ctrl.resetform.confirmPassword" required maxlength=32 xt-validation-tooltip data-placement="top" msg-required="Password confirmation is required" /> </div> </div> <div class="form-group password-strength"> <div class="col-xs-8"> <div class="row progress"> <div class="progress-bar" ng-class="_ctrl.color" role="progressbar" ng-style="{width : _ctrl.score.toString() + '%'}"> <span>{{_ctrl.strwk}}</span> </div> </div> </div> <label class="col-xs-4"> Password Strength </label> </div> <button class="btn btn-lg btn-success" type="submit" id="signin-button">Save New Password</button> </fieldset> </form> </div> </div> <div class="text-center"> Remember your old password? <a ui-sref="login" class="show-pointer">Go sign in</a>! </div> </div> </div> </div>