Skip to content

Commit

Permalink
FIX: bulk invite button was not getting re-enabled after performing u…
Browse files Browse the repository at this point in the history
…pload
  • Loading branch information
arpitjalan committed Dec 12, 2016
1 parent 107a21c commit 495c8f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -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"));
}
Expand Down
@@ -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>
Expand Down

0 comments on commit 495c8f2

Please sign in to comment.