Move validation to the model class

This commit is contained in:
Oliver committed 2021-11-28 22:29:01 +11:00
1 parent 4ee55847f1
commit 78309c1915
3 files changed
+17 -18

No files matched your search

@@ -88,6 +88,12 @@ function loadAttachmentTable(url, options) {
link: {},
comment: {},
},
processResults: function(data, fields, opts) {
// Remove the "link" field if the attachment is a file!
if (data.attachment) {
delete opts.fields.link;
}
},
onSuccess: reloadAttachmentTable,
title: '{% trans "Edit Attachment" %}',
});