Opened 15 years ago

Closed 15 years ago

#465 closed defect (fixed)

WFS configuration: HTML input is not working.

Reported by: bleukert Owned by: marc
Priority: minor Milestone: 2.6 release
Component: wfs Version: 2.6 rc1
Keywords: Cc:

Description

If you create a select list in the HTML field of the WFS configuration it's
not displayed when trying to save a digitized geometry. Also a customized
input filed of type text is not working.

Examples (which are working in Mapbender 2.4.4)

<select name='agro_env' id='agro_env'>
<option>Va rugam selectati</option>
<option value='nu'>NU</option>
<option value='P1'>P1-PAJISTI CU INALTA VALOARE NATURALA</option>
<option value='P1.2'>P1.2-PRACTICI AGRICOLE TRADITIONALE</option>
<option value='P3.1'>P3.1-PAJISTI IMPORTANTE PENTRU PASARI CREX CREX</option>
<option value='P3.2'>P3.2-PAJISTI IMPORTANTE PENTRU PASARI LANIUS MINOR</option>
<option value='P4'>P4-CULTURI VERZI</option>
</select>

<input type='text' name='farm_id' id='farm_id' size='11' maxlength='11' value='farm_id' disabled>

Change History (4)

comment:1 by marc, 15 years ago

Owner: changed from dev to marc
Status: newassigned

You can see this bugin gui_digitize.

It is caused by this changeset of 2.6_branch. http://trac.osgeo.org/mapbender/changeset/3882/branches/2.6/http/php/mod_wfs.php

Charakter's which have HTML character will converted to htmlentities.

Because of this, the matching in mod_digitize_tab.php doesn't work. see here in line 1647

if (!formElementHtml || !formElementHtml.match(/<select/)) {
	str += "\t\t\t\t<input id = 'datatype_mb_digitize_form_" + elementName + "' name='datatype' type='hidden' value = '" + elementType + "'>\n";
	str += "\t\t\t\t<input id = 'mandatory_mb_digitize_form_" + elementName + "' name='mandatory' type='hidden' value = '" + isMandatory + "'>\n";
	str += "\t\t\t\t<input id = 'mb_digitize_form_" + elementName + "' name='" + elementLabel + "' type='text' class = '"+featureTypeElement['f_style_id']+"' size=20 value = '" + elementValue + "'>\n";
}		

comment:4 by bleukert, 15 years ago

Resolution: fixed
Status: assignedclosed

Thank you Marc, it's working know.

Boris

Note: See TracTickets for help on using tickets.