Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
36 lines
1.6 KiB
Handlebars
36 lines
1.6 KiB
Handlebars
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "settings.twofa"}}
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<p>{{ctx.Locale.Tr "settings.twofa_desc"}}</p>
|
|
{{if .TOTPEnrolled}}
|
|
<p>{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}</p>
|
|
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
|
|
<p>{{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
|
|
<button type="submit" class="ui primary button">{{ctx.Locale.Tr "settings.twofa_scratch_token_regenerate"}}</button>
|
|
</form>
|
|
<form class="ui form form-fetch-action" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post">
|
|
<p>{{ctx.Locale.Tr "settings.twofa_disable_note"}}</p>
|
|
<button type="submit" class="ui red button" data-modal-confirm="#disable-twofa">{{ctx.Locale.Tr "settings.twofa_disable"}}</button>
|
|
</form>
|
|
{{else}}
|
|
{{/* The recovery tip is there as a means of encouraging a user to enroll */}}
|
|
<p>{{ctx.Locale.Tr "settings.twofa_recovery_tip"}}</p>
|
|
<p>{{ctx.Locale.Tr "settings.twofa_not_enrolled"}}</p>
|
|
<div class="inline field">
|
|
<a class="ui primary button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{ctx.Locale.Tr "settings.twofa_enroll"}}</a>
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="ui small modal" id="disable-twofa">
|
|
<div class="header">
|
|
{{svg "octicon-trash"}}
|
|
{{ctx.Locale.Tr "settings.twofa_disable"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "settings.twofa_disable_desc"}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|
|
</div>
|