[Mapbender-commits] r2996 - branches/beck_dev/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Sep 24 06:11:47 EDT 2008
Author: beck
Date: 2008-09-24 06:11:47 -0400 (Wed, 24 Sep 2008)
New Revision: 2996
Modified:
branches/beck_dev/http/php/mod_wfs_conf.php
branches/beck_dev/http/php/mod_wfs_edit.php
Log:
Modified: branches/beck_dev/http/php/mod_wfs_conf.php
===================================================================
--- branches/beck_dev/http/php/mod_wfs_conf.php 2008-09-23 06:46:54 UTC (rev 2995)
+++ branches/beck_dev/http/php/mod_wfs_conf.php 2008-09-24 10:11:47 UTC (rev 2996)
@@ -57,7 +57,7 @@
}
document.forms[0].submit();
}
-function validate(){
+function validate(){
return true;
}
@@ -107,6 +107,11 @@
border: 1px solid #000;
}
+div.helptext br {
+ visibility: hidden;
+ display: none;
+}
+
div.helptext strong {
display: block;
margin: 0 -5px 5px -5px;
@@ -116,11 +121,9 @@
background-color: #666;
}
-div.helptext p {
+div.helptext textarea {
width: 250px;
height: 150px;
- margin: 0;
- background-color: #FFF;
}
div.helptext input {
@@ -177,7 +180,7 @@
$wfsID = db_insert_id($con,'wfs_conf','wfs_conf_id');
for ($i = 0; $i < $_REQUEST["num"]; $i++){
- $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory,f_auth_varname,f_show_detail) VALUES(";
+ $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory,f_auth_varname,f_show_detail,f_helptext) VALUES(";
$sql .= "$1, $2, ";
if (!empty($_REQUEST["f_search".$i])) {
$sql .= "'1'";
@@ -220,10 +223,11 @@
else {
$sql .= "'0'";
}
- $sql .= "); ";
+ $sql .= ",$10";
+ $sql .= "); ";
- $v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], stripslashes($_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i]));
- $t = array("i", "s", "s", "s", "s", "s", "i", "s", "s");
+ $v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], stripslashes($_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["f_helptext".$i]));
+ $t = array("i", "s", "s", "s", "s", "s", "i", "s", "s", "s");
$res = db_prep_query($sql, $v, $t);
}
if (isset($_REQUEST["f_geom"])) {
@@ -364,20 +368,13 @@
echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
echo "<td><input name='f_auth_varname".$i."' type='text' size='8'></td>";
echo "<td>";
-
- if(empty($row["f_helptext"])) {
- echo "n/a";
- }
- else {
- echo "<input type=\"button\" value=\"Show\" onclick=\"showHelptext(".$i.");\" />";
- echo "<div id=\"helptext".$i."\" class=\"helptext\">";
- echo "<strong>".$aWFS->elements->element_name[$i].":</strong>";
- echo "<p id=\"f_helptext".$i."\">".nl2br(stripslashes($row["f_helptext"]))."</p>";
- echo "<input type=\"button\" value=\"Hide\" onclick=\"hideHelptext(".$i.");\" />";
- echo "</div>";
- }
- echo "</td>";
-
+ echo "<input type=\"button\" value=\"Edit\" onclick=\"showHelptext(".$i.");\" />";
+ echo "<div id=\"helptext".$i."\" class=\"helptext\">";
+ echo "<strong>Helptext for <em>".$aWFS->elements->element_name[$i]."</em>:</strong>";
+ echo "<textarea id=\"f_helptext".$i."\" name=\"f_helptext".$i."\" cols=\"15\" rows=\"1\">".stripslashes($aWFS->elements->f_helptext[$i])."</textarea><br />";
+ echo "<input type=\"button\" value=\"Done\" onclick=\"hideHelptext(".$i.");\" />";
+ echo "</div>";
+ echo "</td>";
echo "</tr>";
}
echo "</table>";
Modified: branches/beck_dev/http/php/mod_wfs_edit.php
===================================================================
--- branches/beck_dev/http/php/mod_wfs_edit.php 2008-09-23 06:46:54 UTC (rev 2995)
+++ branches/beck_dev/http/php/mod_wfs_edit.php 2008-09-24 10:11:47 UTC (rev 2996)
@@ -333,7 +333,7 @@
echo "<input type=\"button\" value=\"Edit\" onclick=\"showHelptext(".$cnt.");\" />";
echo "<div id=\"helptext".$cnt."\" class=\"helptext\">";
echo "<strong>Helptext for <em>".$row["element_name"]."</em>:</strong>";
- echo "<textarea id=\"f_helptext".$cnt."\" name=\"f_helptext".$cnt."\" cols=\"15\" rows=\"1\">".$row["f_helptext"]."</textarea><br />";
+ echo "<textarea id=\"f_helptext".$cnt."\" name=\"f_helptext".$cnt."\" cols=\"15\" rows=\"1\">".stripslashes($row["f_helptext"])."</textarea><br />";
echo "<input type=\"button\" value=\"Done\" onclick=\"hideHelptext(".$cnt.");\" />";
echo "</div>";
echo "</td>";
More information about the Mapbender_commits
mailing list