Simplify code to reset attachment fields
Since elements are created and destroyed, we don't have to do any kind of "reset" before destroying or creating them. We would have to do so if we were just hiding the elements in order to show them again later, but that's not the case.
This commit is contained in:
@@ -134,11 +134,6 @@
|
||||
"_method": "delete"
|
||||
},
|
||||
complete: function() {
|
||||
$(data.cachedAttachmentField).val("");
|
||||
$(data.addAttachmentLabel).show();
|
||||
App.Documentable.clearFilename(data);
|
||||
App.Documentable.clearInputErrors(data);
|
||||
App.Documentable.clearProgressBar(data);
|
||||
App.Documentable.unlockUploads();
|
||||
$(data.wrapper).find(".attachment-actions").addClass("small-12").removeClass("small-6 float-right");
|
||||
$(data.wrapper).find(".attachment-actions .action-remove").addClass("small-3").removeClass("small-12");
|
||||
|
||||
Reference in New Issue
Block a user