Fix checklist update

This commit is contained in:
aignatov-bio 2019-12-11 15:05:02 +01:00
parent 7664f4be78
commit 52c0782447

View file

@ -20,10 +20,18 @@ var ChecklistColumnHelper = (function() {
}
function checklistHiddenField(formId, columnId, values) {
var idList = [];
if (values) {
$.each(values, function(i, option) {
idList.push(option.value);
});
} else {
idList = '';
}
return $(`<input form="${formId}"
type="hidden"
name="repository_cells[${columnId}]"
value=""
value="${JSON.stringify(idList)}"
data-type="RepositoryChecklistValue">`);
}