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.

66 lines
2.1 KiB

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