Improve UX of ticket download settings

This commit is contained in:
Raphael Michel
2020-04-02 18:16:22 +02:00
parent 7b1e1a48ef
commit 0c0fe58bbf
6 changed files with 66 additions and 41 deletions

View File

@@ -251,7 +251,7 @@ var form_handlers = function (el) {
update = function () {
var enabled = dependency.prop('checked');
dependent.prop('disabled', !enabled).parents('.form-group').toggleClass('disabled', !enabled);
if (!enabled) {
if (!enabled && !$(this).is('[data-checkbox-dependency-visual]')) {
dependent.prop('checked', false);
}
};
@@ -750,4 +750,4 @@ $(document).ready(function () {
$('form[method=post]').filter(function () {
return $(this).find("button:not([type=button]), input[type=submit]").length > 0;
}).areYouSure( {'message': gettext('You have unsaved changes!')});
});
});