equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_View |
16 * @package Zend_View |
17 * @subpackage Helper |
17 * @subpackage Helper |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: FormText.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: FormText.php 24750 2012-05-05 01:24:21Z adamlundrigan $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** |
24 /** |
25 * Abstract class for extension |
25 * Abstract class for extension |
31 * Helper to generate a "text" element |
31 * Helper to generate a "text" element |
32 * |
32 * |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_View |
34 * @package Zend_View |
35 * @subpackage Helper |
35 * @subpackage Helper |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_View_Helper_FormText extends Zend_View_Helper_FormElement |
39 class Zend_View_Helper_FormText extends Zend_View_Helper_FormElement |
40 { |
40 { |
41 /** |
41 /** |
63 if ($disable) { |
63 if ($disable) { |
64 // disabled |
64 // disabled |
65 $disabled = ' disabled="disabled"'; |
65 $disabled = ' disabled="disabled"'; |
66 } |
66 } |
67 |
67 |
68 // XHTML or HTML end tag? |
|
69 $endTag = ' />'; |
|
70 if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) { |
|
71 $endTag= '>'; |
|
72 } |
|
73 |
|
74 $xhtml = '<input type="text"' |
68 $xhtml = '<input type="text"' |
75 . ' name="' . $this->view->escape($name) . '"' |
69 . ' name="' . $this->view->escape($name) . '"' |
76 . ' id="' . $this->view->escape($id) . '"' |
70 . ' id="' . $this->view->escape($id) . '"' |
77 . ' value="' . $this->view->escape($value) . '"' |
71 . ' value="' . $this->view->escape($value) . '"' |
78 . $disabled |
72 . $disabled |
79 . $this->_htmlAttribs($attribs) |
73 . $this->_htmlAttribs($attribs) |
80 . $endTag; |
74 . $this->getClosingBracket(); |
81 |
75 |
82 return $xhtml; |
76 return $xhtml; |
83 } |
77 } |
84 } |
78 } |