mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
FIX: Do not show Add or Change buttons if email is not editable (#10068)
This commit is contained in:
parent
75991a249e
commit
62faa0f5fe
@ -50,9 +50,11 @@
|
||||
<div class="emails">
|
||||
{{#each emails as |email|}}
|
||||
<div class="row email">
|
||||
{{email-dropdown email=email
|
||||
setPrimaryEmail=(action "setPrimaryEmail")
|
||||
destroyEmail=(action "destroyEmail")}}
|
||||
{{#if model.can_edit_email}}
|
||||
{{email-dropdown email=email
|
||||
setPrimaryEmail=(action "setPrimaryEmail")
|
||||
destroyEmail=(action "destroyEmail")}}
|
||||
{{/if}}
|
||||
|
||||
<div class="email-first">{{email.email}}</div>
|
||||
|
||||
@ -77,9 +79,11 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{#link-to "preferences.email" (query-params new=1) class="pull-right"}}
|
||||
{{d-icon "plus"}} {{i18n "user.email.add_email"}}
|
||||
{{/link-to}}
|
||||
{{#if model.can_edit_email}}
|
||||
{{#link-to "preferences.email" (query-params new=1) class="pull-right"}}
|
||||
{{d-icon "plus"}} {{i18n "user.email.add_email"}}
|
||||
{{/link-to}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class="controls">
|
||||
<span class="static">{{model.email}}</span>
|
||||
|
Loading…
Reference in New Issue
Block a user