Fix: check on page load if radio button is checked

This commit is contained in:
slawkens 2023-07-13 13:03:52 +02:00
parent c7c8ff266b
commit 1ea9a76ea9

View File

@ -35,6 +35,12 @@
$('input[name="settings[{{ value.show_if[0] }}]"]').change(function () {
performChecks_{{ key }}(this);
});
{% if settings[value.show_if[0]]['type'] == 'boolean' %}
performChecks_{{ key }}('input[name="settings[{{ value.show_if[0] }}]"]:checked');
{% else %}
performChecks_{{ key }}('input[name="settings[{{ value.show_if[0] }}]"]');
{% endif %}
});
function performChecks_{{ key }}(el)