Date: 05/04/00
- Next message: Adam N. Thompson, MCNE, MCSE: "[phplib-dev] SGML docs & linuxdoc DTD"
- Previous message: athompso: "[phplib-dev] cvs commit"
- Next in thread: athompso: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: uw
Date: Thu May 4 14:08:45 2000
Modified files:
php-lib/php/form/assistant_gifimage.inc
php-lib/php/form/form_elements.inc
php-lib/php/form/template_bridge.inc
Log message:
- removed a typo in assistant_gifimage.inc
- don't know about the others any more...
Index: php-lib/php/form/assistant_gifimage.inc
diff -u php-lib/php/form/assistant_gifimage.inc:1.4 php-lib/php/form/assistant_gifimage.inc:1.5
--- php-lib/php/form/assistant_gifimage.inc:1.4 Wed May 3 12:39:48 2000
+++ php-lib/php/form/assistant_gifimage.inc Thu May 4 14:08:43 2000
@@ -61,7 +61,7 @@
* <email protected> tab_height
* <email protected> private
*/
- var $tab_width = 105;
+ var $tab_width = 120;
/**
* Height of a tab
@@ -272,11 +272,8 @@
* <email protected> private
*/
function getTab($label, $value, $optional, $noerror) {
-
- if (!$noerror)
- $label = "! $label";
-
- $imgname = md5(sprintf("%s:%s%s", $label, $optional, $error));
+
+ $imgname = md5(sprintf("%s:%s%s", $label, $optional, $noerror));
$file = sprintf("%s/%s.gif", $this->cache_dir, $imgname);
$url = sprintf("%s/%s.gif", $this->cache_url, $imgname);
@@ -431,6 +428,7 @@
* Is the Button "Finish" pressed?
* <email protected> boolean $ok
* <email protected> isExitPressed(), isHelpPressed
+ * <email protected> public
*/
function isFinishPressed() {
if (!isset($this->finish_button["name"])) {
@@ -443,7 +441,8 @@
/**
* Is the Button "Exit" pressed?
* <email protected> boolean $ok
- * <email protected> isFinishPressed(), isHelpPressed()
+ * <email protected> isFinishPressed(), isHelpPressed()
+ * <email protected> public
*/
function isExitPressed() {
if (!isset($this->exit["name"])) {
@@ -457,6 +456,7 @@
* Is the Button "Help" pressed?
* <email protected> boolean $ok
* <email protected> isFinishPressed(), isExitPressed()
+ * <email protected> public
*/
function isHelpPressed() {
if (!isset($this->help["name"])) {
Index: php-lib/php/form/form_elements.inc
diff -u php-lib/php/form/form_elements.inc:1.4 php-lib/php/form/form_elements.inc:1.5
--- php-lib/php/form/form_elements.inc:1.4 Wed Apr 26 11:16:21 2000
+++ php-lib/php/form/form_elements.inc Thu May 4 14:08:43 2000
@@ -59,7 +59,7 @@
var $classname = "form_elements";
/**
- * Name to access this element in form
+ * Name used to access this element in form
* If empty name is used
* <email protected> string $elname
* <email protected> private
@@ -2536,7 +2536,10 @@
function getfrozen($value="") {
if ($this->checked)
- $html = sprintf('<input typ');
+ $html = sprintf('<input type="hidden" name="%s" value="%s"',
+ $this->name,
+ $this->value
+ );
} // end getfrozen
@@ -2550,6 +2553,25 @@
} // end class form_elements_radio
+class form_elements_hidden extends form_elements {
+
+ function get($value="") {
+ $html = sprintf('<input type="hidden" name="%s" value="%s">',
+ $this->name,
+ $this->value
+ );
+ return $html;
+ } // end func get()
+
+ function validate() {
+ return array(true, "");
+ } // end func validate
+
+ function generateJS() {
+ $this->js_code = "";
+ } // end func generateJS
+} // end func form_elements_hidden
+
class form_elements_date extends form_elements {
var $format = "";
@@ -2624,8 +2646,6 @@
$this->value = $value;
return true;
}
-
-
return true;
} // end func setValue
Index: php-lib/php/form/template_bridge.inc
diff -u php-lib/php/form/template_bridge.inc:1.5 php-lib/php/form/template_bridge.inc:1.6
--- php-lib/php/form/template_bridge.inc:1.5 Wed Apr 26 18:33:22 2000
+++ php-lib/php/form/template_bridge.inc Thu May 4 14:08:44 2000
@@ -411,7 +411,12 @@
if (isset($this->elements[$element_data["name"]]))
$this->setError(2, "template_bridge -> addElement(), override previously declared element");
- $element_data["type"] = "form";
+ if ("hidden" == $this->form->getType($element_data["name"]))
+ $type = "hidden";
+ else
+ $type = "form";
+
+ $element_data["type"] = $type;
$this->elements[] = $element_data;
return true;
@@ -686,6 +691,8 @@
$this->newTemplate();
$html = "";
+ $hidden_elements = "";
+
$buttons = array();
$replace = array (
@@ -746,7 +753,11 @@
);
$this->tpl->set_var( $replace );
break;
-
+
+ case "hidden":
+ $hidden_elements.= trim($this->form->getElement($elname));
+ break;
+
default:
if (isset($flags[$elname]))
@@ -778,6 +789,12 @@
// button
}
}
+
+ if (""!=$hidden_elements) {
+ $this->tpl->set_var(array("HIDDEN_ELEMENTS" => $hidden_elements));
+ #$this->introspection("TEMPLATE", $this->tpl);
+ }
+
$this->tpl->parse("out", "main", true);
$html = $this->tpl->get("out");
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: Adam N. Thompson, MCNE, MCSE: "[phplib-dev] SGML docs & linuxdoc DTD"
- Previous message: athompso: "[phplib-dev] cvs commit"
- Next in thread: athompso: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

