login: fix broken reset password form (#10881)

This commit is contained in:
Marcus Efraimsson 2018-02-12 17:09:39 +01:00 committed by Torkel Ödegaard
parent acd085605c
commit ac3bf54fb4
2 changed files with 21 additions and 2 deletions

View File

@ -21,8 +21,9 @@ export class SignUpCtrl {
$scope.navModel = { $scope.navModel = {
main: { main: {
icon: 'gicon gicon-branding', icon: 'gicon gicon-branding',
text: 'Sign Up',
subTitle: 'Register your Grafana account', subTitle: 'Register your Grafana account',
breadcrumbs: [{ title: 'Login', url: 'login' }, { title: 'Sign Up' }], breadcrumbs: [{ title: 'Login', url: 'login' }],
}, },
}; };

View File

@ -18,7 +18,7 @@
</div> </div>
</form> </form>
<div ng-if="mode === 'email-sent'"> <div ng-show="mode === 'email-sent'">
An email with a reset link as been sent to the email address. <br> An email with a reset link as been sent to the email address. <br>
You should receive it shortly. You should receive it shortly.
<div class="p-t-1"> <div class="p-t-1">
@ -27,5 +27,23 @@
</a> </a>
</div> </div>
</div> </div>
<form name="resetForm" class="login-form gf-form-group" ng-show="mode === 'reset'">
<div class="gf-form">
<span class="gf-form-label width-9">New Password</span>
<input type="password" name="NewPassword" class="gf-form-input max-width-14" required ng-minlength="4" ng-model='formModel.newPassword' placeholder="password" watch-change="formModel.newPassword = inputValue;">
</div>
<div class="gf-form">
<span class="gf-form-label width-9">Confirm Password</span>
<input type="password" name="ConfirmPassword" class="gf-form-input max-width-14" required ng-minlength="4" ng-model='formModel.confirmPassword' placeholder="confirm password">
</div>
<div class="signup__password-strength">
<password-strength password="formModel.newPassword"></password-strength>
</div>
<div class="gf-form-button-row">
<button type="submit" class="btn btn-success" ng-click="submitReset();" ng-disabled="!resetForm.$valid">
Reset Password
</button>
</div>
</form>
</div> </div>
</div> </div>