FIX: bulk invite button was not getting re-enabled after performing upload

This commit is contained in:
Arpit Jalan 2016-12-12 13:57:27 +05:30
parent 107a21c069
commit 495c8f2794
2 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,12 @@ export default Em.Component.extend(UploadMixin, {
return uploading ? I18n.t("uploading") : I18n.t("user.invited.bulk_invite.text");
},
@computed("uploading")
uploadButtonDisabled(uploading) {
// https://github.com/emberjs/ember.js/issues/10976#issuecomment-132417731
return uploading ? true : null;
},
uploadDone() {
bootbox.alert(I18n.t("user.invited.bulk_invite.success"));
}

View File

@ -1,4 +1,4 @@
<label class="btn" disabled={{uploading}}>
<label class="btn" disabled={{uploadButtonDisabled}}>
{{fa-icon "upload"}}&nbsp;{{uploadButtonText}}
<input disabled={{uploading}} type="file" accept=".csv" style="visibility: hidden; position: absolute;" />
</label>