[Mapbender-commits] r3923 - branches/2.6/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 4 09:27:57 EDT 2009
Author: verenadiewald
Date: 2009-05-04 09:27:57 -0400 (Mon, 04 May 2009)
New Revision: 3923
Modified:
branches/2.6/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/462
Modified: branches/2.6/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.6/http/javascripts/mod_digitize_tab.php 2009-05-04 13:25:31 UTC (rev 3922)
+++ branches/2.6/http/javascripts/mod_digitize_tab.php 2009-05-04 13:27:57 UTC (rev 3923)
@@ -1299,9 +1299,10 @@
isCorrect = isCorrect && result.isCorrect;
errorMessage += result.errorMessage;
- result = validBoxEntrySelected(form);
- isCorrect = isCorrect && result.isCorrect;
- errorMessage += result.errorMessage;
+ //select box is now checked within function mandatoryFieldsNotEmpty
+ //result = validBoxEntrySelected(form);
+ //isCorrect = isCorrect && result.isCorrect;
+ //errorMessage += result.errorMessage;
result = dataTypeIsCorrect(doc, form);
isCorrect = isCorrect && result.isCorrect;
@@ -1344,6 +1345,15 @@
}
}
}
+ if (nodeArray[i].nodeName.toUpperCase() == "SELECT" && nodeArray[i].type == "hidden" && nodeArray[i].id.substr(0,10) == "mandatory_") {
+ var nodeId = nodeArray[i].id.substr(10);
+ if (nodeArray[i].value == "true") {
+ if (parseInt(form.childNodes[i].selectedIndex) == 0) {
+ isCorrect = false;
+ errorMessage += "'"+ doc.getElementById(nodeId).name +"': "+ msgObj.messageErrorFieldIsEmpty +"\n";
+ }
+ }
+ }
}
return {"isCorrect":isCorrect, "errorMessage":errorMessage};
}
@@ -1643,6 +1653,8 @@
while (formElementHtml.match(/\\/)) {
formElementHtml = formElementHtml.replace(/\\/, "");
}
+ str += "\t\t\t\t<input id = 'datatype_" + elementName + "' name='datatype' type='hidden' value = '" + elementType + "'>\n";
+ str += "\t\t\t\t<input id = 'mandatory_" + elementName + "' name='mandatory' type='hidden' value = '" + isMandatory + "'>\n";
// preselect the correct entry of the box
var patternString = "option value( )*=( )*'"+elementValue+"'";
var pattern = new RegExp(patternString);
More information about the Mapbender_commits
mailing list