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
|
||||
**/
|
||||
Discourse.PreferencesController = Discourse.ObjectController.extend({
|
||||
allowAvatarUpload: function() {
|
||||
return Discourse.SiteSetting.allow_uploaded_avatars;
|
||||
}.property(),
|
||||
|
||||
// By default we haven't saved anything
|
||||
saved: false,
|
||||
|
||||
|
|
|
@ -49,7 +49,11 @@
|
|||
<label class="control-label">{{i18n user.avatar.title}}</label>
|
||||
<div class="controls">
|
||||
{{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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue