mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
committed by
Raphael Michel
parent
e4949b6491
commit
64d07a2811
@@ -318,7 +318,7 @@ var form_handlers = function (el) {
|
||||
var dependent = $(this),
|
||||
dependency = $($(this).attr("data-display-dependency")),
|
||||
update = function (ev) {
|
||||
var enabled = (dependency.attr("type") === 'checkbox' || dependency.attr("type") === 'radio') ? dependency.prop('checked') : !!dependency.val();
|
||||
var enabled = dependency.toArray().some(function(d) {return (d.type === 'checkbox' || d.type === 'radio') ? d.checked : !!d.value;});
|
||||
if (dependent.is("[data-inverse]")) {
|
||||
enabled = !enabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user