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.

71 lines
2.1 KiB

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