@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | -class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base{ |
|
2 | +class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base { |
|
3 | 3 | /** |
4 | 4 | * |
5 | 5 | * @return string of html to display the field |
6 | 6 | */ |
7 | - function display(){ |
|
7 | + function display() { |
|
8 | 8 | $input = $this->_input; |
9 | 9 | $raw_value = maybe_serialize($input->raw_value()); |
10 | - if( $input instanceof EE_Text_Area_Input ) { |
|
10 | + if ($input instanceof EE_Text_Area_Input) { |
|
11 | 11 | $rows = $input->get_rows(); |
12 | 12 | $cols = $input->get_cols(); |
13 | - }else{ |
|
13 | + } else { |
|
14 | 14 | $rows = 4; |
15 | 15 | $cols = 20; |
16 | 16 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | //so in case teh IPN is arriving later, let's try to process an IPN! |
91 | 91 | if($_SERVER['REQUEST_METHOD'] == 'POST'){ |
92 | 92 | return $this->handle_ipn($_POST, $transaction ); |
93 | - }else{ |
|
93 | + } else{ |
|
94 | 94 | return parent::finalize_payment_for( $transaction ); |
95 | 95 | } |
96 | 96 | } |
@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | * |
14 | 14 | * @return string |
15 | 15 | */ |
16 | - public function layout_form_begin( $additional_args = array() ) { |
|
16 | + public function layout_form_begin($additional_args = array()) { |
|
17 | 17 | $this->_form_section->set_html_class('form-table'); |
18 | - return parent::layout_form_begin( $additional_args ); |
|
18 | + return parent::layout_form_begin($additional_args); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | * @param EE_Form_Section_Proper $form_section |
26 | 26 | * @return string |
27 | 27 | */ |
28 | - public function layout_subsection( $form_section ){ |
|
29 | - if ( $form_section instanceof EE_Form_Section_Proper ) { |
|
30 | - return EEH_HTML::no_row( $form_section->get_html_and_js(), 2 ); |
|
31 | - } else if ( $form_section instanceof EE_Form_Section_HTML ) { |
|
28 | + public function layout_subsection($form_section) { |
|
29 | + if ($form_section instanceof EE_Form_Section_Proper) { |
|
30 | + return EEH_HTML::no_row($form_section->get_html_and_js(), 2); |
|
31 | + } else if ($form_section instanceof EE_Form_Section_HTML) { |
|
32 | 32 | return $form_section->get_html_and_js(); |
33 | 33 | } |
34 | 34 | return ''; |
@@ -41,30 +41,30 @@ discard block |
||
41 | 41 | * @param EE_Form_Input_Base $input |
42 | 42 | * @return string |
43 | 43 | */ |
44 | - public function layout_input( $input ) { |
|
44 | + public function layout_input($input) { |
|
45 | 45 | |
46 | 46 | if ( |
47 | 47 | $input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy || |
48 | 48 | $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy || |
49 | 49 | $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy |
50 | 50 | ) { |
51 | - $input->set_html_class( $input->html_class() . ' large-text' ); |
|
51 | + $input->set_html_class($input->html_class().' large-text'); |
|
52 | 52 | } |
53 | - if ( $input instanceof EE_Text_Area_Input ) { |
|
54 | - $input->set_rows( 4 ); |
|
55 | - $input->set_cols( 60 ); |
|
53 | + if ($input instanceof EE_Text_Area_Input) { |
|
54 | + $input->set_rows(4); |
|
55 | + $input->set_cols(60); |
|
56 | 56 | } |
57 | 57 | $input_html = $input->get_html_for_input(); |
58 | 58 | // maybe add errors and help text ? |
59 | - $input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : ''; |
|
60 | - $input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : ''; |
|
59 | + $input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl().$input->get_html_for_errors() : ''; |
|
60 | + $input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : ''; |
|
61 | 61 | //overriding parent to add wp admin specific things. |
62 | 62 | $html = ''; |
63 | - if ( $input instanceof EE_Hidden_Input ) { |
|
64 | - $html .= EEH_HTML::no_row( $input->get_html_for_input(), 2 ); |
|
63 | + if ($input instanceof EE_Hidden_Input) { |
|
64 | + $html .= EEH_HTML::no_row($input->get_html_for_input(), 2); |
|
65 | 65 | } else { |
66 | 66 | $html .= EEH_HTML::tr( |
67 | - EEH_HTML::th( $input->get_html_for_label(), '', '', '', 'scope="row"' ) . EEH_HTML::td( $input_html ) |
|
67 | + EEH_HTML::th($input->get_html_for_label(), '', '', '', 'scope="row"').EEH_HTML::td($input_html) |
|
68 | 68 | ); |
69 | 69 | } |
70 | 70 | return $html; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Like the standard two-column formsection layout, but this one adds css classes |
|
4 | - * specific to the WP Admin |
|
5 | - */ |
|
3 | + * Like the standard two-column formsection layout, but this one adds css classes |
|
4 | + * specific to the WP Admin |
|
5 | + */ |
|
6 | 6 | |
7 | 7 | class EE_Admin_Two_Column_Layout extends EE_Two_Column_Layout { |
8 | 8 |
@@ -10,14 +10,14 @@ discard block |
||
10 | 10 | * @since 4.6.0 |
11 | 11 | * |
12 | 12 | */ |
13 | -class EE_Div_Per_Section_Layout extends EE_Form_Section_Layout_Base{ |
|
13 | +class EE_Div_Per_Section_Layout extends EE_Form_Section_Layout_Base { |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * opening div tag for a form |
17 | 17 | * @return string |
18 | 18 | */ |
19 | 19 | public function layout_form_begin() { |
20 | - return EEH_HTML::div( '', $this->_form_section->html_id(), $this->_form_section->html_class(), $this->_form_section->html_style() ); |
|
20 | + return EEH_HTML::div('', $this->_form_section->html_id(), $this->_form_section->html_class(), $this->_form_section->html_style()); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | |
@@ -26,38 +26,38 @@ discard block |
||
26 | 26 | * @param EE_Form_Input_Base $input |
27 | 27 | * @return string |
28 | 28 | */ |
29 | - public function layout_input( $input ) { |
|
29 | + public function layout_input($input) { |
|
30 | 30 | $html = ''; |
31 | - if ( $input instanceof EE_Hidden_Input ) { |
|
32 | - $html .= EEH_HTML::nl() . $input->get_html_for_input(); |
|
33 | - } else if ( $input instanceof EE_Submit_Input ) { |
|
34 | - $html .= EEH_HTML::div( $input->get_html_for_input(), $input->html_id() . '-submit-dv', $input->html_class() . '-submit-dv' ); |
|
35 | - } else if ( $input instanceof EE_Select_Input ) { |
|
31 | + if ($input instanceof EE_Hidden_Input) { |
|
32 | + $html .= EEH_HTML::nl().$input->get_html_for_input(); |
|
33 | + } else if ($input instanceof EE_Submit_Input) { |
|
34 | + $html .= EEH_HTML::div($input->get_html_for_input(), $input->html_id().'-submit-dv', $input->html_class().'-submit-dv'); |
|
35 | + } else if ($input instanceof EE_Select_Input) { |
|
36 | 36 | $html .= EEH_HTML::div( |
37 | - EEH_HTML::nl(1) . $input->get_html_for_label() . |
|
38 | - EEH_HTML::nl() . $input->get_html_for_errors() . |
|
39 | - EEH_HTML::nl() . $input->get_html_for_input() . |
|
40 | - EEH_HTML::nl() . $input->get_html_for_help(), |
|
41 | - $input->html_id() . '-input-dv', |
|
42 | - $input->html_class() . '-input-dv' |
|
37 | + EEH_HTML::nl(1).$input->get_html_for_label(). |
|
38 | + EEH_HTML::nl().$input->get_html_for_errors(). |
|
39 | + EEH_HTML::nl().$input->get_html_for_input(). |
|
40 | + EEH_HTML::nl().$input->get_html_for_help(), |
|
41 | + $input->html_id().'-input-dv', |
|
42 | + $input->html_class().'-input-dv' |
|
43 | 43 | ); |
44 | - } else if ( $input instanceof EE_Form_Input_With_Options_Base ) { |
|
44 | + } else if ($input instanceof EE_Form_Input_With_Options_Base) { |
|
45 | 45 | $html .= EEH_HTML::div( |
46 | - EEH_HTML::nl() . $this->_display_label_for_option_type_question( $input ) . |
|
47 | - EEH_HTML::nl() . $input->get_html_for_errors() . |
|
48 | - EEH_HTML::nl() . $input->get_html_for_input() . |
|
49 | - EEH_HTML::nl() . $input->get_html_for_help(), |
|
50 | - $input->html_id() . '-input-dv', |
|
51 | - $input->html_class() . '-input-dv' |
|
46 | + EEH_HTML::nl().$this->_display_label_for_option_type_question($input). |
|
47 | + EEH_HTML::nl().$input->get_html_for_errors(). |
|
48 | + EEH_HTML::nl().$input->get_html_for_input(). |
|
49 | + EEH_HTML::nl().$input->get_html_for_help(), |
|
50 | + $input->html_id().'-input-dv', |
|
51 | + $input->html_class().'-input-dv' |
|
52 | 52 | ); |
53 | 53 | } else { |
54 | 54 | $html .= EEH_HTML::div( |
55 | - EEH_HTML::nl(1) . $input->get_html_for_label() . |
|
56 | - EEH_HTML::nl() . $input->get_html_for_errors() . |
|
57 | - EEH_HTML::nl() . $input->get_html_for_input() . |
|
58 | - EEH_HTML::nl() . $input->get_html_for_help(), |
|
59 | - $input->html_id() . '-input-dv', |
|
60 | - $input->html_class() . '-input-dv' |
|
55 | + EEH_HTML::nl(1).$input->get_html_for_label(). |
|
56 | + EEH_HTML::nl().$input->get_html_for_errors(). |
|
57 | + EEH_HTML::nl().$input->get_html_for_input(). |
|
58 | + EEH_HTML::nl().$input->get_html_for_help(), |
|
59 | + $input->html_id().'-input-dv', |
|
60 | + $input->html_class().'-input-dv' |
|
61 | 61 | ); |
62 | 62 | } |
63 | 63 | return $html; |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | * @param EE_Form_Input_With_Options_Base $input |
75 | 75 | * @return string |
76 | 76 | */ |
77 | - protected function _display_label_for_option_type_question( EE_Form_Input_With_Options_Base $input ){ |
|
78 | - if ( $input->display_html_label_text() != '' ) { |
|
79 | - $class = $input->required() ? 'ee-required-label ' . $input->html_label_class() : $input->html_label_class(); |
|
80 | - $label_text = $input->required() ? $input->html_label_text() . '<span class="ee-asterisk">*</span>' : $input->html_label_text(); |
|
81 | - $html = '<div id="' . $input->html_label_id() . '"'; |
|
82 | - $html .= ' class="' . $class . '"'; |
|
83 | - $html .= ' style="' . $input->html_label_style() . '">'; |
|
84 | - $html .= $label_text . '</div>'; |
|
77 | + protected function _display_label_for_option_type_question(EE_Form_Input_With_Options_Base $input) { |
|
78 | + if ($input->display_html_label_text() != '') { |
|
79 | + $class = $input->required() ? 'ee-required-label '.$input->html_label_class() : $input->html_label_class(); |
|
80 | + $label_text = $input->required() ? $input->html_label_text().'<span class="ee-asterisk">*</span>' : $input->html_label_text(); |
|
81 | + $html = '<div id="'.$input->html_label_id().'"'; |
|
82 | + $html .= ' class="'.$class.'"'; |
|
83 | + $html .= ' style="'.$input->html_label_style().'">'; |
|
84 | + $html .= $label_text.'</div>'; |
|
85 | 85 | return $html; |
86 | 86 | } else { |
87 | 87 | return ''; |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | * @param EE_Form_Section_Proper $form_section |
96 | 96 | * @return string |
97 | 97 | */ |
98 | - public function layout_subsection( $form_section ){ |
|
98 | + public function layout_subsection($form_section) { |
|
99 | 99 | // d( $form_section ); |
100 | - return EEH_HTML::nl(1) . $form_section->get_html_and_js() . EEH_HTML::nl(-1); |
|
100 | + return EEH_HTML::nl(1).$form_section->get_html_and_js().EEH_HTML::nl(-1); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * closing div tag for a form |
106 | 106 | * @return string |
107 | 107 | */ |
108 | - public function layout_form_end(){ |
|
109 | - return EEH_HTML::divx( $this->_form_section->html_id(), $this->_form_section->html_class() ); |
|
108 | + public function layout_form_end() { |
|
109 | + return EEH_HTML::divx($this->_form_section->html_id(), $this->_form_section->html_class()); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | \ No newline at end of file |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * |
|
4 | - * Class EE_Fieldset_Section_Layout |
|
5 | - * |
|
6 | - * Description |
|
7 | - * |
|
8 | - * @package Event Espresso |
|
9 | - * @subpackage core |
|
10 | - * @author Brent Christensen |
|
11 | - * @since $VID:$ |
|
12 | - * |
|
13 | - */ |
|
3 | + * |
|
4 | + * Class EE_Fieldset_Section_Layout |
|
5 | + * |
|
6 | + * Description |
|
7 | + * |
|
8 | + * @package Event Espresso |
|
9 | + * @subpackage core |
|
10 | + * @author Brent Christensen |
|
11 | + * @since $VID:$ |
|
12 | + * |
|
13 | + */ |
|
14 | 14 | class EE_Fieldset_Section_Layout extends EE_Div_Per_Section_Layout{ |
15 | 15 | |
16 | 16 | /** |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @since $VID:$ |
12 | 12 | * |
13 | 13 | */ |
14 | -class EE_Fieldset_Section_Layout extends EE_Div_Per_Section_Layout{ |
|
14 | +class EE_Fieldset_Section_Layout extends EE_Div_Per_Section_Layout { |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * legend_class |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @param array $options |
34 | 34 | */ |
35 | - function __construct( $options = array() ){ |
|
36 | - foreach( $options as $key => $value ) { |
|
37 | - $key = '_' . $key; |
|
38 | - if ( property_exists( $this, $key )) { |
|
35 | + function __construct($options = array()) { |
|
36 | + foreach ($options as $key => $value) { |
|
37 | + $key = '_'.$key; |
|
38 | + if (property_exists($this, $key)) { |
|
39 | 39 | $this->$key = $value; |
40 | 40 | } |
41 | 41 | } |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | * @return string |
48 | 48 | */ |
49 | 49 | public function layout_form_begin() { |
50 | - $html = EEH_HTML::nl(1) . '<fieldset id="' . $this->_form_section->html_id() . '" class="' . $this->_form_section->html_class() . '" style="' . $this->_form_section->html_style() . '">'; |
|
51 | - $html .= '<legend class="' . $this->legend_class() . '">' . $this->legend_text() . '</legend>'; |
|
50 | + $html = EEH_HTML::nl(1).'<fieldset id="'.$this->_form_section->html_id().'" class="'.$this->_form_section->html_class().'" style="'.$this->_form_section->html_style().'">'; |
|
51 | + $html .= '<legend class="'.$this->legend_class().'">'.$this->legend_text().'</legend>'; |
|
52 | 52 | return $html; |
53 | 53 | } |
54 | 54 | |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | * closing div tag for a form |
59 | 59 | * @return string |
60 | 60 | */ |
61 | - public function layout_form_end(){ |
|
62 | - return EEH_HTML::nl(-1) . '</fieldset>'; |
|
61 | + public function layout_form_end() { |
|
62 | + return EEH_HTML::nl(-1).'</fieldset>'; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | /** |
68 | 68 | * @param string $legend_class |
69 | 69 | */ |
70 | - public function set_legend_class( $legend_class ) { |
|
70 | + public function set_legend_class($legend_class) { |
|
71 | 71 | $this->_legend_class = $legend_class; |
72 | 72 | } |
73 | 73 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * @param string $legend_text |
87 | 87 | */ |
88 | - public function set_legend_text( $legend_text ) { |
|
88 | + public function set_legend_text($legend_text) { |
|
89 | 89 | $this->_legend_text = $legend_text; |
90 | 90 | } |
91 | 91 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * stating where the proper subsections should be placed (but usually leaving them to layout |
9 | 9 | * their own headers and footers etc). |
10 | 10 | */ |
11 | -abstract class EE_Form_Section_Layout_Base{ |
|
11 | +abstract class EE_Form_Section_Layout_Base { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * Form form section to lay out |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * __construct |
23 | 23 | */ |
24 | - function __construct(){ |
|
24 | + function __construct() { |
|
25 | 25 | EE_Registry::instance()->load_helper('HTML'); |
26 | 26 | } |
27 | 27 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * The form section on which this strategy is to perform |
32 | 32 | * @param EE_Form_Section_Proper $form |
33 | 33 | */ |
34 | - function _construct_finalize(EE_Form_Section_Proper $form){ |
|
34 | + function _construct_finalize(EE_Form_Section_Proper $form) { |
|
35 | 35 | $this->_form_section = $form; |
36 | 36 | } |
37 | 37 | |
@@ -54,28 +54,28 @@ discard block |
||
54 | 54 | * Returns the HTML |
55 | 55 | * @return string HTML for displaying |
56 | 56 | */ |
57 | - function layout_form(){ |
|
57 | + function layout_form() { |
|
58 | 58 | $html = ''; |
59 | 59 | // layout_form_begin |
60 | 60 | $html .= apply_filters( |
61 | - 'FHEE__EE_Form_Section_Layout_Base__layout_form__start__for_' . $this->_form_section->name(), |
|
61 | + 'FHEE__EE_Form_Section_Layout_Base__layout_form__start__for_'.$this->_form_section->name(), |
|
62 | 62 | $this->layout_form_begin(), |
63 | 63 | $this->_form_section |
64 | 64 | ); |
65 | 65 | // layout_form_loop |
66 | 66 | $html .= apply_filters( |
67 | - 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop__for_' . $this->_form_section->name(), |
|
67 | + 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop__for_'.$this->_form_section->name(), |
|
68 | 68 | $this->layout_form_loop(), |
69 | 69 | $this->_form_section |
70 | 70 | ); |
71 | 71 | // layout_form_end |
72 | 72 | $html .= apply_filters( |
73 | - 'FHEE__EE_Form_Section_Layout_Base__layout_form__end__for_' . $this->_form_section->name(), |
|
73 | + 'FHEE__EE_Form_Section_Layout_Base__layout_form__end__for_'.$this->_form_section->name(), |
|
74 | 74 | $this->layout_form_end(), |
75 | 75 | $this->_form_section |
76 | 76 | ); |
77 | 77 | |
78 | - $html = $this->add_form_section_hooks_and_filters( $html ); |
|
78 | + $html = $this->add_form_section_hooks_and_filters($html); |
|
79 | 79 | return $html; |
80 | 80 | } |
81 | 81 | |
@@ -84,20 +84,20 @@ discard block |
||
84 | 84 | /** |
85 | 85 | * @return string |
86 | 86 | */ |
87 | - function layout_form_loop(){ |
|
87 | + function layout_form_loop() { |
|
88 | 88 | $html = ''; |
89 | - foreach( $this->_form_section->subsections() as $name => $subsection ){ |
|
90 | - if ( $subsection instanceof EE_Form_Input_Base ){ |
|
89 | + foreach ($this->_form_section->subsections() as $name => $subsection) { |
|
90 | + if ($subsection instanceof EE_Form_Input_Base) { |
|
91 | 91 | $html .= apply_filters( |
92 | - 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_input_' . $name . '__in_' . $this->_form_section->name(), |
|
93 | - $this->layout_input( $subsection ), |
|
92 | + 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_input_'.$name.'__in_'.$this->_form_section->name(), |
|
93 | + $this->layout_input($subsection), |
|
94 | 94 | $this->_form_section, |
95 | 95 | $subsection |
96 | 96 | ); |
97 | - } elseif ( $subsection instanceof EE_Form_Section_Base ){ |
|
97 | + } elseif ($subsection instanceof EE_Form_Section_Base) { |
|
98 | 98 | $html .= apply_filters( |
99 | - 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_non_input_' . $name . '__in_' . $this->_form_section->name(), |
|
100 | - $this->layout_subsection( $subsection ), |
|
99 | + 'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_non_input_'.$name.'__in_'.$this->_form_section->name(), |
|
100 | + $this->layout_subsection($subsection), |
|
101 | 101 | $this->_form_section, |
102 | 102 | $subsection |
103 | 103 | ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @param EE_Form_Section_Base $subsection |
146 | 146 | * @return string html |
147 | 147 | */ |
148 | - abstract function layout_subsection( $subsection ); |
|
148 | + abstract function layout_subsection($subsection); |
|
149 | 149 | |
150 | 150 | |
151 | 151 | |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | * @param EE_Form_Input_Base $input |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - public function display_label($input){ |
|
158 | - $class = $input->required() ? 'ee-required-label ' . $input->html_label_class() : $input->html_label_class(); |
|
159 | - $label_text = $input->required() ? $input->html_label_text() . '<span class="ee-asterisk">*</span>' : $input->html_label_text(); |
|
160 | - return '<label id="' . $input->html_label_id() . '" class="' . $class . '" style="' . $input->html_label_style() . '" for="' . $input->html_name() . '">' . $label_text . '</label>'; |
|
157 | + public function display_label($input) { |
|
158 | + $class = $input->required() ? 'ee-required-label '.$input->html_label_class() : $input->html_label_class(); |
|
159 | + $label_text = $input->required() ? $input->html_label_text().'<span class="ee-asterisk">*</span>' : $input->html_label_text(); |
|
160 | + return '<label id="'.$input->html_label_id().'" class="'.$class.'" style="'.$input->html_label_style().'" for="'.$input->html_name().'">'.$label_text.'</label>'; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | |
@@ -170,10 +170,10 @@ discard block |
||
170 | 170 | * @param EE_Form_Input_Base $input |
171 | 171 | * @return string |
172 | 172 | */ |
173 | - public function display_errors($input){ |
|
174 | - if( $input->get_validation_errors() ){ |
|
175 | - return "<span id='" . $input->html_id() . "-error' class='ee-error-label red ee-red' for='{$input->html_name()}'>" . $input->get_validation_error_string() . "</span>"; |
|
176 | - }else{ |
|
173 | + public function display_errors($input) { |
|
174 | + if ($input->get_validation_errors()) { |
|
175 | + return "<span id='".$input->html_id()."-error' class='ee-error-label red ee-red' for='{$input->html_name()}'>".$input->get_validation_error_string()."</span>"; |
|
176 | + } else { |
|
177 | 177 | return ''; |
178 | 178 | } |
179 | 179 | } |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | * @param EE_Form_Input_Base $input |
184 | 184 | * @return string |
185 | 185 | */ |
186 | - public function display_help_text( $input ){ |
|
187 | - if ( $input->html_help_text() != '' ) { |
|
186 | + public function display_help_text($input) { |
|
187 | + if ($input->html_help_text() != '') { |
|
188 | 188 | $tag = is_admin() ? 'p' : 'span'; |
189 | - return '<' . $tag . ' id="' . $input->html_id() . '-help" class="' . $input->html_help_class() . '" style="' . $input->html_help_style() . '">' . $input->html_help_text() . '</' . $tag . '>'; |
|
189 | + return '<'.$tag.' id="'.$input->html_id().'-help" class="'.$input->html_help_class().'" style="'.$input->html_help_style().'">'.$input->html_help_text().'</'.$tag.'>'; |
|
190 | 190 | } |
191 | 191 | return ''; |
192 | 192 | } |
@@ -198,13 +198,13 @@ discard block |
||
198 | 198 | * @param string $html |
199 | 199 | * @return string |
200 | 200 | */ |
201 | - public function add_form_section_hooks_and_filters( $html ){ |
|
201 | + public function add_form_section_hooks_and_filters($html) { |
|
202 | 202 | // replace dashes and spaces with underscores |
203 | - $hook_name = str_replace( array( '-', ' ' ), '_', $this->_form_section->html_id() ); |
|
204 | - do_action( 'AHEE__Form_Section_Layout__' . $hook_name, $this->_form_section ); |
|
205 | - $html = apply_filters( 'AFEE__Form_Section_Layout__' . $hook_name . '__html', $html, $this->_form_section ); |
|
206 | - $html .= EEH_HTML::nl() . '<!-- AHEE__Form_Section_Layout__' . $hook_name . '__html -->'; |
|
207 | - $html .= EEH_HTML::nl() . '<!-- AFEE__Form_Section_Layout__' . $hook_name . ' -->'; |
|
203 | + $hook_name = str_replace(array('-', ' '), '_', $this->_form_section->html_id()); |
|
204 | + do_action('AHEE__Form_Section_Layout__'.$hook_name, $this->_form_section); |
|
205 | + $html = apply_filters('AFEE__Form_Section_Layout__'.$hook_name.'__html', $html, $this->_form_section); |
|
206 | + $html .= EEH_HTML::nl().'<!-- AHEE__Form_Section_Layout__'.$hook_name.'__html -->'; |
|
207 | + $html .= EEH_HTML::nl().'<!-- AFEE__Form_Section_Layout__'.$hook_name.' -->'; |
|
208 | 208 | return $html; |
209 | 209 | } |
210 | 210 |
@@ -90,7 +90,7 @@ |
||
90 | 90 | //so in case teh IPN is arriving later, let's try to process an IPN! |
91 | 91 | if($_SERVER['REQUEST_METHOD'] == 'POST'){ |
92 | 92 | return $this->handle_ipn($_POST, $transaction ); |
93 | - }else{ |
|
93 | + } else{ |
|
94 | 94 | return parent::finalize_payment_for( $transaction ); |
95 | 95 | } |
96 | 96 | } |
@@ -26,31 +26,31 @@ discard block |
||
26 | 26 | * @param EE_Form_Input_Base $input |
27 | 27 | * @return string |
28 | 28 | */ |
29 | - public function layout_input( $input ) { |
|
29 | + public function layout_input($input) { |
|
30 | 30 | $html = ''; |
31 | - if ( $input instanceof EE_Hidden_Input ) { |
|
32 | - $html .= EEH_HTML::nl() . $input->get_html_for_input(); |
|
33 | - } else if ( $input instanceof EE_Submit_Input ) { |
|
31 | + if ($input instanceof EE_Hidden_Input) { |
|
32 | + $html .= EEH_HTML::nl().$input->get_html_for_input(); |
|
33 | + } else if ($input instanceof EE_Submit_Input) { |
|
34 | 34 | $html .= EEH_HTML::br(); |
35 | 35 | $html .= $input->get_html_for_input(); |
36 | - } else if ( $input instanceof EE_Select_Input ) { |
|
36 | + } else if ($input instanceof EE_Select_Input) { |
|
37 | 37 | $html .= EEH_HTML::br(); |
38 | - $html .= EEH_HTML::nl(1) . $input->get_html_for_label(); |
|
39 | - $html .= EEH_HTML::nl() . $input->get_html_for_errors(); |
|
40 | - $html .= EEH_HTML::nl() . $input->get_html_for_input(); |
|
41 | - $html .= EEH_HTML::nl() . $input->get_html_for_help(); |
|
38 | + $html .= EEH_HTML::nl(1).$input->get_html_for_label(); |
|
39 | + $html .= EEH_HTML::nl().$input->get_html_for_errors(); |
|
40 | + $html .= EEH_HTML::nl().$input->get_html_for_input(); |
|
41 | + $html .= EEH_HTML::nl().$input->get_html_for_help(); |
|
42 | 42 | $html .= EEH_HTML::br(); |
43 | - } else if ( $input instanceof EE_Form_Input_With_Options_Base ) { |
|
43 | + } else if ($input instanceof EE_Form_Input_With_Options_Base) { |
|
44 | 44 | $html .= EEH_HTML::br(); |
45 | - $html .= EEH_HTML::nl() . $input->get_html_for_errors(); |
|
46 | - $html .= EEH_HTML::nl() . $input->get_html_for_input(); |
|
47 | - $html .= EEH_HTML::nl() . $input->get_html_for_help(); |
|
45 | + $html .= EEH_HTML::nl().$input->get_html_for_errors(); |
|
46 | + $html .= EEH_HTML::nl().$input->get_html_for_input(); |
|
47 | + $html .= EEH_HTML::nl().$input->get_html_for_help(); |
|
48 | 48 | } else { |
49 | 49 | $html .= EEH_HTML::br(); |
50 | - $html .= EEH_HTML::nl(1) . $input->get_html_for_label(); |
|
51 | - $html .= EEH_HTML::nl() . $input->get_html_for_errors(); |
|
52 | - $html .= EEH_HTML::nl() . $input->get_html_for_input(); |
|
53 | - $html .= EEH_HTML::nl() . $input->get_html_for_help(); |
|
50 | + $html .= EEH_HTML::nl(1).$input->get_html_for_label(); |
|
51 | + $html .= EEH_HTML::nl().$input->get_html_for_errors(); |
|
52 | + $html .= EEH_HTML::nl().$input->get_html_for_input(); |
|
53 | + $html .= EEH_HTML::nl().$input->get_html_for_help(); |
|
54 | 54 | } |
55 | 55 | $html .= EEH_HTML::nl(-1); |
56 | 56 | return $html; |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | * @param EE_Form_Section_Proper $form_section |
64 | 64 | * @return string |
65 | 65 | */ |
66 | - public function layout_subsection( $form_section ){ |
|
66 | + public function layout_subsection($form_section) { |
|
67 | 67 | // d( $form_section ); |
68 | - return EEH_HTML::nl(1) . $form_section->get_html_and_js() . EEH_HTML::nl(-1); |
|
68 | + return EEH_HTML::nl(1).$form_section->get_html_and_js().EEH_HTML::nl(-1); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * closing div tag for a form |
74 | 74 | * @return string |
75 | 75 | */ |
76 | - public function layout_form_end(){ |
|
76 | + public function layout_form_end() { |
|
77 | 77 | return EEH_HTML::nl(-1); |
78 | 78 | } |
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * EE_Template_Layout |
|
4 | - * |
|
5 | - * For very customized layouts, where you provide this class with the location of |
|
6 | - * a template file to use for laying out the form section. Inherits from EE_Div_per_Section |
|
7 | - * in case you call layout_input() or layout_subsection(), or get_html_for_label(), |
|
8 | - * get_html_for_input(), or get_html_for_errors() on one if the form section's inputs. |
|
9 | - * When would you want to use this instead of just laying out the form's subsections manually |
|
10 | - * in a template file? When you want a very customized layout, but that layout is essential |
|
11 | - * to the form; so that if you were to use the same form on two different pages (eg a contact form, |
|
12 | - * one on the website's frontend for contacting the site admin, and then again on the backend for |
|
13 | - * contacting the plugin's developer), you would still use this exact same template layout strategy. |
|
14 | - * (Eg, if you wanted to add a button to that same form for automatically adding "@gmail.com" or "@yahoo.com" |
|
15 | - * onto the 'from' input. The input is important to the form section on either page, but isn't an input so it's best |
|
16 | - * added as a part of the template layout.) |
|
17 | - * |
|
18 | - * @package Event Espresso |
|
19 | - * @subpackage |
|
20 | - * @author Mike Nelson |
|
21 | - * |
|
22 | - * ------------------------------------------------------------------------ |
|
23 | - */ |
|
3 | + * EE_Template_Layout |
|
4 | + * |
|
5 | + * For very customized layouts, where you provide this class with the location of |
|
6 | + * a template file to use for laying out the form section. Inherits from EE_Div_per_Section |
|
7 | + * in case you call layout_input() or layout_subsection(), or get_html_for_label(), |
|
8 | + * get_html_for_input(), or get_html_for_errors() on one if the form section's inputs. |
|
9 | + * When would you want to use this instead of just laying out the form's subsections manually |
|
10 | + * in a template file? When you want a very customized layout, but that layout is essential |
|
11 | + * to the form; so that if you were to use the same form on two different pages (eg a contact form, |
|
12 | + * one on the website's frontend for contacting the site admin, and then again on the backend for |
|
13 | + * contacting the plugin's developer), you would still use this exact same template layout strategy. |
|
14 | + * (Eg, if you wanted to add a button to that same form for automatically adding "@gmail.com" or "@yahoo.com" |
|
15 | + * onto the 'from' input. The input is important to the form section on either page, but isn't an input so it's best |
|
16 | + * added as a part of the template layout.) |
|
17 | + * |
|
18 | + * @package Event Espresso |
|
19 | + * @subpackage |
|
20 | + * @author Mike Nelson |
|
21 | + * |
|
22 | + * ------------------------------------------------------------------------ |
|
23 | + */ |
|
24 | 24 | class EE_Template_Layout extends EE_Div_Per_Section_Layout{ |
25 | 25 | |
26 | 26 | protected $_layout_template_file = NULL; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * ------------------------------------------------------------------------ |
23 | 23 | */ |
24 | -class EE_Template_Layout extends EE_Div_Per_Section_Layout{ |
|
24 | +class EE_Template_Layout extends EE_Div_Per_Section_Layout { |
|
25 | 25 | |
26 | 26 | protected $_layout_template_file = NULL; |
27 | 27 | protected $_layout_begin_template_file = NULL; |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | * @type array $_template_args |
43 | 43 | * } |
44 | 44 | */ |
45 | - public function __construct( $template_options = array() ) { |
|
45 | + public function __construct($template_options = array()) { |
|
46 | 46 | // loop thru incoming options |
47 | - foreach( $template_options as $key => $value ) { |
|
47 | + foreach ($template_options as $key => $value) { |
|
48 | 48 | // add underscore to $key to match property names |
49 | - $_key = '_' . $key; |
|
50 | - if ( property_exists( $this, $_key )) { |
|
49 | + $_key = '_'.$key; |
|
50 | + if (property_exists($this, $_key)) { |
|
51 | 51 | $this->$_key = $value; |
52 | 52 | } |
53 | 53 | } |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | * @return string |
66 | 66 | */ |
67 | 67 | public function layout_form() { |
68 | - if ( $this->_layout_template_file ) { |
|
69 | - EE_Registry::instance()->load_helper( 'Template' ); |
|
70 | - return EEH_Template::locate_template( $this->_layout_template_file, $this->template_args(), TRUE, TRUE ); |
|
68 | + if ($this->_layout_template_file) { |
|
69 | + EE_Registry::instance()->load_helper('Template'); |
|
70 | + return EEH_Template::locate_template($this->_layout_template_file, $this->template_args(), TRUE, TRUE); |
|
71 | 71 | } else { |
72 | 72 | return parent::layout_form(); |
73 | 73 | } |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | * @return string |
81 | 81 | */ |
82 | 82 | public function layout_form_begin() { |
83 | - if($this->_layout_begin_template_file){ |
|
83 | + if ($this->_layout_begin_template_file) { |
|
84 | 84 | EE_Registry::instance()->load_helper('Template'); |
85 | - return EEH_Template::locate_template( $this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE ); |
|
86 | - }else{ |
|
85 | + return EEH_Template::locate_template($this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE); |
|
86 | + } else { |
|
87 | 87 | return parent::layout_form_begin(); |
88 | 88 | } |
89 | 89 | } |
@@ -96,10 +96,10 @@ discard block |
||
96 | 96 | * @param EE_Form_Input_Base $input |
97 | 97 | * @return string |
98 | 98 | */ |
99 | - public function layout_input( $input ) { |
|
100 | - if($this->_input_template_file){ |
|
99 | + public function layout_input($input) { |
|
100 | + if ($this->_input_template_file) { |
|
101 | 101 | EE_Registry::instance()->load_helper('Template'); |
102 | - return EEH_Template::locate_template( $this->_input_template_file, array( 'input' => $input ), TRUE, TRUE ); |
|
102 | + return EEH_Template::locate_template($this->_input_template_file, array('input' => $input), TRUE, TRUE); |
|
103 | 103 | } |
104 | 104 | return parent::layout_input($input); |
105 | 105 | } |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | * @param EE_Form_Section_Proper $form_section |
113 | 113 | * @return string |
114 | 114 | */ |
115 | - public function layout_subsection( $form_section ) { |
|
116 | - if($this->_subsection_template_file){ |
|
115 | + public function layout_subsection($form_section) { |
|
116 | + if ($this->_subsection_template_file) { |
|
117 | 117 | EE_Registry::instance()->load_helper('Template'); |
118 | - return EEH_Template::locate_template( $this->_subsection_template_file, $this->template_args(), TRUE, TRUE ); |
|
118 | + return EEH_Template::locate_template($this->_subsection_template_file, $this->template_args(), TRUE, TRUE); |
|
119 | 119 | } |
120 | - return parent::layout_subsection( $form_section ); |
|
120 | + return parent::layout_subsection($form_section); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | * @return string |
128 | 128 | */ |
129 | 129 | public function layout_form_end() { |
130 | - if($this->_layout_end_template_file){ |
|
130 | + if ($this->_layout_end_template_file) { |
|
131 | 131 | EE_Registry::instance()->load_helper('Template'); |
132 | - return EEH_Template::locate_template( $this->_layout_end_template_file, $this->template_args(), TRUE, TRUE); |
|
133 | - }else{ |
|
132 | + return EEH_Template::locate_template($this->_layout_end_template_file, $this->template_args(), TRUE, TRUE); |
|
133 | + } else { |
|
134 | 134 | return parent::layout_form_end(); |
135 | 135 | } |
136 | 136 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | /** |
141 | 141 | * @param array $template_args |
142 | 142 | */ |
143 | - public function set_template_args( $template_args = array() ) { |
|
143 | + public function set_template_args($template_args = array()) { |
|
144 | 144 | $this->_template_args = $template_args; |
145 | 145 | } |
146 | 146 | |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | /** |
150 | 150 | * @param array $template_args |
151 | 151 | */ |
152 | - public function add_template_args( $template_args = array() ) { |
|
153 | - $this->_template_args = array_merge_recursive( $this->_template_args, $template_args ); |
|
152 | + public function add_template_args($template_args = array()) { |
|
153 | + $this->_template_args = array_merge_recursive($this->_template_args, $template_args); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | * @return array |
160 | 160 | */ |
161 | 161 | public function template_args() { |
162 | - foreach ( $this->form_section()->subsections() as $subsection_name => $subsection ) { |
|
163 | - $subsection_name = self::prep_form_subsection_key_name( $subsection_name ); |
|
164 | - if ( strpos( $subsection_name, '[' ) !== FALSE ) { |
|
165 | - $sub_name = explode( '[', $subsection_name ); |
|
166 | - $this->_template_args[ $sub_name[0] ][ rtrim( $sub_name[1], ']' ) ] = $this->layout_subsection( $subsection ); |
|
162 | + foreach ($this->form_section()->subsections() as $subsection_name => $subsection) { |
|
163 | + $subsection_name = self::prep_form_subsection_key_name($subsection_name); |
|
164 | + if (strpos($subsection_name, '[') !== FALSE) { |
|
165 | + $sub_name = explode('[', $subsection_name); |
|
166 | + $this->_template_args[$sub_name[0]][rtrim($sub_name[1], ']')] = $this->layout_subsection($subsection); |
|
167 | 167 | } else { |
168 | - $this->_template_args[ $subsection_name ] = $this->layout_subsection( $subsection ); |
|
168 | + $this->_template_args[$subsection_name] = $this->layout_subsection($subsection); |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 | // d( $this->_template_args ); |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | * @param string $subsection_name |
182 | 182 | * @return string |
183 | 183 | */ |
184 | - public static function prep_form_subsection_key_name( $subsection_name = '' ) { |
|
185 | - $subsection_name = str_replace( array( '-', ' ' ), array( '', '_' ), $subsection_name ); |
|
186 | - return is_numeric( substr( $subsection_name, 0, 1 )) ? 'form_' . $subsection_name : $subsection_name; |
|
184 | + public static function prep_form_subsection_key_name($subsection_name = '') { |
|
185 | + $subsection_name = str_replace(array('-', ' '), array('', '_'), $subsection_name); |
|
186 | + return is_numeric(substr($subsection_name, 0, 1)) ? 'form_'.$subsection_name : $subsection_name; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | * @param string $subsection_name |
196 | 196 | * @return string |
197 | 197 | */ |
198 | - public static function get_subform_name( $subsection_name = '' ) { |
|
199 | - return EE_Template_Layout::prep_form_subsection_key_name( $subsection_name ); |
|
198 | + public static function get_subform_name($subsection_name = '') { |
|
199 | + return EE_Template_Layout::prep_form_subsection_key_name($subsection_name); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $validation_error_message = $default_validation_strategy->get_validation_error_message(); |
43 | 43 | } |
44 | 44 | throw new EE_Validation_Error( $validation_error_message, 'float_only' ); |
45 | - }else{ |
|
45 | + } else{ |
|
46 | 46 | return floatval($normalized_value); |
47 | 47 | } |
48 | 48 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function unnormalize($normalized_value) { |
56 | 56 | if( empty( $normalized_value ) ){ |
57 | 57 | return '0.00'; |
58 | - }else{ |
|
58 | + } else{ |
|
59 | 59 | return "$normalized_value"; |
60 | 60 | } |
61 | 61 | } |
@@ -1,14 +1,14 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -class EE_Two_Column_Layout extends EE_Form_Section_Layout_Base{ |
|
3 | +class EE_Two_Column_Layout extends EE_Form_Section_Layout_Base { |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Should be used to start teh form section (Eg a table tag, or a div tag, etc.) |
7 | 7 | * @param array $additional_args |
8 | 8 | * @return string |
9 | 9 | */ |
10 | - public function layout_form_begin( $additional_args = array() ) { |
|
11 | - return EEH_HTML::table( '', $this->_form_section->html_id(), $this->_form_section->html_class(), $this->_form_section->html_style() ) . EEH_HTML::tbody(); |
|
10 | + public function layout_form_begin($additional_args = array()) { |
|
11 | + return EEH_HTML::table('', $this->_form_section->html_id(), $this->_form_section->html_class(), $this->_form_section->html_style()).EEH_HTML::tbody(); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | * @param array $additional_args |
19 | 19 | * @return string |
20 | 20 | */ |
21 | - public function layout_form_end( $additional_args = array() ) { |
|
22 | - return EEH_HTML::tbodyx() . EEH_HTML::tablex( $this->_form_section->html_id() ); |
|
21 | + public function layout_form_end($additional_args = array()) { |
|
22 | + return EEH_HTML::tbodyx().EEH_HTML::tablex($this->_form_section->html_id()); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | |
@@ -29,17 +29,17 @@ discard block |
||
29 | 29 | * @param EE_Form_Input_Base $input |
30 | 30 | * @return string |
31 | 31 | */ |
32 | - public function layout_input( $input ) { |
|
32 | + public function layout_input($input) { |
|
33 | 33 | $html = ''; |
34 | - if ( $input instanceof EE_Hidden_Input ) { |
|
34 | + if ($input instanceof EE_Hidden_Input) { |
|
35 | 35 | $html .= $input->get_html_for_input(); |
36 | 36 | } else { |
37 | 37 | $html_for_input = $input->get_html_for_input(); |
38 | - $html_for_input .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : ''; |
|
39 | - $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : ''; |
|
38 | + $html_for_input .= $input->get_html_for_errors() != '' ? EEH_HTML::nl().$input->get_html_for_errors() : ''; |
|
39 | + $html_for_input .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : ''; |
|
40 | 40 | $html .= EEH_HTML::tr( |
41 | - EEH_HTML::th( $input->get_html_for_label() ) . |
|
42 | - EEH_HTML::td( $html_for_input ) |
|
41 | + EEH_HTML::th($input->get_html_for_label()). |
|
42 | + EEH_HTML::td($html_for_input) |
|
43 | 43 | ); |
44 | 44 | } |
45 | 45 | return $html; |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | * @param EE_Form_Section_Proper $form_section |
53 | 53 | * @return string |
54 | 54 | */ |
55 | - public function layout_subsection( $form_section ){ |
|
55 | + public function layout_subsection($form_section) { |
|
56 | 56 | $html = ''; |
57 | - if ( $form_section instanceof EE_Form_Section_HTML ) { |
|
57 | + if ($form_section instanceof EE_Form_Section_HTML) { |
|
58 | 58 | $html .= $form_section->get_html_and_js(); |
59 | 59 | } else { |
60 | 60 | $html .= EEH_HTML::tr( |
61 | - EEH_HTML::td( $form_section->get_html_and_js(), '', '', '', 'colspan="2"' ) |
|
61 | + EEH_HTML::td($form_section->get_html_and_js(), '', '', '', 'colspan="2"') |
|
62 | 62 | ); |
63 | 63 | } |
64 | 64 | return $html; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @subpackage |
9 | 9 | * @author Mike Nelson |
10 | 10 | */ |
11 | -class EE_All_Caps_Normalization extends EE_Normalization_Strategy_Base{ |
|
11 | +class EE_All_Caps_Normalization extends EE_Normalization_Strategy_Base { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @param string $value_to_normalize |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param string $normalized_value |
25 | 25 | * @return string |
26 | 26 | */ |
27 | - public function unnormalize( $normalized_value ) { |
|
27 | + public function unnormalize($normalized_value) { |
|
28 | 28 | return $normalized_value; |
29 | 29 | } |
30 | 30 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
2 | 2 | /** |
3 | - * EE_All_Caps_Normalization |
|
4 | - * Just makes sure the string is all upper case. If the user didn't provide an all |
|
5 | - * upper case input, we just correct it for them |
|
6 | - * |
|
7 | - * @package Event Espresso |
|
8 | - * @subpackage |
|
9 | - * @author Mike Nelson |
|
10 | - */ |
|
3 | + * EE_All_Caps_Normalization |
|
4 | + * Just makes sure the string is all upper case. If the user didn't provide an all |
|
5 | + * upper case input, we just correct it for them |
|
6 | + * |
|
7 | + * @package Event Espresso |
|
8 | + * @subpackage |
|
9 | + * @author Mike Nelson |
|
10 | + */ |
|
11 | 11 | class EE_All_Caps_Normalization extends EE_Normalization_Strategy_Base{ |
12 | 12 | |
13 | 13 | /** |