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: text.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
20
// $Id: text.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 text field
25
 * HTML class for a text field
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_text extends HTML_QuickForm_input
33
class HTML_QuickForm_text extends HTML_QuickForm_input
34
{
34
{
35
                
35
                
36
    // {{{ constructor
36
    // {{{ constructor
37
 
37
 
38
    /**
38
    /**
39
     * Class constructor
39
     * Class constructor
40
     * 
40
     * 
41
     * @param     string    $elementName    (optional)Input field name attribute
41
     * @param     string    $elementName    (optional)Input field name attribute
42
     * @param     string    $elementLabel   (optional)Input field label
42
     * @param     string    $elementLabel   (optional)Input field label
43
     * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
43
     * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
44
     *                                      or an associative array
44
     *                                      or an associative array
45
     * @since     1.0
45
     * @since     1.0
46
     * @access    public
46
     * @access    public
47
     * @return    void
47
     * @return    void
48
     */
48
     */
49
    function HTML_QuickForm_text($elementName=null, $elementLabel=null, $attributes=null)
49
    function HTML_QuickForm_text($elementName=null, $elementLabel=null, $attributes=null)
50
    {
50
    {
51
        HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
51
        HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
52
        $this->_persistantFreeze = true;
52
        $this->_persistantFreeze = true;
53
        $this->setType('text');
53
        $this->setType('text');
54
    } //end constructor
54
    } //end constructor
55
        
55
        
56
    // }}}
56
    // }}}
57
    // {{{ setSize()
57
    // {{{ setSize()
58
 
58
 
59
    /**
59
    /**
60
     * Sets size of text field
60
     * Sets size of text field
61
     * 
61
     * 
62
     * @param     string    $size  Size of text field
62
     * @param     string    $size  Size of text field
63
     * @since     1.3
63
     * @since     1.3
64
     * @access    public
64
     * @access    public
65
     * @return    void
65
     * @return    void
66
     */
66
     */
67
    function setSize($size)
67
    function setSize($size)
68
    {
68
    {
69
        $this->updateAttributes(array('size'=>$size));
69
        $this->updateAttributes(array('size'=>$size));
70
    } //end func setSize
70
    } //end func setSize
71
 
71
 
72
    // }}}
72
    // }}}
73
    // {{{ setMaxlength()
73
    // {{{ setMaxlength()
74
 
74
 
75
    /**
75
    /**
76
     * Sets maxlength of text field
76
     * Sets maxlength of text field
77
     * 
77
     * 
78
     * @param     string    $maxlength  Maximum length of text field
78
     * @param     string    $maxlength  Maximum length of text field
79
     * @since     1.3
79
     * @since     1.3
80
     * @access    public
80
     * @access    public
81
     * @return    void
81
     * @return    void
82
     */
82
     */
83
    function setMaxlength($maxlength)
83
    function setMaxlength($maxlength)
84
    {
84
    {
85
        $this->updateAttributes(array('maxlength'=>$maxlength));
85
        $this->updateAttributes(array('maxlength'=>$maxlength));
86
    } //end func setMaxlength
86
    } //end func setMaxlength
87
 
87
 
88
    // }}}
88
    // }}}
89
    
89
    
90
} //end class HTML_QuickForm_text
90
} //end class HTML_QuickForm_text
91
?>
91
?>