| @@ 35-89 (lines=55) @@ | ||
| 32 | * @version Release: 3.2.11 |
|
| 33 | * @since 1.0 |
|
| 34 | */ |
|
| 35 | class HTML_QuickForm_hidden extends HTML_QuickForm_input |
|
| 36 | { |
|
| 37 | // {{{ constructor |
|
| 38 | ||
| 39 | /** |
|
| 40 | * Class constructor |
|
| 41 | * |
|
| 42 | * @param string $elementName (optional)Input field name attribute |
|
| 43 | * @param string $value (optional)Input field value |
|
| 44 | * @param mixed $attributes (optional)Either a typical HTML attribute string |
|
| 45 | * or an associative array |
|
| 46 | * @since 1.0 |
|
| 47 | * @access public |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function __construct($elementName = null, $value = '', $attributes = null) |
|
| 51 | { |
|
| 52 | parent::__construct($elementName, null, $attributes); |
|
| 53 | $this->setType('hidden'); |
|
| 54 | $this->setValue($value); |
|
| 55 | } //end constructor |
|
| 56 | ||
| 57 | // }}} |
|
| 58 | // {{{ freeze() |
|
| 59 | ||
| 60 | /** |
|
| 61 | * Freeze the element so that only its value is returned |
|
| 62 | * |
|
| 63 | * @access public |
|
| 64 | * @return void |
|
| 65 | */ |
|
| 66 | function freeze() |
|
| 67 | { |
|
| 68 | return false; |
|
| 69 | } //end func freeze |
|
| 70 | ||
| 71 | // }}} |
|
| 72 | // {{{ accept() |
|
| 73 | ||
| 74 | /** |
|
| 75 | * Accepts a renderer |
|
| 76 | * |
|
| 77 | * @param HTML_QuickForm_Renderer renderer object |
|
| 78 | * @access public |
|
| 79 | * @return void |
|
| 80 | */ |
|
| 81 | //function accept(&$renderer) |
|
| 82 | function accept(&$renderer, $required=false, $error=null) |
|
| 83 | { |
|
| 84 | $renderer->renderHidden($this); |
|
| 85 | } // end func accept |
|
| 86 | ||
| 87 | // }}} |
|
| 88 | ||
| 89 | } //end class HTML_QuickForm_hidden |
|
| 90 | ?> |
|
| 91 | ||
| @@ 35-83 (lines=49) @@ | ||
| 32 | * @version Release: 3.2.11 |
|
| 33 | * @since 1.0 |
|
| 34 | */ |
|
| 35 | class HTML_QuickForm_submit extends HTML_QuickForm_input |
|
| 36 | { |
|
| 37 | // {{{ constructor |
|
| 38 | ||
| 39 | /** |
|
| 40 | * Class constructor |
|
| 41 | * |
|
| 42 | * @param string Input field name attribute |
|
| 43 | * @param string Input field value |
|
| 44 | * @param mixed Either a typical HTML attribute string or an associative array |
|
| 45 | * @since 1.0 |
|
| 46 | * @access public |
|
| 47 | * @return void |
|
| 48 | */ |
|
| 49 | public function __construct($elementName=null, $value=null, $attributes=null) |
|
| 50 | { |
|
| 51 | parent::__construct($elementName, null, $attributes); |
|
| 52 | $this->setValue($value); |
|
| 53 | $this->setType('submit'); |
|
| 54 | } //end constructor |
|
| 55 | ||
| 56 | // }}} |
|
| 57 | // {{{ freeze() |
|
| 58 | ||
| 59 | /** |
|
| 60 | * Freeze the element so that only its value is returned |
|
| 61 | * |
|
| 62 | * @access public |
|
| 63 | * @return void |
|
| 64 | */ |
|
| 65 | function freeze() |
|
| 66 | { |
|
| 67 | return false; |
|
| 68 | } //end func freeze |
|
| 69 | ||
| 70 | // }}} |
|
| 71 | // {{{ exportValue() |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Only return the value if it is found within $submitValues (i.e. if |
|
| 75 | * this particular submit button was clicked) |
|
| 76 | */ |
|
| 77 | function exportValue(&$submitValues, $assoc = false) |
|
| 78 | { |
|
| 79 | return $this->_prepareValue($this->_findValue($submitValues), $assoc); |
|
| 80 | } |
|
| 81 | ||
| 82 | // }}} |
|
| 83 | } //end class HTML_QuickForm_submit |
|
| 84 | ?> |
|
| 85 | ||