When ENUM field has just one value, it could not be set to NULL (bug #783533).
This commit is contained in:
@@ -26,10 +26,16 @@ function nullify(theType, urlField, md5Field)
|
||||
// Other "ENUM" field
|
||||
else if (theType == 2) {
|
||||
var elts = rowForm.elements['field_' + md5Field + '[]'];
|
||||
var elts_cnt = elts.length;
|
||||
for (var i = 0; i < elts_cnt; i++ ) {
|
||||
elts[i].checked = false;
|
||||
} // end for
|
||||
// when there is just one option in ENUM:
|
||||
if (elts.checked) {
|
||||
elts.checked = false;
|
||||
} else {
|
||||
var elts_cnt = elts.length;
|
||||
for (var i = 0; i < elts_cnt; i++ ) {
|
||||
elts[i].checked = false;
|
||||
} // end for
|
||||
|
||||
} // end if
|
||||
}
|
||||
// Other field types
|
||||
else /*if (theType == 5)*/ {
|
||||
|
Reference in New Issue
Block a user