[phplib-dev] cvs commit From: uw (phplib-dev <email protected>)
Date: 01/14/01

From: uw
Date: Sun Jan 14 21:08:44 2001
Modified files:
      php-lib/php/form/form.inc
      php-lib/php/form/form_element.inc
      php-lib/php/form/form_element_checkobject.inc
      php-lib/php/form/form_element_date.inc
      php-lib/php/form/form_element_submit.inc

Log message:
Minor JavaScript Bugfix - JS is still buggy :(

Index: php-lib/php/form/form.inc
diff -u php-lib/php/form/form.inc:1.21 php-lib/php/form/form.inc:1.22
--- php-lib/php/form/form.inc:1.21 Wed Jan 10 02:00:32 2001
+++ php-lib/php/form/form.inc Sun Jan 14 21:08:39 2001
@@ -26,7 +26,7 @@
 * - tree (select box with options show as a tree)
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
-*  <email protected> $Id: form.inc,v 1.21 2001/01/10 01:00:32 uw Exp $
+*  <email protected> $Id: form.inc,v 1.22 2001/01/14 20:08:39 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -700,7 +700,7 @@
 
                 return $this->getValidationResult();
         } // end func validate
-
+
         /**
         * Sets the validation error message for of an element.
         *
Index: php-lib/php/form/form_element.inc
diff -u php-lib/php/form/form_element.inc:1.9 php-lib/php/form/form_element.inc:1.10
--- php-lib/php/form/form_element.inc:1.9 Mon Jan 8 01:59:43 2001
+++ php-lib/php/form/form_element.inc Sun Jan 14 21:08:40 2001
@@ -3,7 +3,7 @@
 * Superclass of all form elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element.inc,v 1.9 2001/01/08 00:59:43 uw Exp $
+*  <email protected> $Id: form_element.inc,v 1.10 2001/01/14 20:08:40 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 *  <email protected>
@@ -636,7 +636,7 @@
         */
         function getJSonActivation() {
         
- if ("strong" == $this->js_mode)
+ if ("strong" == $this->js_mode && $this->form_name)
                         return sprintf(' onChange="_%s.validate(\'%s\')" ',
                                                                                         $this->form_name,
                                                                                         $this->name
Index: php-lib/php/form/form_element_checkobject.inc
diff -u php-lib/php/form/form_element_checkobject.inc:1.7 php-lib/php/form/form_element_checkobject.inc:1.8
--- php-lib/php/form/form_element_checkobject.inc:1.7 Tue Jan 2 16:49:31 2001
+++ php-lib/php/form/form_element_checkobject.inc Sun Jan 14 21:08:41 2001
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_checkobject.inc,v 1.7 2001/01/02 15:49:31 uw Exp $
+*  <email protected> $Id: form_element_checkobject.inc,v 1.8 2001/01/14 20:08:41 uw Exp $
 *  <email protected>
 */
 class form_element_checkobject extends form_element {
@@ -47,7 +47,7 @@
         */
         function getJSonActivation() {
         
- if ("strong" == $this->js_mode)
+ if ("strong" == $this->js_mode && $this->form_name)
                         return sprintf(' onClick="_%s.validate(\'%s\')" ',
                                                                                         $this->form_name,
                                                                                         $this->name
Index: php-lib/php/form/form_element_date.inc
diff -u php-lib/php/form/form_element_date.inc:1.10 php-lib/php/form/form_element_date.inc:1.11
--- php-lib/php/form/form_element_date.inc:1.10 Wed Jan 10 01:22:52 2001
+++ php-lib/php/form/form_element_date.inc Sun Jan 14 21:08:42 2001
@@ -5,7 +5,7 @@
 * Use this meta element to make sure that the user enters a valid date.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_date.inc,v 1.10 2001/01/10 00:22:52 uw Exp $
+*  <email protected> $Id: form_element_date.inc,v 1.11 2001/01/14 20:08:42 uw Exp $
 *  <email protected> Form
 */
 class form_element_date extends form_element {
@@ -412,7 +412,7 @@
         */
         function getJSonActivation($name) {
                 
- if ("strong" == $this->js_mode)
+ if ("strong" == $this->js_mode && $this->form_name)
                         return sprintf(' onChange="_%s.validate(\'%s_%s\')" ',
                                                                                         $this->form_name,
                                                                                         $this->name,
@@ -455,7 +455,7 @@
                                 $values .= sprintf('"%s", ', $this->getPreloadValue($this->format{$i}));
                         }
                 $values = substr($values, 0, -2);
-
+
                 $js = sprintf('function form_date_now(e) {
         var i = j = f = v = 0;
         
Index: php-lib/php/form/form_element_submit.inc
diff -u php-lib/php/form/form_element_submit.inc:1.8 php-lib/php/form/form_element_submit.inc:1.9
--- php-lib/php/form/form_element_submit.inc:1.8 Sat Jan 6 02:03:01 2001
+++ php-lib/php/form/form_element_submit.inc Sun Jan 14 21:08:42 2001
@@ -5,7 +5,7 @@
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
 *  <email protected> public
-*  <email protected> $Id: form_element_submit.inc,v 1.8 2001/01/06 01:03:01 uw Exp $
+*  <email protected> $Id: form_element_submit.inc,v 1.9 2001/01/14 20:08:42 uw Exp $
 */
 class form_element_submit extends form_element_buttonobject {
         
@@ -36,7 +36,6 @@
                         return $this->getfrozen($subelement);
                 
                 $html = sprintf('<input type="submit" name="%s" value="%s" ',
- $this->type,
                                                                                         $this->name,
                                                                                         $this->value
                                                                                 );

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>