You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.9 KiB

  1. <h4 class="ui top attached header">
  2. {{.i18n.Tr "settings.manage_openid"}}
  3. </h4>
  4. <div class="ui attached segment">
  5. <div class="ui openid list">
  6. <div class="item">
  7. {{.i18n.Tr "settings.openid_desc"}}
  8. </div>
  9. {{range .OpenIDs}}
  10. <div class="item">
  11. <div class="right floated content">
  12. <button class="ui red tiny button delete-button" id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}">
  13. {{$.i18n.Tr "settings.delete_key"}}
  14. </button>
  15. </div>
  16. <div class="right floated content">
  17. <form action="{{AppSubUrl}}/user/settings/security/openid/toggle_visibility" method="post">
  18. {{$.CsrfTokenHtml}}
  19. <input name="id" type="hidden" value="{{.ID}}">
  20. {{if .Show}}
  21. <button class="ui tiny button">
  22. <i class="icon fa-eye"></i>
  23. {{$.i18n.Tr "settings.hide_openid"}}
  24. </button>
  25. {{else}}
  26. <button class="ui tiny button">
  27. <i class="icon fa-eye-slash"></i>
  28. {{$.i18n.Tr "settings.show_openid"}}
  29. </button>
  30. {{end}}
  31. </button>
  32. </form>
  33. </div>
  34. <div class="content">
  35. <strong>{{.URI}}</strong>
  36. </div>
  37. </div>
  38. {{end}}
  39. </div>
  40. </div>
  41. <div class="ui attached bottom segment">
  42. <form class="ui form" action="{{AppSubUrl}}/user/settings/security/openid" method="post">
  43. {{.CsrfTokenHtml}}
  44. <div class="required field {{if .Err_OpenID}}error{{end}}">
  45. <label for="openid">{{.i18n.Tr "settings.add_new_openid"}}</label>
  46. <input id="openid" name="openid" type="text" required>
  47. </div>
  48. <button class="ui green button">
  49. {{.i18n.Tr "settings.add_openid"}}
  50. </button>
  51. </form>
  52. </div>
  53. <div class="ui small basic delete modal" id="delete-openid">
  54. <div class="ui icon header">
  55. <i class="trash icon"></i>
  56. {{.i18n.Tr "settings.openid_deletion"}}
  57. </div>
  58. <div class="content">
  59. <p>{{.i18n.Tr "settings.openid_deletion_desc"}}</p>
  60. </div>
  61. {{template "base/delete_modal_actions" .}}
  62. </div>