mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Don't show the upload avatar modal is allow_uploaded_avatars is false.
This commit is contained in:
parent
2850279c45
commit
483c9f9826
@ -7,6 +7,10 @@
|
|||||||
@module Discourse
|
@module Discourse
|
||||||
**/
|
**/
|
||||||
Discourse.PreferencesController = Discourse.ObjectController.extend({
|
Discourse.PreferencesController = Discourse.ObjectController.extend({
|
||||||
|
allowAvatarUpload: function() {
|
||||||
|
return Discourse.SiteSetting.allow_uploaded_avatars;
|
||||||
|
}.property(),
|
||||||
|
|
||||||
// By default we haven't saved anything
|
// By default we haven't saved anything
|
||||||
saved: false,
|
saved: false,
|
||||||
|
|
||||||
|
@ -49,7 +49,11 @@
|
|||||||
<label class="control-label">{{i18n user.avatar.title}}</label>
|
<label class="control-label">{{i18n user.avatar.title}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{boundAvatar model imageSize="large"}}
|
{{boundAvatar model imageSize="large"}}
|
||||||
<button {{action showAvatarSelector}} class="btn pad-left"><i class="icon-pencil"></i></button>
|
{{#if allowAvatarUpload}}
|
||||||
|
<button {{action showAvatarSelector}} class="btn pad-left"><i class="icon-pencil"></i></button>
|
||||||
|
{{else}}
|
||||||
|
<a href="//gravatar.com/emails" target="_blank" title="{{i18n user.change_avatar.gravatar_title}}" class="btn"><i class="icon-pencil"></i></a>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user