Fix the 'data-checkbox-dependency-visual' attribute (#3720)

This commit is contained in:
Mira
2023-11-14 14:52:10 +01:00
committed by GitHub
parent fb28d6b927
commit a65df3ed9a

View File

@@ -328,7 +328,7 @@ var form_handlers = function (el) {
update = function () {
var enabled = dependency.prop('checked');
dependent.prop('disabled', !enabled).closest('.form-group, .form-field-boundary').toggleClass('disabled', !enabled);
if (!enabled && !$(this).is('[data-checkbox-dependency-visual]')) {
if (!enabled && !dependent.is('[data-checkbox-dependency-visual]')) {
dependent.prop('checked', false);
}
};