mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Fix checklist update
This commit is contained in:
parent
7664f4be78
commit
52c0782447
1 changed files with 9 additions and 1 deletions
|
@ -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">`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue