[Mapbender-commits] r6410 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jun 23 04:19:57 EDT 2010


Author: christoph
Date: 2010-06-23 08:19:56 +0000 (Wed, 23 Jun 2010)
New Revision: 6410

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/647

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2010-06-23 08:17:56 UTC (rev 6409)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2010-06-23 08:19:56 UTC (rev 6410)
@@ -2752,7 +2752,16 @@
 						myform.elements[i].className == "hiddenUploadField"){
 					if (myform.elements[i].id) {
 						var elementId = String(myform.elements[i].id).replace(/mb_digitize_form_/, "");
-						d.get(m).e.setElement(elementId, myform.elements[i].value);
+						var $dataTypeNode =  $(myform.elements[i]).prev("input");
+						// if featuretype element is numeric, do not send empty fields
+						if ($dataTypeNode.size() === 1 && -1 !== $.inArray($dataTypeNode.attr("value"), ["int", "double", "float"])) {
+							if (myform.elements[i].value !== "") {
+								d.get(m).e.setElement(elementId, myform.elements[i].value);
+							}
+						}
+						else {
+							d.get(m).e.setElement(elementId, myform.elements[i].value);
+						}					
 					}
 					else {
 						errorMessage = msgObj.messageErrorFormEvaluation;



More information about the Mapbender_commits mailing list