mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 19:23:44 +08:00
e313190fdb
In this PR, we introduced an option, that when all authenticators are disabled, but backup codes still exists, user can authenticate with those backup codes. This was reverted as this is not expected behavior. https://github.com/discourse/discourse/pull/18982 Instead, when the last authenticator is deleted, backup codes should be deleted as well. Because this disables 2fa, user is asked to confirm that action by typing text. In addition, UI for 2fa preferences was refreshed.
39 lines
1.8 KiB
Handlebars
39 lines
1.8 KiB
Handlebars
<div id="dialog-holder" class="dialog-container {{this.dialog.class}}" aria-labelledby={{this.dialog.titleElementId}} aria-hidden="true">
|
|
<div class="dialog-overlay" data-a11y-dialog-hide></div>
|
|
|
|
{{#if this.dialog.type}}
|
|
<div class="dialog-content" role="document">
|
|
{{#if this.dialog.title}}
|
|
<div class="dialog-header">
|
|
<h3 id={{this.dialog.titleElementId}}>{{this.dialog.title}}</h3>
|
|
<DButton @icon="times" @action={{action this.dialog.cancel}} @class="btn-flat dialog-close close" @title="modal.close" />
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (or this.dialog.message this.dialog.confirmPhrase)}}
|
|
<div class="dialog-body">
|
|
{{#if this.dialog.message}}
|
|
<p>{{this.dialog.message}}</p>
|
|
{{/if}}
|
|
{{#if this.dialog.confirmPhrase}}
|
|
<TextField @value={{this.dialog.confirmPhraseInput}} {{on "input" this.dialog.onConfirmPhraseInput}} @id="confirm-phrase" @autocorrect="off" @autocapitalize="off" />
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (notEq this.dialog.type "notice")}}
|
|
<div class="dialog-footer">
|
|
{{#each this.dialog.buttons as |button|}}
|
|
<DButton @icon={{button.icon}} @class={{button.class}} @action={{action "handleButtonAction" button}} @translatedLabel={{button.label}} />
|
|
{{else}}
|
|
<DButton @class={{this.dialog.confirmButtonClass}} @disabled={{this.dialog.confirmButtonDisabled}} @action={{this.dialog.didConfirmWrapped}} @icon={{this.dialog.confirmButtonIcon}} @label={{this.dialog.confirmButtonLabel}} />
|
|
{{#if this.dialog.shouldDisplayCancel}}
|
|
<DButton @class={{this.dialog.cancelButtonClass}} @action={{this.dialog.cancel}} @label={{this.dialog.cancelButtonLabel}} />
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|