|
|
|
@ -40,7 +40,7 @@ |
|
|
|
|
{{ctx.Locale.Tr "settings.manage_emails"}} |
|
|
|
|
</h4> |
|
|
|
|
<div class="ui attached segment"> |
|
|
|
|
<div class="ui list"> |
|
|
|
|
<div class="ui list flex-items-block"> |
|
|
|
|
{{if $.EnableNotifyMail}} |
|
|
|
|
<div class="item"> |
|
|
|
|
<div class="tw-mb-2">{{ctx.Locale.Tr "settings.email_desc"}}</div> |
|
|
|
@ -65,27 +65,34 @@ |
|
|
|
|
</div> |
|
|
|
|
{{end}} |
|
|
|
|
{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}} |
|
|
|
|
{{range .Emails}} |
|
|
|
|
<div class="item"> |
|
|
|
|
{{if not .IsPrimary}} |
|
|
|
|
<div class="right floated content"> |
|
|
|
|
{{range .Emails}} |
|
|
|
|
<div class="item tw-flex-wrap"> |
|
|
|
|
<div class="content tw-flex-1"> |
|
|
|
|
<strong>{{.Email}}</strong> |
|
|
|
|
{{if .IsPrimary}} |
|
|
|
|
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div> |
|
|
|
|
{{end}} |
|
|
|
|
{{if .IsActivated}} |
|
|
|
|
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div> |
|
|
|
|
{{end}} |
|
|
|
|
</div> |
|
|
|
|
<div class="flex-text-block"> |
|
|
|
|
{{if not .IsPrimary}} |
|
|
|
|
<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}"> |
|
|
|
|
{{ctx.Locale.Tr "settings.delete_email"}} |
|
|
|
|
</button> |
|
|
|
|
</div> |
|
|
|
|
{{if .CanBePrimary}} |
|
|
|
|
<div class="right floated content"> |
|
|
|
|
{{if .CanBePrimary}} |
|
|
|
|
<form action="{{AppSubUrl}}/user/settings/account/email" method="post"> |
|
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
|
<input name="_method" type="hidden" value="PRIMARY"> |
|
|
|
|
<input name="id" type="hidden" value="{{.ID}}"> |
|
|
|
|
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.primary_email"}}</button> |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
{{end}} |
|
|
|
|
{{end}} |
|
|
|
|
{{end}} |
|
|
|
|
{{if not .IsActivated}} |
|
|
|
|
<div class="right floated content"> |
|
|
|
|
{{if not .IsActivated}} |
|
|
|
|
<form action="{{AppSubUrl}}/user/settings/account/email" method="post"> |
|
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
|
<input name="_method" type="hidden" value="SENDACTIVATION"> |
|
|
|
@ -96,22 +103,11 @@ |
|
|
|
|
<button class="ui primary tiny button">{{ctx.Locale.Tr "settings.activate_email"}}</button> |
|
|
|
|
{{end}} |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
{{end}} |
|
|
|
|
<div class="content tw-py-2"> |
|
|
|
|
<strong>{{.Email}}</strong> |
|
|
|
|
{{if .IsPrimary}} |
|
|
|
|
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div> |
|
|
|
|
{{end}} |
|
|
|
|
{{if .IsActivated}} |
|
|
|
|
<div class="ui green label">{{ctx.Locale.Tr "settings.activated"}}</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="ui label">{{ctx.Locale.Tr "settings.requires_activation"}}</div> |
|
|
|
|
{{end}} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{end}} |
|
|
|
|
{{end}} |
|
|
|
|
{{end}}{{/* range Emails */}} |
|
|
|
|
{{end}}{{/* if manage_credentials */}} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{end}} |
|
|
|
|