mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Fix #175. Bring back support checking for radio field values.
This commit is contained in:
parent
d3c558f579
commit
79682e7627
@ -747,7 +747,7 @@ JS
|
|||||||
$expression = '$(this).attr("checked")';
|
$expression = '$(this).attr("checked")';
|
||||||
} else if ($radioField) {
|
} else if ($radioField) {
|
||||||
// We cannot simply get the value of the radio group, we need to find the checked option first.
|
// We cannot simply get the value of the radio group, we need to find the checked option first.
|
||||||
$expression = '$(this).parents(".field").find("input:checked").val()=="'. $dependency['Value'] .'"';
|
$expression = '$(this).parents(".field, .control-group").find("input:checked").val()=="'. $dependency['Value'] .'"';
|
||||||
} else {
|
} else {
|
||||||
$expression = '$(this).val() == "'. $dependency['Value'] .'"';
|
$expression = '$(this).val() == "'. $dependency['Value'] .'"';
|
||||||
}
|
}
|
||||||
@ -774,7 +774,7 @@ JS
|
|||||||
$expression = '!$(this).attr("checked")';
|
$expression = '!$(this).attr("checked")';
|
||||||
} else if ($radioField) {
|
} else if ($radioField) {
|
||||||
// We cannot simply get the value of the radio group, we need to find the checked option first.
|
// We cannot simply get the value of the radio group, we need to find the checked option first.
|
||||||
$expression = '$(this).parents(".field").find("input:checked").val()!="'. $dependency['Value'] .'"';
|
$expression = '$(this).parents(".field, .control-group").find("input:checked").val()!="'. $dependency['Value'] .'"';
|
||||||
} else {
|
} else {
|
||||||
$expression = '$(this).val() != "'. $dependency['Value'] .'"';
|
$expression = '$(this).val() != "'. $dependency['Value'] .'"';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user