Fixup profile picture selection to only allow really changed pictures to be submitted

This commit is contained in:
Johannes Zellner
2020-01-20 19:01:41 +01:00
parent 008ac68ecb
commit 36653c10dc
2 changed files with 4 additions and 2 deletions

View File

@@ -20,13 +20,13 @@
</label>
</div>
<div ng-hide="avatarChange.useGravatar" class="preview-avatar">
<img id="previewAvatar" width="128" height="128" class="copy" ng-src="{{avatarChange.avatar.data || avatarChange.avatar.url}}" ng-click="avatarChange.showCustomAvatarSelector()"/>
<img id="previewAvatar" width="128" height="128" class="copy" ng-click="avatarChange.showCustomAvatarSelector()"/>
<input type="file" id="avatarFileInput" style="display: none" accept="image/png"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="avatarChange.doChangeAvatar()" ng-disabled="avatarChange.busy || (avatarChange.useGravatarOrig === avatarChange.useGravatar && (avatarChange.useGravatar || !avatarChange.pictureChanged))"><i class="fa fa-circle-notch fa-spin" ng-show="avatarChange.busy"></i> Save</button>
<button type="button" class="btn btn-success" ng-click="avatarChange.doChangeAvatar()" ng-disabled="avatarChange.busy || (avatarChange.useGravatarOrig === avatarChange.useGravatar && avatarChange.useGravatar) || (!avatarChange.useGravatar && !avatarChange.pictureChanged)"><i class="fa fa-circle-notch fa-spin" ng-show="avatarChange.busy"></i> Save</button>
</div>
</div>
</div>