diff options
author | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-12-12 23:57:56 +0100 |
commit | e68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch) | |
tree | 97775d6c13b0f416af55314eb6a89ef792474615 /templates/user/settings/security/twofa.tmpl | |
parent | Initial commit. (diff) | |
download | forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip |
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r-- | templates/user/settings/security/twofa.tmpl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl new file mode 100644 index 0000000..adebce4 --- /dev/null +++ b/templates/user/settings/security/twofa.tmpl @@ -0,0 +1,37 @@ +<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"> + {{.CsrfTokenHtml}} + <p>{{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}</p> + <button class="ui primary button">{{ctx.Locale.Tr "settings.twofa_scratch_token_regenerate"}}</button> + </form> + <form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post" enctype="multipart/form-data" id="disable-form"> + {{.CsrfTokenHtml}} + <p>{{ctx.Locale.Tr "settings.twofa_disable_note"}}</p> + <button class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{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 g-modal-confirm delete 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> |