@@ -9,15 +9,15 @@ |
||
9 | 9 | class EE_Select_Multiple_Input extends EE_Form_Input_With_Options_Base |
10 | 10 | { |
11 | 11 | |
12 | - /** |
|
13 | - * @param array | EE_Question_Option[] $answer_options |
|
14 | - * @param array $input_settings |
|
15 | - */ |
|
16 | - public function __construct($answer_options, $input_settings = array()) |
|
17 | - { |
|
18 | - $this->_set_display_strategy(new EE_Select_Multiple_Display_Strategy()); |
|
19 | - $this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array( new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : null) ))); |
|
20 | - $this->_multiple_selections = true; |
|
21 | - parent::__construct($answer_options, $input_settings); |
|
22 | - } |
|
12 | + /** |
|
13 | + * @param array | EE_Question_Option[] $answer_options |
|
14 | + * @param array $input_settings |
|
15 | + */ |
|
16 | + public function __construct($answer_options, $input_settings = array()) |
|
17 | + { |
|
18 | + $this->_set_display_strategy(new EE_Select_Multiple_Display_Strategy()); |
|
19 | + $this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array( new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : null) ))); |
|
20 | + $this->_multiple_selections = true; |
|
21 | + parent::__construct($answer_options, $input_settings); |
|
22 | + } |
|
23 | 23 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | public function __construct($answer_options, $input_settings = array()) |
17 | 17 | { |
18 | 18 | $this->_set_display_strategy(new EE_Select_Multiple_Display_Strategy()); |
19 | - $this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array( new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : null) ))); |
|
19 | + $this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array(new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : null)))); |
|
20 | 20 | $this->_multiple_selections = true; |
21 | 21 | parent::__construct($answer_options, $input_settings); |
22 | 22 | } |
@@ -14,64 +14,64 @@ |
||
14 | 14 | class EE_Select_Reveal_Input extends EE_Select_Input |
15 | 15 | { |
16 | 16 | |
17 | - /** |
|
18 | - * @param array $answer_options Array keys which match a sibling section's name |
|
19 | - * will show/unhide that sibling subsection. Otherwise, siblings whose names |
|
20 | - * match array keys of $answer_options are hidden. |
|
21 | - * Note: internally each array key is considered a relative form input path |
|
22 | - * (see EE_Form_Section_Base::find_section_from_path) but relative |
|
23 | - * to THIS INPUT's PARENT section, not this input itself. ie, |
|
24 | - * a '../' is automatically added onto each each array key, to produce |
|
25 | - * the relative form input path. |
|
26 | - * Note however: array keys which are an EMPTY STRING are left as-is |
|
27 | - * |
|
28 | - * @param array $input_settings |
|
29 | - */ |
|
30 | - public function __construct($answer_options, $input_settings = array()) |
|
31 | - { |
|
32 | - parent::__construct($answer_options, $input_settings); |
|
33 | - } |
|
17 | + /** |
|
18 | + * @param array $answer_options Array keys which match a sibling section's name |
|
19 | + * will show/unhide that sibling subsection. Otherwise, siblings whose names |
|
20 | + * match array keys of $answer_options are hidden. |
|
21 | + * Note: internally each array key is considered a relative form input path |
|
22 | + * (see EE_Form_Section_Base::find_section_from_path) but relative |
|
23 | + * to THIS INPUT's PARENT section, not this input itself. ie, |
|
24 | + * a '../' is automatically added onto each each array key, to produce |
|
25 | + * the relative form input path. |
|
26 | + * Note however: array keys which are an EMPTY STRING are left as-is |
|
27 | + * |
|
28 | + * @param array $input_settings |
|
29 | + */ |
|
30 | + public function __construct($answer_options, $input_settings = array()) |
|
31 | + { |
|
32 | + parent::__construct($answer_options, $input_settings); |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * Gets all the sibling sections controlled by this reveal select input |
|
37 | - * @return \EE_Form_Section_Base[] keys are their form section paths |
|
38 | - */ |
|
39 | - public function sibling_sections_controlled() |
|
40 | - { |
|
41 | - $sibling_sections = array(); |
|
42 | - foreach ($this->options() as $sibling_section_name => $sibling_section) { |
|
43 | - // if it's an empty string just leave it alone |
|
44 | - if (empty($sibling_section_name)) { |
|
45 | - continue; |
|
46 | - } |
|
47 | - $sibling_section = $this->find_section_from_path('../' . $sibling_section_name); |
|
48 | - if ($sibling_section instanceof EE_Form_Section_Base |
|
49 | - && ! empty($sibling_section_name) |
|
50 | - ) { |
|
51 | - $sibling_sections[ $sibling_section_name ] = $sibling_section; |
|
52 | - } |
|
53 | - } |
|
54 | - return $sibling_sections; |
|
55 | - } |
|
35 | + /** |
|
36 | + * Gets all the sibling sections controlled by this reveal select input |
|
37 | + * @return \EE_Form_Section_Base[] keys are their form section paths |
|
38 | + */ |
|
39 | + public function sibling_sections_controlled() |
|
40 | + { |
|
41 | + $sibling_sections = array(); |
|
42 | + foreach ($this->options() as $sibling_section_name => $sibling_section) { |
|
43 | + // if it's an empty string just leave it alone |
|
44 | + if (empty($sibling_section_name)) { |
|
45 | + continue; |
|
46 | + } |
|
47 | + $sibling_section = $this->find_section_from_path('../' . $sibling_section_name); |
|
48 | + if ($sibling_section instanceof EE_Form_Section_Base |
|
49 | + && ! empty($sibling_section_name) |
|
50 | + ) { |
|
51 | + $sibling_sections[ $sibling_section_name ] = $sibling_section; |
|
52 | + } |
|
53 | + } |
|
54 | + return $sibling_sections; |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * Adds an entry of 'select_reveal_inputs' to the js data, which is an array |
|
59 | - * whose top-level keys are select reveal input html ids; values are arrays |
|
60 | - * whose keys are select option values and values are the sections they reveal |
|
61 | - * @param array $form_other_js_data |
|
62 | - * @return array |
|
63 | - */ |
|
64 | - public function get_other_js_data($form_other_js_data = array()) |
|
65 | - { |
|
66 | - $form_other_js_data = parent::get_other_js_data($form_other_js_data); |
|
67 | - if (! isset($form_other_js_data['select_reveal_inputs'])) { |
|
68 | - $form_other_js_data['select_reveal_inputs'] = array(); |
|
69 | - } |
|
70 | - $sibling_input_to_html_id_map = array(); |
|
71 | - foreach ($this->sibling_sections_controlled() as $sibling_section_path => $sibling_section) { |
|
72 | - $sibling_input_to_html_id_map[ $sibling_section_path ] = $sibling_section->html_id(); |
|
73 | - } |
|
74 | - $form_other_js_data['select_reveal_inputs'][ $this->html_id() ] = $sibling_input_to_html_id_map; |
|
75 | - return $form_other_js_data; |
|
76 | - } |
|
57 | + /** |
|
58 | + * Adds an entry of 'select_reveal_inputs' to the js data, which is an array |
|
59 | + * whose top-level keys are select reveal input html ids; values are arrays |
|
60 | + * whose keys are select option values and values are the sections they reveal |
|
61 | + * @param array $form_other_js_data |
|
62 | + * @return array |
|
63 | + */ |
|
64 | + public function get_other_js_data($form_other_js_data = array()) |
|
65 | + { |
|
66 | + $form_other_js_data = parent::get_other_js_data($form_other_js_data); |
|
67 | + if (! isset($form_other_js_data['select_reveal_inputs'])) { |
|
68 | + $form_other_js_data['select_reveal_inputs'] = array(); |
|
69 | + } |
|
70 | + $sibling_input_to_html_id_map = array(); |
|
71 | + foreach ($this->sibling_sections_controlled() as $sibling_section_path => $sibling_section) { |
|
72 | + $sibling_input_to_html_id_map[ $sibling_section_path ] = $sibling_section->html_id(); |
|
73 | + } |
|
74 | + $form_other_js_data['select_reveal_inputs'][ $this->html_id() ] = $sibling_input_to_html_id_map; |
|
75 | + return $form_other_js_data; |
|
76 | + } |
|
77 | 77 | } |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | if (empty($sibling_section_name)) { |
45 | 45 | continue; |
46 | 46 | } |
47 | - $sibling_section = $this->find_section_from_path('../' . $sibling_section_name); |
|
47 | + $sibling_section = $this->find_section_from_path('../'.$sibling_section_name); |
|
48 | 48 | if ($sibling_section instanceof EE_Form_Section_Base |
49 | 49 | && ! empty($sibling_section_name) |
50 | 50 | ) { |
51 | - $sibling_sections[ $sibling_section_name ] = $sibling_section; |
|
51 | + $sibling_sections[$sibling_section_name] = $sibling_section; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | return $sibling_sections; |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | public function get_other_js_data($form_other_js_data = array()) |
65 | 65 | { |
66 | 66 | $form_other_js_data = parent::get_other_js_data($form_other_js_data); |
67 | - if (! isset($form_other_js_data['select_reveal_inputs'])) { |
|
67 | + if ( ! isset($form_other_js_data['select_reveal_inputs'])) { |
|
68 | 68 | $form_other_js_data['select_reveal_inputs'] = array(); |
69 | 69 | } |
70 | 70 | $sibling_input_to_html_id_map = array(); |
71 | 71 | foreach ($this->sibling_sections_controlled() as $sibling_section_path => $sibling_section) { |
72 | - $sibling_input_to_html_id_map[ $sibling_section_path ] = $sibling_section->html_id(); |
|
72 | + $sibling_input_to_html_id_map[$sibling_section_path] = $sibling_section->html_id(); |
|
73 | 73 | } |
74 | - $form_other_js_data['select_reveal_inputs'][ $this->html_id() ] = $sibling_input_to_html_id_map; |
|
74 | + $form_other_js_data['select_reveal_inputs'][$this->html_id()] = $sibling_input_to_html_id_map; |
|
75 | 75 | return $form_other_js_data; |
76 | 76 | } |
77 | 77 | } |
@@ -12,17 +12,17 @@ |
||
12 | 12 | class EE_Year_Input extends EE_Select_Input |
13 | 13 | { |
14 | 14 | |
15 | - public function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0) |
|
16 | - { |
|
17 | - if ($four_digit_year) { |
|
18 | - $current_year_int = intval(date('Y')); |
|
19 | - } else { |
|
20 | - $current_year_int = intval(date('y')); |
|
21 | - } |
|
22 | - $answer_options = array(); |
|
23 | - for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) { |
|
24 | - $answer_options[ $start ] = $start; |
|
25 | - } |
|
26 | - parent::__construct($answer_options, $input_settings); |
|
27 | - } |
|
15 | + public function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0) |
|
16 | + { |
|
17 | + if ($four_digit_year) { |
|
18 | + $current_year_int = intval(date('Y')); |
|
19 | + } else { |
|
20 | + $current_year_int = intval(date('y')); |
|
21 | + } |
|
22 | + $answer_options = array(); |
|
23 | + for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) { |
|
24 | + $answer_options[ $start ] = $start; |
|
25 | + } |
|
26 | + parent::__construct($answer_options, $input_settings); |
|
27 | + } |
|
28 | 28 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | } |
22 | 22 | $answer_options = array(); |
23 | 23 | for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) { |
24 | - $answer_options[ $start ] = $start; |
|
24 | + $answer_options[$start] = $start; |
|
25 | 25 | } |
26 | 26 | parent::__construct($answer_options, $input_settings); |
27 | 27 | } |
@@ -11,23 +11,23 @@ |
||
11 | 11 | class EE_Currency_Input extends EE_Select_Input |
12 | 12 | { |
13 | 13 | |
14 | - /** |
|
15 | - * |
|
16 | - * @param array $only_specific_currency_codes numerically-indexed array of allowed currency codes. By default, all are allowed |
|
17 | - * @param array $input_settings |
|
18 | - */ |
|
19 | - public function __construct($only_specific_currency_codes = array(), $input_settings = array()) |
|
20 | - { |
|
21 | - $query_params = array('order_by'=>array('CNT_name'=>'asc')); |
|
22 | - if ($only_specific_currency_codes) { |
|
23 | - $query_params[0]['CNT_cur_code'] = array('IN',$only_specific_currency_codes); |
|
24 | - } |
|
25 | - $all_countries = EEM_Country::instance()->get_all($query_params); |
|
26 | - $country_options = array(); |
|
27 | - foreach ($all_countries as $country) { |
|
28 | - /* @var $country EE_Country */ |
|
29 | - $country_options[ $country->currency_code() ] = $country->name().": ".$country->currency_name_single() ." (".$country->currency_sign().")"; |
|
30 | - } |
|
31 | - parent::__construct($country_options, 'int', $input_settings); |
|
32 | - } |
|
14 | + /** |
|
15 | + * |
|
16 | + * @param array $only_specific_currency_codes numerically-indexed array of allowed currency codes. By default, all are allowed |
|
17 | + * @param array $input_settings |
|
18 | + */ |
|
19 | + public function __construct($only_specific_currency_codes = array(), $input_settings = array()) |
|
20 | + { |
|
21 | + $query_params = array('order_by'=>array('CNT_name'=>'asc')); |
|
22 | + if ($only_specific_currency_codes) { |
|
23 | + $query_params[0]['CNT_cur_code'] = array('IN',$only_specific_currency_codes); |
|
24 | + } |
|
25 | + $all_countries = EEM_Country::instance()->get_all($query_params); |
|
26 | + $country_options = array(); |
|
27 | + foreach ($all_countries as $country) { |
|
28 | + /* @var $country EE_Country */ |
|
29 | + $country_options[ $country->currency_code() ] = $country->name().": ".$country->currency_name_single() ." (".$country->currency_sign().")"; |
|
30 | + } |
|
31 | + parent::__construct($country_options, 'int', $input_settings); |
|
32 | + } |
|
33 | 33 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | { |
21 | 21 | $query_params = array('order_by'=>array('CNT_name'=>'asc')); |
22 | 22 | if ($only_specific_currency_codes) { |
23 | - $query_params[0]['CNT_cur_code'] = array('IN',$only_specific_currency_codes); |
|
23 | + $query_params[0]['CNT_cur_code'] = array('IN', $only_specific_currency_codes); |
|
24 | 24 | } |
25 | 25 | $all_countries = EEM_Country::instance()->get_all($query_params); |
26 | 26 | $country_options = array(); |
27 | 27 | foreach ($all_countries as $country) { |
28 | 28 | /* @var $country EE_Country */ |
29 | - $country_options[ $country->currency_code() ] = $country->name().": ".$country->currency_name_single() ." (".$country->currency_sign().")"; |
|
29 | + $country_options[$country->currency_code()] = $country->name().": ".$country->currency_name_single()." (".$country->currency_sign().")"; |
|
30 | 30 | } |
31 | 31 | parent::__construct($country_options, 'int', $input_settings); |
32 | 32 | } |
@@ -10,14 +10,14 @@ |
||
10 | 10 | { |
11 | 11 | |
12 | 12 | |
13 | - /** |
|
14 | - * @param array $input_settings |
|
15 | - */ |
|
16 | - public function __construct($input_settings = array()) |
|
17 | - { |
|
18 | - $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('password')); |
|
19 | - $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
20 | - parent::__construct($input_settings); |
|
21 | - $this->set_html_class($this->html_class() . 'password'); |
|
22 | - } |
|
13 | + /** |
|
14 | + * @param array $input_settings |
|
15 | + */ |
|
16 | + public function __construct($input_settings = array()) |
|
17 | + { |
|
18 | + $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('password')); |
|
19 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
20 | + parent::__construct($input_settings); |
|
21 | + $this->set_html_class($this->html_class() . 'password'); |
|
22 | + } |
|
23 | 23 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('password')); |
19 | 19 | $this->_set_normalization_strategy(new EE_Text_Normalization()); |
20 | 20 | parent::__construct($input_settings); |
21 | - $this->set_html_class($this->html_class() . 'password'); |
|
21 | + $this->set_html_class($this->html_class().'password'); |
|
22 | 22 | } |
23 | 23 | } |
@@ -10,15 +10,15 @@ |
||
10 | 10 | { |
11 | 11 | |
12 | 12 | |
13 | - /** |
|
14 | - * Fixed Inputs are inputs that do NOT accept user input |
|
15 | - * therefore they will ALWAYS return the default value that was set upon their creation |
|
16 | - * and NO normalization or sanitization will occur because the $_REQUEST value is being ignored |
|
17 | - * |
|
18 | - * @param array $req_data like $_POST |
|
19 | - * @return boolean whether or not there was an error |
|
20 | - */ |
|
21 | - protected function _normalize($req_data) |
|
22 | - { |
|
23 | - } |
|
13 | + /** |
|
14 | + * Fixed Inputs are inputs that do NOT accept user input |
|
15 | + * therefore they will ALWAYS return the default value that was set upon their creation |
|
16 | + * and NO normalization or sanitization will occur because the $_REQUEST value is being ignored |
|
17 | + * |
|
18 | + * @param array $req_data like $_POST |
|
19 | + * @return boolean whether or not there was an error |
|
20 | + */ |
|
21 | + protected function _normalize($req_data) |
|
22 | + { |
|
23 | + } |
|
24 | 24 | } |
@@ -12,21 +12,21 @@ |
||
12 | 12 | class EE_Credit_Card_Month_Input extends EE_Month_Input |
13 | 13 | { |
14 | 14 | |
15 | - /** |
|
16 | - * @param bool $leading_zero |
|
17 | - * @param array $input_settings |
|
18 | - * @param bool $january_is_month_1 |
|
19 | - */ |
|
20 | - public function __construct( |
|
21 | - $leading_zero = false, |
|
22 | - $input_settings = array(), |
|
23 | - $january_is_month_1 = true |
|
24 | - ) { |
|
25 | - $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
26 | - parent::__construct( |
|
27 | - $leading_zero, |
|
28 | - $input_settings, |
|
29 | - $january_is_month_1 |
|
30 | - ); |
|
31 | - } |
|
15 | + /** |
|
16 | + * @param bool $leading_zero |
|
17 | + * @param array $input_settings |
|
18 | + * @param bool $january_is_month_1 |
|
19 | + */ |
|
20 | + public function __construct( |
|
21 | + $leading_zero = false, |
|
22 | + $input_settings = array(), |
|
23 | + $january_is_month_1 = true |
|
24 | + ) { |
|
25 | + $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
26 | + parent::__construct( |
|
27 | + $leading_zero, |
|
28 | + $input_settings, |
|
29 | + $january_is_month_1 |
|
30 | + ); |
|
31 | + } |
|
32 | 32 | } |
@@ -12,26 +12,26 @@ |
||
12 | 12 | { |
13 | 13 | |
14 | 14 | |
15 | - /** |
|
16 | - * @param array $options |
|
17 | - */ |
|
18 | - public function __construct($options = array()) |
|
19 | - { |
|
20 | - $this->_set_display_strategy(new EE_Text_Input_Display_Strategy()); |
|
21 | - $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
22 | - parent::__construct($options); |
|
23 | - // if the input hasn't specifically mentioned a more lenient validation strategy, |
|
24 | - // apply plaintext validation strategy |
|
25 | - if (! $this->has_validation_strategy( |
|
26 | - array( |
|
27 | - 'EE_Full_HTML_Validation_Strategy', |
|
28 | - 'EE_Simple_HTML_Validation_Strategy' |
|
29 | - ) |
|
30 | - ) |
|
31 | - ) { |
|
32 | - // by default we use the plaintext validation. If you want something else, |
|
33 | - // just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
|
34 | - $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
35 | - } |
|
36 | - } |
|
15 | + /** |
|
16 | + * @param array $options |
|
17 | + */ |
|
18 | + public function __construct($options = array()) |
|
19 | + { |
|
20 | + $this->_set_display_strategy(new EE_Text_Input_Display_Strategy()); |
|
21 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
22 | + parent::__construct($options); |
|
23 | + // if the input hasn't specifically mentioned a more lenient validation strategy, |
|
24 | + // apply plaintext validation strategy |
|
25 | + if (! $this->has_validation_strategy( |
|
26 | + array( |
|
27 | + 'EE_Full_HTML_Validation_Strategy', |
|
28 | + 'EE_Simple_HTML_Validation_Strategy' |
|
29 | + ) |
|
30 | + ) |
|
31 | + ) { |
|
32 | + // by default we use the plaintext validation. If you want something else, |
|
33 | + // just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
|
34 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
35 | + } |
|
36 | + } |
|
37 | 37 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | parent::__construct($options); |
23 | 23 | // if the input hasn't specifically mentioned a more lenient validation strategy, |
24 | 24 | // apply plaintext validation strategy |
25 | - if (! $this->has_validation_strategy( |
|
25 | + if ( ! $this->has_validation_strategy( |
|
26 | 26 | array( |
27 | 27 | 'EE_Full_HTML_Validation_Strategy', |
28 | 28 | 'EE_Simple_HTML_Validation_Strategy' |
@@ -9,21 +9,21 @@ |
||
9 | 9 | class EE_Email_Input extends EE_Form_Input_Base |
10 | 10 | { |
11 | 11 | |
12 | - /** |
|
13 | - * @param array $input_settings |
|
14 | - */ |
|
15 | - public function __construct($input_settings = array()) |
|
16 | - { |
|
17 | - $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email')); |
|
18 | - $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
19 | - $this->_add_validation_strategy( |
|
20 | - new EE_Email_Validation_Strategy( |
|
21 | - isset($input_settings['validation_error_message']) |
|
22 | - ? $input_settings['validation_error_message'] |
|
23 | - : null |
|
24 | - ) |
|
25 | - ); |
|
26 | - parent::__construct($input_settings); |
|
27 | - $this->set_html_class($this->html_class() . ' email'); |
|
28 | - } |
|
12 | + /** |
|
13 | + * @param array $input_settings |
|
14 | + */ |
|
15 | + public function __construct($input_settings = array()) |
|
16 | + { |
|
17 | + $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email')); |
|
18 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
19 | + $this->_add_validation_strategy( |
|
20 | + new EE_Email_Validation_Strategy( |
|
21 | + isset($input_settings['validation_error_message']) |
|
22 | + ? $input_settings['validation_error_message'] |
|
23 | + : null |
|
24 | + ) |
|
25 | + ); |
|
26 | + parent::__construct($input_settings); |
|
27 | + $this->set_html_class($this->html_class() . ' email'); |
|
28 | + } |
|
29 | 29 | } |
@@ -24,6 +24,6 @@ |
||
24 | 24 | ) |
25 | 25 | ); |
26 | 26 | parent::__construct($input_settings); |
27 | - $this->set_html_class($this->html_class() . ' email'); |
|
27 | + $this->set_html_class($this->html_class().' email'); |
|
28 | 28 | } |
29 | 29 | } |