File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
app/assets/javascripts/discourse Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11<div class =" modal-body" >
22 <div >
3- <input type =" radio" id =" avatar" name =" avatar" value =" gravatar" {{ action toggleUseUploadedAvatar false }} >
4- <label class =" radio" for =" avatar" >{{ avatar controller imageSize =" large" template =" gravatar_template" }} {{{ i18n user.change_avatar.gravatar }}} {{ currentUser.email }} </label >
5- <a href =" //gravatar.com/emails" target =" _blank" title =" {{ i18n user.change_avatar.gravatar_title }} " class =" btn" ><i class =" icon-pencil" ></i ></a >
63 <div >
7- <input type =" radio" id =" uploaded_avatar" name =" avatar" value =" uploaded_avatar" {{ action toggleUseUploadedAvatar true }} {{ bindAttr disabled =" view.uploadedAvatarDisabled" }} >
4+ <input type =" radio" id =" avatar" name =" avatar" value =" gravatar" {{ action toggleUseUploadedAvatar false }} >
5+ <label class =" radio" for =" avatar" >{{ avatar controller imageSize =" large" template =" gravatar_template" }} {{{ i18n user.change_avatar.gravatar }}} {{ currentUser.email }} </label >
6+ <a href =" //gravatar.com/emails" target =" _blank" title =" {{ i18n user.change_avatar.gravatar_title }} " class =" btn" ><i class =" icon-pencil" ></i ></a >
7+ </div >
8+ <div >
9+ <input type =" radio" id =" uploaded_avatar" name =" avatar" value =" uploaded_avatar" {{ action toggleUseUploadedAvatar true }} >
810 <label class =" radio" for =" uploaded_avatar" >
911 {{ #if has_uploaded_avatar }}
1012 {{ boundAvatar controller imageSize =" large" template =" uploaded_avatar_template" }} {{ i18n user.change_avatar.uploaded_avatar }}
2426</div >
2527
2628<div class =" modal-footer" >
27- <button class =" btn btn-primary" {{ action saveAvatarSelection }} data-dismiss =" modal" >{{ i18n save }} </button >
29+ <button class =" btn btn-primary" {{ action saveAvatarSelection }} data-dismiss =" modal" {{ bindAttr disabled = " view.saveDisabled " }} >{{ i18n save }} </button >
2830 <a data-dismiss =" modal" >{{ i18n cancel }} </a >
2931</div >
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ Discourse.AvatarSelectorView = Discourse.ModalBodyView.extend({
1212 title : I18n . t ( 'user.change_avatar.title' ) ,
1313 uploading : false ,
1414 uploadProgress : 0 ,
15- uploadedAvatarDisabled : Em . computed . not ( "controller.has_uploaded_avatar" ) ,
15+ useGravatar : Em . computed . not ( "controller.use_uploaded_avatar" ) ,
16+ canSaveAvatarSelection : Em . computed . or ( "useGravatar" , "controller.has_uploaded_avatar" ) ,
17+ saveDisabled : Em . computed . not ( "canSaveAvatarSelection" ) ,
1618
1719 didInsertElement : function ( ) {
1820 var view = this ;
You can’t perform that action at this time.
0 commit comments