FIX: disable 'save changes' when uploading a profile picture

This commit is contained in:
Régis Hanol 2015-04-06 16:42:34 +02:00
parent 1fd50634f0
commit aa61c6068b
2 changed files with 2 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import DiscourseController from 'discourse/controllers/controller';
export default DiscourseController.extend(ModalFunctionality, { export default DiscourseController.extend(ModalFunctionality, {
uploadedAvatarTemplate: null, uploadedAvatarTemplate: null,
saveDisabled: Em.computed.alias("uploading"),
hasUploadedAvatar: Em.computed.or('uploadedAvatarTemplate', 'custom_avatar_upload_id'), hasUploadedAvatar: Em.computed.or('uploadedAvatarTemplate', 'custom_avatar_upload_id'),
selectedUploadId: function() { selectedUploadId: function() {

View file

@ -25,6 +25,7 @@
{{avatar-uploader username=username {{avatar-uploader username=username
uploadedAvatarTemplate=uploadedAvatarTemplate uploadedAvatarTemplate=uploadedAvatarTemplate
custom_avatar_upload_id=custom_avatar_upload_id custom_avatar_upload_id=custom_avatar_upload_id
uploading=uploading
done="useUploadedAvatar"}} done="useUploadedAvatar"}}
</div> </div>
</div> </div>