cvs: peardoc /en/package/html/html-quickform-advmultiselect/appendix examples-basic1.xml examples-custom1.xml examples-custom5.xml examples-custom7.xml examples-multiple1.xml examples-multiple2.xml examples-template1.xml

[email protected] ("Laurent Laville")
Newsgroups php.pear.doc
Message-ID <cvsfarell1233181514@cvsserver>
farell		Wed Jan 28 22:25:14 2009 UTC

  Modified files:              
    /peardoc/en/package/html/html-quickform-advmultiselect/appendix	
                                                                   	examples-basic1.xml 
                                                                   	examples-custom1.xml 
                                                                   	examples-custom5.xml 
                                                                   	examples-custom7.xml 
                                                                   	examples-multiple1.xml 
                                                                   	examples-multiple2.xml 
                                                                   	examples-template1.xml 
  Log:
  clean up unecessary code (into examples)
farell-20090128222514.txt (text/plain, 10.9 KB)
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-basic1.xml	Wed Jan 28 22:25:14 2009
@@ -29,7 +29,7 @@
  * Basic advMultiSelect HTML_QuickForm element
  * without any customization.
  *
- * @version    $Id: examples-basic1.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-basic1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -63,12 +63,7 @@
 
 $form->addElement('advmultiselect', 'cars', 'Cars:', $car_array);
 
-if (isset($_POST['cars'])) {
-    $form->setDefaults(array('cars' => $_POST['cars']));
-}
-
 $form->addElement('submit', 'send', 'Send');
-
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom1.xml	Wed Jan 28 22:25:14 2009
@@ -48,7 +48,7 @@
  * The template allows to add label as headers of dual select box
  * and moves the button to another location (below each select box).
  *
- * @version    $Id: examples-custom1.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-custom1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -107,12 +107,7 @@
 </table>';
 $ams->setElementTemplate($template);
 
-if (isset($_POST['fruit'])) {
-    $form->setDefaults(array('fruit' => $_POST['fruit']));
-}
-
 $form->addElement('submit', 'send', 'Send');
-
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom5.xml	Wed Jan 28 22:25:14 2009
@@ -36,7 +36,7 @@
  * Custom advMultiSelect HTML_QuickForm element
  * that allows to manage sort of select boxes.
  *
- * @version    $Id: examples-custom5.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-custom5.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -121,10 +121,6 @@
 if ($_SERVER['REQUEST_METHOD'] == 'GET') {
     // fruit default values already selected without any end-user actions
     $form->setDefaults(array('fruit' => array('kiwi','lime')));
-
-} elseif (isset($_POST['fruit'])) {
-    // fruit end-user selection
-    $form->setDefaults(array('fruit' => $_POST['fruit']));
 }
 
 $buttons[] =& $form->createElement('submit', null, 'Submit');
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-custom7.xml	Wed Jan 28 22:25:14 2009
@@ -36,7 +36,7 @@
  * Custom advMultiSelect HTML_QuickForm element
  * with extended buttons (select all, select none, toggle selection)
  *
- * @version    $Id: examples-custom7.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-custom7.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -117,10 +117,6 @@
 if ($_SERVER['REQUEST_METHOD'] == 'GET') {
     // fruit default values already selected without any end-user actions
     $form->setDefaults(array('fruit' => array('kiwi','lime')));
-
-} elseif (isset($_POST['fruit'])) {
-    // fruit end-user selection
-    $form->setDefaults(array('fruit' => $_POST['fruit']));
 }
 
 $buttons[] =& $form->createElement('submit', null, 'Submit');
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple1.xml	Wed Jan 28 22:25:14 2009
@@ -36,7 +36,7 @@
  * Mixed advMultiSelect HTML_QuickForm elements.
  * Two widgets on the same page/form with each its own javascript function
  *
- * @version    $Id: examples-multiple1.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-multiple1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -82,10 +82,6 @@
 
 $ams1 =& $form->addElement('advmultiselect', 'cars', 'Cars:', $car_array);
 
-if (isset($_POST['cars'])) {
-    $form->setDefaults(array('cars' => $_POST['cars']));
-}
-
 // rendering with css selectors and API selLabel(), setButtonAttributes()
 $form->addElement('header', null, 'Advanced Multiple Select: custom layout ');
 
@@ -103,12 +99,7 @@
                                            'class' => 'inputCommand'
 ));
 
-if (isset($_POST['fruit'])) {
-    $form->setDefaults(array('fruit' => $_POST['fruit']));
-}
-
 $form->addElement('submit', 'send', 'Send');
-
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-multiple2.xml	Wed Jan 28 22:25:14 2009
@@ -40,7 +40,7 @@
  * that can be display in one or two select box mode.
  * This example demonstrate the new feature of version 1.3.0 : Live Counter
  *
- * @version    $Id: examples-multiple2.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-multiple2.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -130,10 +130,6 @@
     $ams1->setElementTemplate($template1);
 }
 
-if (isset($_POST['cars'])) {
-    $defaults = array('cars' => $_POST['cars']);
-}
-
 // second QF ams element
 $form->addElement('header', null, 'Advanced Multiple Select: Live Counter - pool2 style ');
 
@@ -155,10 +151,6 @@
     $ams2->setElementTemplate($template1);
 }
 
-if (isset($_POST['fruit'])) {
-    $defaults = array_merge($defaults, array('fruit' => $_POST['fruit']));
-}
-
 $buttons[] =& $form->createElement('submit', null, 'Submit');
 $buttons[] =& $form->createElement('reset',  null, 'Reset');
 $buttons[] =& $form->createElement('checkbox', 'multiselect1', null,
@@ -166,10 +158,6 @@
 $buttons[] =& $form->createElement('checkbox', 'multiselect2', null,
                                    'fruit list dual select');
 $form->addGroup($buttons);
-
-if (count($defaults) > 0) {
-    $form->setDefaults($defaults);
-}
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml?r1=1.1&r2=1.2&diff_format=u
Index: peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml
diff -u peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml:1.1 peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml:1.2
--- peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml:1.1	Sat Jan 24 10:51:48 2009
+++ peardoc/en/package/html/html-quickform-advmultiselect/appendix/examples-template1.xml	Wed Jan 28 22:25:14 2009
@@ -36,7 +36,7 @@
  * Custom advMultiSelect HTML_QuickForm element
  * embedded into a Sigma template and using the QF dynamic renderer.
  *
- * @version    $Id: examples-template1.xml,v 1.1 2009/01/24 10:51:48 farell Exp $
+ * @version    $Id: examples-template1.xml,v 1.2 2009/01/28 22:25:14 farell Exp $
  * @author     Laurent Laville <[email protected]>
  * @package    HTML_QuickForm_advmultiselect
  * @subpackage Examples
@@ -97,10 +97,6 @@
 ';
 $ams->setElementTemplate($template);
 
-if (isset($_POST['fruit'])) {
-    $form->setDefaults(array('fruit' => $_POST['fruit']));
-}
-
 $form->addElement('submit', 'send', 'Send', array('class' => 'inputCommand'));
 
 $form->addRule('name', 'Your name is required', 'required');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.