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.

70 lines
2.2 KiB

  1. {{template "base/head" .}}
  2. <div class="user settings emails">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. {{template "user/settings/navbar" .}}
  6. <div class="twelve wide column content">
  7. {{template "base/alert" .}}
  8. <h4 class="ui top attached header">
  9. {{.i18n.Tr "settings.manage_emails"}}
  10. </h4>
  11. <div class="ui attached segment">
  12. <div class="ui email list">
  13. <div class="item">
  14. {{.i18n.Tr "settings.email_desc"}}
  15. </div>
  16. {{range .Emails}}
  17. <div class="item ui grid">
  18. <div class="column">
  19. <strong>{{.Email}}</strong>
  20. {{if .IsPrimary}}<span class="text red">{{$.i18n.Tr "settings.primary"}}</span>{{end}}
  21. {{if not .IsPrimary}}
  22. <div class="ui right">
  23. <button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  24. {{$.i18n.Tr "settings.delete_key"}}
  25. </button>
  26. </div>
  27. {{if .IsActivated}}
  28. <div class="ui right">
  29. <form action="{{$.Link}}" method="post">
  30. {{$.CsrfTokenHtml}}
  31. <input name="_method" type="hidden" value="PRIMARY">
  32. <input name="id" type="hidden" value="{{.ID}}">
  33. <button class="ui green tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
  34. </form>
  35. </div>
  36. {{end}}
  37. {{end}}
  38. </div>
  39. </div>
  40. {{end}}
  41. </div>
  42. </div>
  43. <div class="ui attached bottom segment">
  44. <form class="ui form" action="{{.Link}}" method="post">
  45. {{.CsrfTokenHtml}}
  46. <div class="required field {{if .Err_Email}}error{{end}}">
  47. <label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
  48. <input id="email" name="email" type="email" autofocus required>
  49. </div>
  50. <button class="ui green button">
  51. {{.i18n.Tr "settings.add_email"}}
  52. </button>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="ui small basic delete modal">
  60. <div class="ui icon header">
  61. <i class="trash icon"></i>
  62. {{.i18n.Tr "settings.email_deletion"}}
  63. </div>
  64. <div class="content">
  65. <p>{{.i18n.Tr "settings.email_deletion_desc"}}</p>
  66. </div>
  67. {{template "base/delete_modal_actions" .}}
  68. </div>
  69. {{template "base/footer" .}}