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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Nov 28 12:36:50 EST 2007


Author: christoph
Date: 2007-11-28 12:36:50 -0500 (Wed, 28 Nov 2007)
New Revision: 1869

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
if the html form element is not a select box, display it as input field

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2007-11-28 17:29:25 UTC (rev 1868)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2007-11-28 17:36:50 UTC (rev 1869)
@@ -1170,14 +1170,12 @@
 						}
 					}
 					var formElementHtml = featureTypeElement['f_form_element_html']; 
-					if (!formElementHtml) {
+					if (!formElementHtml || !formElementHtml.match(/<select/)) {
 						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";
 						str += "\t\t\t\t<input id = '" + elementName + "' name='" + elementLabel + "' type='text' class = '"+featureTypeElement['f_style_id']+"' size=20 value = '" + elementValue + "'>\n";
 					}
 					else {
-						if (formElementHtml.match(/<select/)) {
-								
 							while (formElementHtml.match(/\\/)) {
 								formElementHtml = formElementHtml.replace(/\\/, "");
 							} 
@@ -1188,8 +1186,6 @@
 							formElementHtml = formElementHtml.replace(pattern, patternString+" selected");
 //							alert(formElementHtml);
 							str += formElementHtml;
-	
-						}
 					}
 					str += "\t\t\t</td>\n\t\t</tr>\n";
 				}



More information about the Mapbender_commits mailing list