本站源代码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

36 lines
1.5KB

  1. <h4 class="ui top attached header">
  2. {{.i18n.Tr "settings.twofa"}}
  3. </h4>
  4. <div class="ui attached segment">
  5. <p>{{.i18n.Tr "settings.twofa_desc"}}</p>
  6. {{if .TwofaEnrolled}}
  7. <p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
  8. <form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
  9. {{.CsrfTokenHtml}}
  10. <p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
  11. <button class="ui blue button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
  12. </form>
  13. <form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post" enctype="multipart/form-data" id="disable-form">
  14. {{.CsrfTokenHtml}}
  15. <p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
  16. <div class="ui red button delete-button" id="disable-twofa" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
  17. </form>
  18. {{else}}
  19. <p>{{.i18n.Tr "settings.twofa_not_enrolled"}}</p>
  20. <div class="inline field">
  21. <a class="ui green button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{$.i18n.Tr "settings.twofa_enroll"}}</a>
  22. </div>
  23. {{end}}
  24. </div>
  25. <div class="ui small basic delete modal" id="disable-twofa">
  26. <div class="ui icon header">
  27. <i class="trash icon"></i>
  28. {{.i18n.Tr "settings.twofa_disable"}}
  29. </div>
  30. <div class="content">
  31. <p>{{.i18n.Tr "settings.twofa_disable_desc"}}</p>
  32. </div>
  33. {{template "base/delete_modal_actions" .}}
  34. </div>
上海开阖软件有限公司 沪ICP备12045867号-1