A bunch of sqlform fixes

This commit is contained in:
Martin Kamerbeek 2006-12-19 18:10:12 +00:00
parent 4a67861792
commit 32662367ec
4 changed files with 155 additions and 3 deletions

View file

@ -39,7 +39,10 @@ function updateFormFields() {
// Handle Field constraints section
if (document.getElementById('SQLFormFieldConstraintType').value > 0) {
enableField('SQLFormFieldConstraintTarget');
if (document.getElementById('SQLFormFieldConstraintTarget').value == 'value') {
if (
(document.getElementById('SQLFormFieldConstraintTarget').value == 'value') ||
(document.getElementById('SQLFormFieldConstraintTarget').value == '' && document.getElementById('SQLFormFieldConstraintValue').value != '')
) {
enableField('SQLFormFieldConstraintValue');
} else {
disableField('SQLFormFieldConstraintValue');