Add 2fa disable flow

This commit is contained in:
Johannes Zellner
2018-04-26 16:38:26 +02:00
parent 4ec0fbd33c
commit 46aac0288c
2 changed files with 36 additions and 3 deletions
+27
View File
@@ -163,6 +163,33 @@
</div>
</div>
<!-- Modal disable twofactor authentication -->
<div class="modal fade" id="twoFactorAuthenticationDisableModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Disable Two-Factor Authentication</h4>
</div>
<div class="modal-body">
<form name="twoFactorAuthenticationDisableForm" role="form" novalidate ng-submit="twoFactorAuthentication.disable()" autocomplete="off">
<div class="form-group" ng-class="{ 'has-error': (!twoFactorAuthenticationDisableForm.password.$dirty && twoFactorAuthentication.error) || (twoFactorAuthenticationDisableForm.password.$dirty && twoFactorAuthenticationDisableForm.password.$invalid) }">
<label class="control-label">Password</label>
<div class="control-label" ng-show="(!twoFactorAuthenticationDisableForm.password.$dirty && twoFactorAuthentication.error) || (twoFactorAuthenticationDisableForm.password.$dirty && twoFactorAuthenticationDisableForm.password.$invalid)">
<small>{{ twoFactorAuthentication.error }}</small>
</div>
<input type="password" class="form-control" ng-model="twoFactorAuthentication.password" id="twoFactorAuthenticationPasswordInput" name="password" required autofocus>
</div>
<input class="ng-hide" type="submit" ng-disabled="twoFactorAuthenticationDisableForm.$invalid"/>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="twoFactorAuthentication.disable()" ng-disabled="twoFactorAuthenticationDisableForm.$invalid || twoFactorAuthentication.busy"><i class="fa fa-circle-o-notch fa-spin" ng-show="twoFactorAuthentication.busy"></i> Disable</button>
</div>
</div>
</div>
</div>
<div class="content">
<div class="text-left">