summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4201282)
- Properly handle logic for evaluating inverted dependencies means
when depending on another field *not* having a given value
- Perform datatype validation *after* populating combobox choices to
avoid triggering a false-positive when validating an .rmempty = false
combobox during form instantiation
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
istat = (istat && cbi_d_checkvalue(j, deps[i][j]))
}
}
istat = (istat && cbi_d_checkvalue(j, deps[i][j]))
}
}
- if (istat) {
- return !reverse;
+
+ if (istat ^ reverse) {
+ return true;
var dt = obj.getAttribute('cbi_datatype');
var op = obj.getAttribute('cbi_optional');
var dt = obj.getAttribute('cbi_datatype');
var op = obj.getAttribute('cbi_optional');
- if (dt)
- cbi_validate_field(sel, op == 'true', dt);
-
if (!values[obj.value]) {
if (obj.value == "") {
var optdef = document.createElement("option");
if (!values[obj.value]) {
if (obj.value == "") {
var optdef = document.createElement("option");
obj.style.display = "none";
obj.style.display = "none";
+ if (dt)
+ cbi_validate_field(sel, op == 'true', dt);
+
cbi_bind(sel, "change", function() {
if (sel.selectedIndex == sel.options.length - 1) {
obj.style.display = "inline";
cbi_bind(sel, "change", function() {
if (sel.selectedIndex == sel.options.length - 1) {
obj.style.display = "inline";