misc: limit checkbox js prefill to single checkbox field (#58422)
This commit is contained in:
parent
21d0034fe3
commit
5071ecdfac
|
@ -480,8 +480,10 @@ $(function() {
|
|||
if ($(widget).is('.widget-prefilled') || $(widget).is('.widget-readonly') || data.modified_field == 'user') {
|
||||
// replace text input value
|
||||
$(widget).find('input[type=text], input[type=tel], input[type=numeric], input[type=email], input[type=date], textarea').val(value.content);
|
||||
if ($widget.hasClass('CheckboxWidget')) {
|
||||
// replace checkbox input value
|
||||
$(widget).find('input[type=checkbox]').prop('checked', value.content);
|
||||
$widget.find('input[type=checkbox]').prop('checked', value.content);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue