]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dmca/files/default/html/HTML/QuickForm/submit.php
split configuration in two, include new templates
[chef.git] / cookbooks / dmca / files / default / html / HTML / QuickForm / submit.php
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
4 /**
5  * HTML class for a submit type element
6  * 
7  * PHP versions 4 and 5
8  *
9  * LICENSE: This source file is subject to version 3.01 of the PHP license
10  * that is available through the world-wide-web at the following URI:
11  * http://www.php.net/license/3_01.txt If you did not receive a copy of
12  * the PHP License and are unable to obtain it through the web, please
13  * send a note to license@php.net so we can mail you a copy immediately.
14  *
15  * @category    HTML
16  * @package     HTML_QuickForm
17  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
18  * @author      Bertrand Mansion <bmansion@mamasam.com>
19  * @copyright   2001-2011 The PHP Group
20  * @license     http://www.php.net/license/3_01.txt PHP License 3.01
21  * @version     CVS: $Id$
22  * @link        http://pear.php.net/package/HTML_QuickForm
23  */
24
25 /**
26  * Base class for <input /> form elements
27  */
28 require_once 'HTML/QuickForm/input.php';
29
30 /**
31  * HTML class for a submit type element
32  * 
33  * @category    HTML
34  * @package     HTML_QuickForm
35  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
36  * @author      Bertrand Mansion <bmansion@mamasam.com>
37  * @version     Release: 3.2.16
38  * @since       1.0
39  */
40 class HTML_QuickForm_submit extends HTML_QuickForm_input
41 {
42     // {{{ constructor
43
44     /**
45      * Class constructor
46      * 
47      * @param     string    Input field name attribute
48      * @param     string    Input field value
49      * @param     mixed     Either a typical HTML attribute string or an associative array
50      * @since     1.0
51      * @access    public
52      * @return    void
53      */
54     function HTML_QuickForm_submit($elementName=null, $value=null, $attributes=null)
55     {
56         HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
57         $this->setValue($value);
58         $this->setType('submit');
59     } //end constructor
60     
61     // }}}
62     // {{{ freeze()
63
64     /**
65      * Freeze the element so that only its value is returned
66      * 
67      * @access    public
68      * @return    void
69      */
70     function freeze()
71     {
72         return false;
73     } //end func freeze
74
75     // }}}
76     // {{{ exportValue()
77
78    /**
79     * Only return the value if it is found within $submitValues (i.e. if
80     * this particular submit button was clicked)
81     */
82     function exportValue(&$submitValues, $assoc = false)
83     {
84         return $this->_prepareValue($this->_findValue($submitValues), $assoc);
85     }
86
87     // }}}
88 } //end class HTML_QuickForm_submit
89 ?>