Subversion Repositories Applications.papyrus

Rev

Rev 320 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
1
<?php
1
<?php
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
2
/* vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +----------------------------------------------------------------------+
3
// +----------------------------------------------------------------------+
4
// | PHP version 4.0                                                      |
4
// | PHP version 4.0                                                      |
5
// +----------------------------------------------------------------------+
5
// +----------------------------------------------------------------------+
6
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
6
// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
7
// +----------------------------------------------------------------------+
7
// +----------------------------------------------------------------------+
8
// | This source file is subject to version 2.0 of the PHP license,       |
8
// | This source file is subject to version 2.0 of the PHP license,       |
9
// | that is bundled with this package in the file LICENSE, and is        |
9
// | that is bundled with this package in the file LICENSE, and is        |
10
// | available at through the world-wide-web at                           |
10
// | available at through the world-wide-web at                           |
11
// | http://www.php.net/license/2_02.txt.                                 |
11
// | http://www.php.net/license/2_02.txt.                                 |
12
// | If you did not receive a copy of the PHP license and are unable to   |
12
// | If you did not receive a copy of the PHP license and are unable to   |
13
// | obtain it through the world-wide-web, please send a note to          |
13
// | obtain it through the world-wide-web, please send a note to          |
14
// | license@php.net so we can mail you a copy immediately.               |
14
// | license@php.net so we can mail you a copy immediately.               |
15
// +----------------------------------------------------------------------+
15
// +----------------------------------------------------------------------+
16
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com>                        |
16
// | Authors: Adam Daniel <adaniel1@eesus.jnj.com>                        |
17
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
17
// |          Bertrand Mansion <bmansion@mamasam.com>                     |
18
// +----------------------------------------------------------------------+
18
// +----------------------------------------------------------------------+
19
//
19
//
20
// $Id: submit.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
20
// $Id: submit.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
21
 
21
 
22
require_once("HTML/QuickForm/input.php");
22
require_once("HTML/QuickForm/input.php");
23
 
23
 
24
/**
24
/**
25
 * HTML class for a submit type element
25
 * HTML class for a submit type element
26
 * 
26
 * 
27
 * @author       Adam Daniel <adaniel1@eesus.jnj.com>
27
 * @author       Adam Daniel <adaniel1@eesus.jnj.com>
28
 * @author       Bertrand Mansion <bmansion@mamasam.com>
28
 * @author       Bertrand Mansion <bmansion@mamasam.com>
29
 * @version      1.0
29
 * @version      1.0
30
 * @since        PHP4.04pl1
30
 * @since        PHP4.04pl1
31
 * @access       public
31
 * @access       public
32
 */
32
 */
33
class HTML_QuickForm_submit extends HTML_QuickForm_input
33
class HTML_QuickForm_submit extends HTML_QuickForm_input
34
{
34
{
35
    // {{{ constructor
35
    // {{{ constructor
36
 
36
 
37
    /**
37
    /**
38
     * Class constructor
38
     * Class constructor
39
     * 
39
     * 
40
     * @param     string    Input field name attribute
40
     * @param     string    Input field name attribute
41
     * @param     string    Input field value
41
     * @param     string    Input field value
42
     * @param     mixed     Either a typical HTML attribute string or an associative array
42
     * @param     mixed     Either a typical HTML attribute string or an associative array
43
     * @since     1.0
43
     * @since     1.0
44
     * @access    public
44
     * @access    public
45
     * @return    void
45
     * @return    void
46
     */
46
     */
47
    function HTML_QuickForm_submit($elementName=null, $value=null, $attributes=null)
47
    function HTML_QuickForm_submit($elementName=null, $value=null, $attributes=null)
48
    {
48
    {
49
        HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
49
        HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
50
        $this->setValue($value);
50
        $this->setValue($value);
51
        $this->setType('submit');
51
        $this->setType('submit');
52
    } //end constructor
52
    } //end constructor
53
    
53
    
54
    // }}}
54
    // }}}
55
    // {{{ freeze()
55
    // {{{ freeze()
56
 
56
 
57
    /**
57
    /**
58
     * Freeze the element so that only its value is returned
58
     * Freeze the element so that only its value is returned
59
     * 
59
     * 
60
     * @access    public
60
     * @access    public
61
     * @return    void
61
     * @return    void
62
     */
62
     */
63
    function freeze()
63
    function freeze()
64
    {
64
    {
65
        return false;
65
        return false;
66
    } //end func freeze
66
    } //end func freeze
67
 
67
 
68
    // }}}
68
    // }}}
69
    // {{{ exportValue()
69
    // {{{ exportValue()
70
 
70
 
71
   /**
71
   /**
72
    * Only return the value if it is found within $submitValues (i.e. if
72
    * Only return the value if it is found within $submitValues (i.e. if
73
    * this particular submit button was clicked)
73
    * this particular submit button was clicked)
74
    */
74
    */
75
    function exportValue(&$submitValues, $assoc = false)
75
    function exportValue(&$submitValues, $assoc = false)
76
    {
76
    {
77
        return $this->_prepareValue($this->_findValue($submitValues), $assoc);
77
        return $this->_prepareValue($this->_findValue($submitValues), $assoc);
78
    }
78
    }
79
 
79
 
80
    // }}}
80
    // }}}
81
} //end class HTML_QuickForm_submit
81
} //end class HTML_QuickForm_submit
82
?>
82
?>