"Add new attachment" button works.

This commit is contained in:
2016-11-02 12:11:46 +01:00
parent 90c6fdc377
commit 6ea7386bd3
2 changed files with 21 additions and 8 deletions

View File

@@ -252,14 +252,7 @@ script(type="text/javascript").
section.find('div.form-upload-progress-bar').hide();
}
if (document.getElementById("attachments") !== null) {
$("#attachments-action-add").on('click', function(){
var lastRepeatingGroup = $('#attachments > li').last();
var cloned = lastRepeatingGroup.clone(true);
cloned.insertAfter(lastRepeatingGroup);
resetAttributeNames(cloned);
});
}
$("#attachments-action-add").addNewAttachmentButton();
if (document.getElementById("files") !== null) {
$("#files-action-add").on('click', function () {