@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | * @param array $options |
| 15 | 15 | */ |
| 16 | 16 | public function __construct($options = array()){ |
| 17 | - $options['html_label_text'] = ! empty($options['html_label_text']) |
|
| 18 | - ? $options['html_label_text'] |
|
| 19 | - : $options['default']; |
|
| 17 | + $options['html_label_text'] = ! empty($options['html_label_text']) |
|
| 18 | + ? $options['html_label_text'] |
|
| 19 | + : $options['default']; |
|
| 20 | 20 | $this->_set_display_strategy(new EE_Submit_Input_Display_Strategy()); |
| 21 | 21 | $this->_set_normalization_strategy(new EE_Text_Normalization()); |
| 22 | 22 | $this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() ); |
@@ -25,36 +25,36 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | |
| 27 | 27 | |
| 28 | - /** |
|
| 29 | - * Sets the default as normal (overriden so it can circumvent calling |
|
| 30 | - * EE_Submit_Input::_normalize() and EE_Submit_Input::_set_raw_value()) |
|
| 31 | - * @param mixed $value |
|
| 32 | - */ |
|
| 28 | + /** |
|
| 29 | + * Sets the default as normal (overriden so it can circumvent calling |
|
| 30 | + * EE_Submit_Input::_normalize() and EE_Submit_Input::_set_raw_value()) |
|
| 31 | + * @param mixed $value |
|
| 32 | + */ |
|
| 33 | 33 | public function set_default($value) |
| 34 | - { |
|
| 35 | - parent::_set_normalized_value($value); |
|
| 36 | - parent::_set_raw_value($value); |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - |
|
| 40 | - |
|
| 41 | - /** |
|
| 42 | - * Does nothing, because it's actually not expected for submit input's values to change. |
|
| 43 | - * If you want to change the input's value displayed, use `set_default()` |
|
| 44 | - * @param array $req_data |
|
| 45 | - * @return void |
|
| 46 | - */ |
|
| 47 | - public function _normalize($req_data) |
|
| 48 | - { |
|
| 49 | - return; |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - /** |
|
| 53 | - * Does nothing, because it's actually not expected for submit input's values to change. |
|
| 54 | - * If you want to change the input's value displayed, use `set_default()` |
|
| 55 | - */ |
|
| 56 | - public function _set_raw_value($value) |
|
| 57 | - { |
|
| 58 | - return; |
|
| 59 | - } |
|
| 34 | + { |
|
| 35 | + parent::_set_normalized_value($value); |
|
| 36 | + parent::_set_raw_value($value); |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + |
|
| 40 | + |
|
| 41 | + /** |
|
| 42 | + * Does nothing, because it's actually not expected for submit input's values to change. |
|
| 43 | + * If you want to change the input's value displayed, use `set_default()` |
|
| 44 | + * @param array $req_data |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 47 | + public function _normalize($req_data) |
|
| 48 | + { |
|
| 49 | + return; |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + /** |
|
| 53 | + * Does nothing, because it's actually not expected for submit input's values to change. |
|
| 54 | + * If you want to change the input's value displayed, use `set_default()` |
|
| 55 | + */ |
|
| 56 | + public function _set_raw_value($value) |
|
| 57 | + { |
|
| 58 | + return; |
|
| 59 | + } |
|
| 60 | 60 | } |
@@ -8,18 +8,18 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * This input has a default validation strategy of plaintext (which can be removed after construction) |
| 10 | 10 | */ |
| 11 | -class EE_Submit_Input extends EE_Form_Input_Base{ |
|
| 11 | +class EE_Submit_Input extends EE_Form_Input_Base { |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * @param array $options |
| 15 | 15 | */ |
| 16 | - public function __construct($options = array()){ |
|
| 16 | + public function __construct($options = array()) { |
|
| 17 | 17 | $options['html_label_text'] = ! empty($options['html_label_text']) |
| 18 | 18 | ? $options['html_label_text'] |
| 19 | 19 | : $options['default']; |
| 20 | 20 | $this->_set_display_strategy(new EE_Submit_Input_Display_Strategy()); |
| 21 | 21 | $this->_set_normalization_strategy(new EE_Text_Normalization()); |
| 22 | - $this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() ); |
|
| 22 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
| 23 | 23 | parent::__construct($options); |
| 24 | 24 | } |
| 25 | 25 | |