@@ -8,8 +8,8 @@ |
||
8 | 8 | </label> |
9 | 9 | <textarea id="url-event" cols="30" rows="4" tabindex="112" name="vnu_virtual_url"> |
10 | 10 | <?php $_venue->f( |
11 | - 'VNU_virtual_url' |
|
12 | - ); ?></textarea> |
|
11 | + 'VNU_virtual_url' |
|
12 | + ); ?></textarea> |
|
13 | 13 | </p> |
14 | 14 | <p> |
15 | 15 | <label for="call-in-num" style="display:inline-block; width:100px;"> |
@@ -8,9 +8,9 @@ |
||
8 | 8 | </p> |
9 | 9 | <p><a href="admin.php?page=espresso_venues"> |
10 | 10 | <?php echo __( |
11 | - 'Add venues to the Venue Manager', |
|
12 | - 'event_espresso' |
|
13 | - ) ?></a></p> |
|
11 | + 'Add venues to the Venue Manager', |
|
12 | + 'event_espresso' |
|
13 | + ) ?></a></p> |
|
14 | 14 | </fieldset> |
15 | 15 | </td> |
16 | 16 | </tr> |
@@ -3,10 +3,10 @@ discard block |
||
3 | 3 | <td valign="top"> |
4 | 4 | <fieldset> |
5 | 5 | <?php |
6 | - if (isset(EE_Registry::instance()->CFG->map_settings) |
|
7 | - && isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) |
|
8 | - && EE_Registry::instance()->CFG->map_settings->use_google_maps |
|
9 | - ) { ?> |
|
6 | + if (isset(EE_Registry::instance()->CFG->map_settings) |
|
7 | + && isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) |
|
8 | + && EE_Registry::instance()->CFG->map_settings->use_google_maps |
|
9 | + ) { ?> |
|
10 | 10 | <p> |
11 | 11 | <label for="enable_for_gmap"> |
12 | 12 | <?php _e('Display Google Map for this venue? ', 'event_espresso') ?> |
@@ -19,22 +19,22 @@ discard block |
||
19 | 19 | </p> --> |
20 | 20 | <?php } ?> |
21 | 21 | <?php |
22 | - if (! isset(EE_Registry::instance()->CFG->map_settings) |
|
23 | - || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) |
|
24 | - || ! EE_Registry::instance()->CFG->map_settings->use_google_maps |
|
25 | - ) { ?> |
|
22 | + if (! isset(EE_Registry::instance()->CFG->map_settings) |
|
23 | + || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) |
|
24 | + || ! EE_Registry::instance()->CFG->map_settings->use_google_maps |
|
25 | + ) { ?> |
|
26 | 26 | <p class="ee-notice"> |
27 | 27 | <?php |
28 | - echo sprintf( |
|
29 | - __( |
|
30 | - 'To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', |
|
31 | - 'event_espresso' |
|
32 | - ), |
|
33 | - '<b>', |
|
34 | - '</b> » <b>', |
|
35 | - '</b>' |
|
36 | - ); |
|
37 | - ?> |
|
28 | + echo sprintf( |
|
29 | + __( |
|
30 | + 'To display a Google Map for event venues, go to %sEvent Espresso General Settings%sGoogle Maps%s, and set "Activate Google Maps" to "Yes"', |
|
31 | + 'event_espresso' |
|
32 | + ), |
|
33 | + '<b>', |
|
34 | + '</b> » <b>', |
|
35 | + '</b>' |
|
36 | + ); |
|
37 | + ?> |
|
38 | 38 | </p> |
39 | 39 | <?php } ?> |
40 | 40 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | </p> --> |
20 | 20 | <?php } ?> |
21 | 21 | <?php |
22 | - if (! isset(EE_Registry::instance()->CFG->map_settings) |
|
22 | + if ( ! isset(EE_Registry::instance()->CFG->map_settings) |
|
23 | 23 | || ! isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) |
24 | 24 | || ! EE_Registry::instance()->CFG->map_settings->use_google_maps |
25 | 25 | ) { ?> |
@@ -11,20 +11,20 @@ discard block |
||
11 | 11 | </th> |
12 | 12 | <td> |
13 | 13 | <?php echo EEH_Form_Fields::select_input( |
14 | - 'use_google_maps', |
|
15 | - $values, |
|
16 | - $map_settings->use_google_maps, |
|
17 | - 'id="ee-display-map-no-shortcodes"' |
|
18 | - ); ?> |
|
14 | + 'use_google_maps', |
|
15 | + $values, |
|
16 | + $map_settings->use_google_maps, |
|
17 | + 'id="ee-display-map-no-shortcodes"' |
|
18 | + ); ?> |
|
19 | 19 | <p class="description"> |
20 | 20 | <?php _e( |
21 | - 'Turn Google maps on or off site wide for Event Espresso.', |
|
22 | - 'event_espresso' |
|
23 | - ); ?></p> |
|
21 | + 'Turn Google maps on or off site wide for Event Espresso.', |
|
22 | + 'event_espresso' |
|
23 | + ); ?></p> |
|
24 | 24 | </td> |
25 | 25 | </tr> |
26 | 26 | <?php |
27 | - if (apply_filters('FHEE__google_map__show_api_key_input', true)) { ?> |
|
27 | + if (apply_filters('FHEE__google_map__show_api_key_input', true)) { ?> |
|
28 | 28 | <tr> |
29 | 29 | <th> |
30 | 30 | <label for="ee-google-map-api-key"> |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | value="<?php echo $map_settings->google_map_api_key; ?>"/> |
37 | 37 | <p class="description"> |
38 | 38 | <?php |
39 | - printf( |
|
40 | - __( |
|
41 | - 'An API key is now required to use the Google Maps API: %1$sclick here to get an API key%2$s', |
|
42 | - 'event_espresso' |
|
43 | - ), |
|
44 | - '<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">', |
|
45 | - '</a>' |
|
46 | - ); |
|
47 | - ?> |
|
39 | + printf( |
|
40 | + __( |
|
41 | + 'An API key is now required to use the Google Maps API: %1$sclick here to get an API key%2$s', |
|
42 | + 'event_espresso' |
|
43 | + ), |
|
44 | + '<a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true" target="_blank">', |
|
45 | + '</a>' |
|
46 | + ); |
|
47 | + ?> |
|
48 | 48 | </p> |
49 | 49 | </td> |
50 | 50 | </tr> |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | </th> |
106 | 106 | <td> |
107 | 107 | <?php echo EEH_Form_Fields::select_input( |
108 | - 'event_details_display_nav', |
|
109 | - $values, |
|
110 | - $map_settings->event_details_display_nav, |
|
111 | - 'id="event_details_display_nav" ' |
|
112 | - ); ?> |
|
108 | + 'event_details_display_nav', |
|
109 | + $values, |
|
110 | + $map_settings->event_details_display_nav, |
|
111 | + 'id="event_details_display_nav" ' |
|
112 | + ); ?> |
|
113 | 113 | </td> |
114 | 114 | </tr> |
115 | 115 | |
@@ -121,11 +121,11 @@ discard block |
||
121 | 121 | </th> |
122 | 122 | <td> |
123 | 123 | <?php echo EEH_Form_Fields::select_input( |
124 | - 'event_details_nav_size', |
|
125 | - $values, |
|
126 | - $map_settings->event_details_nav_size, |
|
127 | - 'id="event_details_nav_size"' |
|
128 | - ); ?> |
|
124 | + 'event_details_nav_size', |
|
125 | + $values, |
|
126 | + $map_settings->event_details_nav_size, |
|
127 | + 'id="event_details_nav_size"' |
|
128 | + ); ?> |
|
129 | 129 | </td> |
130 | 130 | </tr> |
131 | 131 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | <td> |
137 | 137 | <label for="event_details_control_type-default" class="ee-admin-radio-lbl"> |
138 | 138 | <?php $checked = $map_settings->event_details_control_type == 'default' ? 'checked="checked"' |
139 | - : ''; ?> |
|
139 | + : ''; ?> |
|
140 | 140 | <input id="event_details_control_type-default" type="radio" name="event_details_control_type" |
141 | 141 | value="default"<?php echo $checked; ?>/> |
142 | 142 | <?php _e(' Default', 'event_espresso') ?> |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | <label for="event_details_control_type-horizontal" class="ee-admin-radio-lbl"> |
146 | 146 | <?php $checked = $map_settings->event_details_control_type == 'horizontal' ? 'checked="checked"' |
147 | - : ''; ?> |
|
147 | + : ''; ?> |
|
148 | 148 | <input id="event_details_control_type-horizontal" type="radio" name="event_details_control_type" |
149 | 149 | value="horizontal"<?php echo $checked; ?>/> |
150 | 150 | <?php _e(' Horizontal', 'event_espresso') ?> |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | <label for="event_details_control_type-dropdown" class="ee-admin-radio-lbl"> |
154 | 154 | <?php $checked = $map_settings->event_details_control_type == 'dropdown' ? 'checked="checked"' |
155 | - : ''; ?> |
|
155 | + : ''; ?> |
|
156 | 156 | <input id="event_details_control_type-dropdown" type="radio" name="event_details_control_type" |
157 | 157 | value="dropdown"<?php echo $checked; ?>/> |
158 | 158 | <?php _e(' Dropdown', 'event_espresso') ?> |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | </th> |
247 | 247 | <td> |
248 | 248 | <?php echo EEH_Form_Fields::select_input( |
249 | - 'event_list_display_nav', |
|
250 | - $values, |
|
251 | - $map_settings->event_list_display_nav, |
|
252 | - 'id="event_list_display_nav"' |
|
253 | - ); ?> |
|
249 | + 'event_list_display_nav', |
|
250 | + $values, |
|
251 | + $map_settings->event_list_display_nav, |
|
252 | + 'id="event_list_display_nav"' |
|
253 | + ); ?> |
|
254 | 254 | </td> |
255 | 255 | </tr> |
256 | 256 | |
@@ -262,11 +262,11 @@ discard block |
||
262 | 262 | </th> |
263 | 263 | <td> |
264 | 264 | <?php echo EEH_Form_Fields::select_input( |
265 | - 'event_list_nav_size', |
|
266 | - $values, |
|
267 | - $map_settings->event_list_nav_size, |
|
268 | - 'id="event_list_nav_size"' |
|
269 | - ); ?> |
|
265 | + 'event_list_nav_size', |
|
266 | + $values, |
|
267 | + $map_settings->event_list_nav_size, |
|
268 | + 'id="event_list_nav_size"' |
|
269 | + ); ?> |
|
270 | 270 | </td> |
271 | 271 | </tr> |
272 | 272 | |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | <label for="event_list_control_type-horizontal" class="ee-admin-radio-lbl"> |
286 | 286 | <?php $checked = $map_settings->event_list_control_type == 'horizontal' ? 'checked="checked"' |
287 | - : ''; ?> |
|
287 | + : ''; ?> |
|
288 | 288 | <input id="event_list_control_type-horizontal" type="radio" name="event_list_control_type" |
289 | 289 | value="horizontal"<?php echo $checked; ?>/> |
290 | 290 | <?php _e(' Horizontal', 'event_espresso') ?> |
@@ -4,14 +4,14 @@ discard block |
||
4 | 4 | <label><?php _e('Select from Venue Manager List', 'event_espresso'); ?></label> |
5 | 5 | <?php echo $venue_selector; ?> |
6 | 6 | <?php foreach ($venues as $venue) : |
7 | - $selected = $evt_venue_id == $venue->ID() ? '' : ' style="display:none;"'; |
|
8 | - $edit_url = EE_Admin_Page::add_query_args_and_nonce( |
|
9 | - array('action' => 'edit', 'post' => $venue->ID()), |
|
10 | - EE_VENUES_ADMIN_URL |
|
11 | - ); |
|
12 | - $state_name = is_object($venue->state_obj()) ? $venue->state_obj()->name() : null; |
|
13 | - $country_name = is_object($venue->country_obj()) ? $venue->country_obj()->name() : null; |
|
14 | - ?> |
|
7 | + $selected = $evt_venue_id == $venue->ID() ? '' : ' style="display:none;"'; |
|
8 | + $edit_url = EE_Admin_Page::add_query_args_and_nonce( |
|
9 | + array('action' => 'edit', 'post' => $venue->ID()), |
|
10 | + EE_VENUES_ADMIN_URL |
|
11 | + ); |
|
12 | + $state_name = is_object($venue->state_obj()) ? $venue->state_obj()->name() : null; |
|
13 | + $country_name = is_object($venue->country_obj()) ? $venue->country_obj()->name() : null; |
|
14 | + ?> |
|
15 | 15 | <fieldset id="eebox_<?php echo $venue->ID(); ?>" class="eebox"<?php echo $selected; ?>> |
16 | 16 | <ul class="address-view"> |
17 | 17 | <li> |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | <br/></p> |
27 | 27 | <a href="<?php echo $edit_url; ?>" target="_blank"> |
28 | 28 | <?php _e( |
29 | - 'Edit this Venue', |
|
30 | - 'event_espresso' |
|
31 | - ); ?></a> |
|
29 | + 'Edit this Venue', |
|
30 | + 'event_espresso' |
|
31 | + ); ?></a> |
|
32 | 32 | </li> |
33 | 33 | </ul> |
34 | 34 | </fieldset> |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - protected function _set_tips_array() |
|
19 | - { |
|
20 | - $this->_qtipsa = array( |
|
21 | - 0 => array( |
|
22 | - 'content_id' => 'registration-trash-lock', |
|
23 | - 'target' => '.ee-lock-icon', |
|
24 | - 'content' => $this->_registration_trash_message(), |
|
25 | - ), |
|
26 | - /** removing status strips for now because they are triggered anywhere on the row. */ |
|
27 | - /**1 => array( |
|
18 | + protected function _set_tips_array() |
|
19 | + { |
|
20 | + $this->_qtipsa = array( |
|
21 | + 0 => array( |
|
22 | + 'content_id' => 'registration-trash-lock', |
|
23 | + 'target' => '.ee-lock-icon', |
|
24 | + 'content' => $this->_registration_trash_message(), |
|
25 | + ), |
|
26 | + /** removing status strips for now because they are triggered anywhere on the row. */ |
|
27 | + /**1 => array( |
|
28 | 28 | * 'content_id' => 'registration-status-' . EEM_Registration::status_id_approved, |
29 | 29 | * 'target' => '.reg-status-' . EEM_Registration::status_id_approved, |
30 | 30 | * 'content' => $this->_registration_status_legend(EEM_Registration::status_id_approved), |
@@ -74,37 +74,37 @@ discard block |
||
74 | 74 | * ) |
75 | 75 | * ) |
76 | 76 | * )/**/ |
77 | - ); |
|
78 | - } |
|
77 | + ); |
|
78 | + } |
|
79 | 79 | |
80 | 80 | |
81 | - private function _registration_trash_message() |
|
82 | - { |
|
83 | - return '<p>' |
|
84 | - . __( |
|
85 | - 'This lock-icon means that this registration cannot be trashed. Registrations that belong to a transaction that has payments cannot be trashed. If you wish to trash this registration then you must delete all payments attached to the related transaction first.', |
|
86 | - 'event_espresso' |
|
87 | - ) . '</p>'; |
|
88 | - } |
|
81 | + private function _registration_trash_message() |
|
82 | + { |
|
83 | + return '<p>' |
|
84 | + . __( |
|
85 | + 'This lock-icon means that this registration cannot be trashed. Registrations that belong to a transaction that has payments cannot be trashed. If you wish to trash this registration then you must delete all payments attached to the related transaction first.', |
|
86 | + 'event_espresso' |
|
87 | + ) . '</p>'; |
|
88 | + } |
|
89 | 89 | |
90 | 90 | |
91 | - /** |
|
92 | - * output the relevant ee-status-legend with the designated status highlighted. |
|
93 | - * |
|
94 | - * @param EEM_Registration constant $status What status is set (by class) |
|
95 | - * @return string The status legend with the related status highlighted |
|
96 | - */ |
|
97 | - private function _registration_status_legend($status) |
|
98 | - { |
|
91 | + /** |
|
92 | + * output the relevant ee-status-legend with the designated status highlighted. |
|
93 | + * |
|
94 | + * @param EEM_Registration constant $status What status is set (by class) |
|
95 | + * @return string The status legend with the related status highlighted |
|
96 | + */ |
|
97 | + private function _registration_status_legend($status) |
|
98 | + { |
|
99 | 99 | |
100 | - $status_array = array( |
|
101 | - 'approved_status' => EEM_Registration::status_id_approved, |
|
102 | - 'pending_status' => EEM_Registration::status_id_pending_payment, |
|
103 | - 'not_approved' => EEM_Registration::status_id_not_approved, |
|
104 | - 'declined_status' => EEM_Registration::status_id_declined, |
|
105 | - 'cancelled_status' => EEM_Registration::status_id_cancelled, |
|
106 | - ); |
|
100 | + $status_array = array( |
|
101 | + 'approved_status' => EEM_Registration::status_id_approved, |
|
102 | + 'pending_status' => EEM_Registration::status_id_pending_payment, |
|
103 | + 'not_approved' => EEM_Registration::status_id_not_approved, |
|
104 | + 'declined_status' => EEM_Registration::status_id_declined, |
|
105 | + 'cancelled_status' => EEM_Registration::status_id_cancelled, |
|
106 | + ); |
|
107 | 107 | |
108 | - return EEH_Template::status_legend($status_array, $status); |
|
109 | - } |
|
108 | + return EEH_Template::status_legend($status_array, $status); |
|
109 | + } |
|
110 | 110 | } |
@@ -84,7 +84,7 @@ |
||
84 | 84 | . __( |
85 | 85 | 'This lock-icon means that this registration cannot be trashed. Registrations that belong to a transaction that has payments cannot be trashed. If you wish to trash this registration then you must delete all payments attached to the related transaction first.', |
86 | 86 | 'event_espresso' |
87 | - ) . '</p>'; |
|
87 | + ).'</p>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 |
@@ -13,50 +13,50 @@ |
||
13 | 13 | { |
14 | 14 | |
15 | 15 | |
16 | - /** |
|
17 | - * constructor |
|
18 | - * |
|
19 | - * @Constructor |
|
20 | - * @access public |
|
21 | - * @return void |
|
22 | - */ |
|
23 | - public function __construct() |
|
24 | - { |
|
25 | - do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
26 | - if (! defined('REG_PG_SLUG')) { |
|
27 | - define('REG_PG_SLUG', 'espresso_registrations'); |
|
28 | - define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
|
29 | - define('REG_ADMIN', EE_ADMIN_PAGES . 'registrations' . DS); |
|
30 | - define('REG_ADMIN_URL', admin_url('admin.php?page=' . REG_PG_SLUG)); |
|
31 | - define('REG_ASSETS_PATH', REG_ADMIN . 'assets' . DS); |
|
32 | - define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/'); |
|
33 | - define('REG_TEMPLATE_PATH', REG_ADMIN . 'templates' . DS); |
|
34 | - define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/'); |
|
35 | - } |
|
36 | - |
|
37 | - parent::__construct(); |
|
38 | - } |
|
39 | - |
|
40 | - |
|
41 | - protected function _set_init_properties() |
|
42 | - { |
|
43 | - $this->label = __('Registrations Overview', 'event_espresso'); |
|
44 | - } |
|
45 | - |
|
46 | - |
|
47 | - protected function _set_menu_map() |
|
48 | - { |
|
49 | - $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
50 | - array( |
|
51 | - 'menu_group' => 'main', |
|
52 | - 'menu_order' => 40, |
|
53 | - 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
54 | - 'parent_slug' => 'espresso_events', |
|
55 | - 'menu_slug' => REG_PG_SLUG, |
|
56 | - 'menu_label' => __('Registrations', 'event_espresso'), |
|
57 | - 'capability' => 'ee_read_registrations', |
|
58 | - 'admin_init_page' => $this, |
|
59 | - ) |
|
60 | - ); |
|
61 | - } |
|
16 | + /** |
|
17 | + * constructor |
|
18 | + * |
|
19 | + * @Constructor |
|
20 | + * @access public |
|
21 | + * @return void |
|
22 | + */ |
|
23 | + public function __construct() |
|
24 | + { |
|
25 | + do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
|
26 | + if (! defined('REG_PG_SLUG')) { |
|
27 | + define('REG_PG_SLUG', 'espresso_registrations'); |
|
28 | + define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
|
29 | + define('REG_ADMIN', EE_ADMIN_PAGES . 'registrations' . DS); |
|
30 | + define('REG_ADMIN_URL', admin_url('admin.php?page=' . REG_PG_SLUG)); |
|
31 | + define('REG_ASSETS_PATH', REG_ADMIN . 'assets' . DS); |
|
32 | + define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/'); |
|
33 | + define('REG_TEMPLATE_PATH', REG_ADMIN . 'templates' . DS); |
|
34 | + define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/'); |
|
35 | + } |
|
36 | + |
|
37 | + parent::__construct(); |
|
38 | + } |
|
39 | + |
|
40 | + |
|
41 | + protected function _set_init_properties() |
|
42 | + { |
|
43 | + $this->label = __('Registrations Overview', 'event_espresso'); |
|
44 | + } |
|
45 | + |
|
46 | + |
|
47 | + protected function _set_menu_map() |
|
48 | + { |
|
49 | + $this->_menu_map = new EE_Admin_Page_Sub_Menu( |
|
50 | + array( |
|
51 | + 'menu_group' => 'main', |
|
52 | + 'menu_order' => 40, |
|
53 | + 'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY, |
|
54 | + 'parent_slug' => 'espresso_events', |
|
55 | + 'menu_slug' => REG_PG_SLUG, |
|
56 | + 'menu_label' => __('Registrations', 'event_espresso'), |
|
57 | + 'capability' => 'ee_read_registrations', |
|
58 | + 'admin_init_page' => $this, |
|
59 | + ) |
|
60 | + ); |
|
61 | + } |
|
62 | 62 | } |
@@ -23,15 +23,15 @@ |
||
23 | 23 | public function __construct() |
24 | 24 | { |
25 | 25 | do_action('AHEE_log', __FILE__, __FUNCTION__, ''); |
26 | - if (! defined('REG_PG_SLUG')) { |
|
26 | + if ( ! defined('REG_PG_SLUG')) { |
|
27 | 27 | define('REG_PG_SLUG', 'espresso_registrations'); |
28 | 28 | define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG))); |
29 | - define('REG_ADMIN', EE_ADMIN_PAGES . 'registrations' . DS); |
|
30 | - define('REG_ADMIN_URL', admin_url('admin.php?page=' . REG_PG_SLUG)); |
|
31 | - define('REG_ASSETS_PATH', REG_ADMIN . 'assets' . DS); |
|
32 | - define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/'); |
|
33 | - define('REG_TEMPLATE_PATH', REG_ADMIN . 'templates' . DS); |
|
34 | - define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/'); |
|
29 | + define('REG_ADMIN', EE_ADMIN_PAGES.'registrations'.DS); |
|
30 | + define('REG_ADMIN_URL', admin_url('admin.php?page='.REG_PG_SLUG)); |
|
31 | + define('REG_ASSETS_PATH', REG_ADMIN.'assets'.DS); |
|
32 | + define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL.'registrations/assets/'); |
|
33 | + define('REG_TEMPLATE_PATH', REG_ADMIN.'templates'.DS); |
|
34 | + define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registrations/templates/'); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | parent::__construct(); |
@@ -15,162 +15,162 @@ |
||
15 | 15 | */ |
16 | 16 | class EE_Registration_Custom_Questions_Form extends EE_Form_Section_Proper |
17 | 17 | { |
18 | - /** |
|
19 | - * |
|
20 | - * @var EE_Registration |
|
21 | - */ |
|
22 | - protected $_registration = null; |
|
18 | + /** |
|
19 | + * |
|
20 | + * @var EE_Registration |
|
21 | + */ |
|
22 | + protected $_registration = null; |
|
23 | 23 | |
24 | - /** |
|
25 | - * |
|
26 | - * @param EE_Registration $reg |
|
27 | - * @param array $options |
|
28 | - */ |
|
29 | - public function __construct(EE_Registration $reg, $options = array()) |
|
30 | - { |
|
31 | - $this->_registration = $reg; |
|
32 | - if (! isset($options['layout_strategy'])) { |
|
33 | - $options['layout_strategy'] = new EE_Admin_Two_Column_Layout(); |
|
34 | - } |
|
35 | - if (! isset($options['html_id'])) { |
|
36 | - $options['html_id'] = 'reg-admin-attendee-questions-frm'; |
|
37 | - } |
|
38 | - $this->build_form_from_registration(); |
|
39 | - parent::__construct($options); |
|
40 | - } |
|
24 | + /** |
|
25 | + * |
|
26 | + * @param EE_Registration $reg |
|
27 | + * @param array $options |
|
28 | + */ |
|
29 | + public function __construct(EE_Registration $reg, $options = array()) |
|
30 | + { |
|
31 | + $this->_registration = $reg; |
|
32 | + if (! isset($options['layout_strategy'])) { |
|
33 | + $options['layout_strategy'] = new EE_Admin_Two_Column_Layout(); |
|
34 | + } |
|
35 | + if (! isset($options['html_id'])) { |
|
36 | + $options['html_id'] = 'reg-admin-attendee-questions-frm'; |
|
37 | + } |
|
38 | + $this->build_form_from_registration(); |
|
39 | + parent::__construct($options); |
|
40 | + } |
|
41 | 41 | |
42 | 42 | |
43 | - /** |
|
44 | - * Gets the registration object this form is about |
|
45 | - * @return EE_Registration |
|
46 | - */ |
|
47 | - public function get_registration() |
|
48 | - { |
|
49 | - return $this->_registration; |
|
50 | - } |
|
43 | + /** |
|
44 | + * Gets the registration object this form is about |
|
45 | + * @return EE_Registration |
|
46 | + */ |
|
47 | + public function get_registration() |
|
48 | + { |
|
49 | + return $this->_registration; |
|
50 | + } |
|
51 | 51 | |
52 | - public function build_form_from_registration() |
|
53 | - { |
|
54 | - $reg = $this->get_registration(); |
|
55 | - if (! $reg instanceof EE_Registration) { |
|
56 | - throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso')); |
|
57 | - } |
|
58 | - // we want to get all their question groups |
|
59 | - $question_groups = EEM_Question_Group::instance()->get_all( |
|
60 | - array( |
|
61 | - array( |
|
62 | - 'Event_Question_Group.EVT_ID' => $reg->event_ID(), |
|
63 | - 'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false, |
|
64 | - 'OR' => array( |
|
65 | - 'Question.QST_system*blank' => '', |
|
66 | - 'Question.QST_system*null' => array( 'IS_NULL' ) |
|
67 | - ) |
|
68 | - ), |
|
69 | - 'order_by' => array( 'QSG_order' => 'ASC' ) |
|
70 | - ) |
|
71 | - ); |
|
72 | - // get each question groups questions |
|
73 | - foreach ($question_groups as $question_group) { |
|
74 | - if ($question_group instanceof EE_Question_Group) { |
|
75 | - $this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group( |
|
76 | - $question_group, |
|
77 | - $reg |
|
78 | - ); |
|
79 | - } |
|
80 | - } |
|
81 | - } |
|
52 | + public function build_form_from_registration() |
|
53 | + { |
|
54 | + $reg = $this->get_registration(); |
|
55 | + if (! $reg instanceof EE_Registration) { |
|
56 | + throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso')); |
|
57 | + } |
|
58 | + // we want to get all their question groups |
|
59 | + $question_groups = EEM_Question_Group::instance()->get_all( |
|
60 | + array( |
|
61 | + array( |
|
62 | + 'Event_Question_Group.EVT_ID' => $reg->event_ID(), |
|
63 | + 'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false, |
|
64 | + 'OR' => array( |
|
65 | + 'Question.QST_system*blank' => '', |
|
66 | + 'Question.QST_system*null' => array( 'IS_NULL' ) |
|
67 | + ) |
|
68 | + ), |
|
69 | + 'order_by' => array( 'QSG_order' => 'ASC' ) |
|
70 | + ) |
|
71 | + ); |
|
72 | + // get each question groups questions |
|
73 | + foreach ($question_groups as $question_group) { |
|
74 | + if ($question_group instanceof EE_Question_Group) { |
|
75 | + $this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group( |
|
76 | + $question_group, |
|
77 | + $reg |
|
78 | + ); |
|
79 | + } |
|
80 | + } |
|
81 | + } |
|
82 | 82 | |
83 | 83 | |
84 | 84 | |
85 | - /** |
|
86 | - * |
|
87 | - * @param EE_Question_Group $question_group |
|
88 | - * @param EE_Registration $registration |
|
89 | - * @return \EE_Form_Section_Proper |
|
90 | - * @throws \EE_Error |
|
91 | - */ |
|
92 | - public function build_subform_from_question_group($question_group, $registration) |
|
93 | - { |
|
94 | - if (! $question_group instanceof EE_Question_Group || |
|
95 | - ! $registration instanceof EE_Registration) { |
|
96 | - throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso')); |
|
97 | - } |
|
98 | - $parts_of_subsection = array( |
|
99 | - 'title' => new EE_Form_Section_HTML( |
|
100 | - EEH_HTML::h5( |
|
101 | - $question_group->name(), |
|
102 | - $question_group->identifier(), |
|
103 | - 'espresso-question-group-title-h5 section-title' |
|
104 | - ) |
|
105 | - ) |
|
106 | - ); |
|
107 | - $questions = $question_group->questions( |
|
108 | - array( |
|
109 | - array( |
|
110 | - 'OR' => array( |
|
111 | - 'QST_system*blank' => '', |
|
112 | - 'QST_system*null' => array( 'IS_NULL' ) |
|
113 | - ) |
|
114 | - ) |
|
115 | - ) |
|
116 | - ); |
|
117 | - foreach ($questions as $question) { |
|
118 | - $parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration); |
|
119 | - } |
|
120 | - $parts_of_subsection['edit_link'] = new EE_Form_Section_HTML( |
|
121 | - '<tr><th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso') . '"> |
|
85 | + /** |
|
86 | + * |
|
87 | + * @param EE_Question_Group $question_group |
|
88 | + * @param EE_Registration $registration |
|
89 | + * @return \EE_Form_Section_Proper |
|
90 | + * @throws \EE_Error |
|
91 | + */ |
|
92 | + public function build_subform_from_question_group($question_group, $registration) |
|
93 | + { |
|
94 | + if (! $question_group instanceof EE_Question_Group || |
|
95 | + ! $registration instanceof EE_Registration) { |
|
96 | + throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso')); |
|
97 | + } |
|
98 | + $parts_of_subsection = array( |
|
99 | + 'title' => new EE_Form_Section_HTML( |
|
100 | + EEH_HTML::h5( |
|
101 | + $question_group->name(), |
|
102 | + $question_group->identifier(), |
|
103 | + 'espresso-question-group-title-h5 section-title' |
|
104 | + ) |
|
105 | + ) |
|
106 | + ); |
|
107 | + $questions = $question_group->questions( |
|
108 | + array( |
|
109 | + array( |
|
110 | + 'OR' => array( |
|
111 | + 'QST_system*blank' => '', |
|
112 | + 'QST_system*null' => array( 'IS_NULL' ) |
|
113 | + ) |
|
114 | + ) |
|
115 | + ) |
|
116 | + ); |
|
117 | + foreach ($questions as $question) { |
|
118 | + $parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration); |
|
119 | + } |
|
120 | + $parts_of_subsection['edit_link'] = new EE_Form_Section_HTML( |
|
121 | + '<tr><th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso') . '"> |
|
122 | 122 | <span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso') . '</span> |
123 | 123 | <div class="dashicons dashicons-edit"></div> |
124 | 124 | </a></td></tr>' |
125 | - ); |
|
126 | - return new EE_Form_Section_Proper( |
|
127 | - array( |
|
128 | - 'subsections' => $parts_of_subsection, |
|
129 | - 'html_class' => 'question-group-questions', |
|
130 | - ) |
|
131 | - ); |
|
132 | - } |
|
125 | + ); |
|
126 | + return new EE_Form_Section_Proper( |
|
127 | + array( |
|
128 | + 'subsections' => $parts_of_subsection, |
|
129 | + 'html_class' => 'question-group-questions', |
|
130 | + ) |
|
131 | + ); |
|
132 | + } |
|
133 | 133 | |
134 | - /** |
|
135 | - * Overrides parent so if inputs were disabled, we leave those with their defaults |
|
136 | - * from the answers in the DB |
|
137 | - * @param array $req_data like $_POST |
|
138 | - * @return void |
|
139 | - */ |
|
140 | - protected function _normalize($req_data) |
|
141 | - { |
|
142 | - $this->_received_submission = true; |
|
143 | - $this->_validation_errors = array(); |
|
144 | - foreach ($this->get_validatable_subsections() as $subsection) { |
|
145 | - if ($subsection->form_data_present_in($req_data)) { |
|
146 | - try { |
|
147 | - $subsection->_normalize($req_data); |
|
148 | - } catch (EE_Validation_Error $e) { |
|
149 | - $subsection->add_validation_error($e); |
|
150 | - } |
|
151 | - } |
|
152 | - } |
|
153 | - } |
|
134 | + /** |
|
135 | + * Overrides parent so if inputs were disabled, we leave those with their defaults |
|
136 | + * from the answers in the DB |
|
137 | + * @param array $req_data like $_POST |
|
138 | + * @return void |
|
139 | + */ |
|
140 | + protected function _normalize($req_data) |
|
141 | + { |
|
142 | + $this->_received_submission = true; |
|
143 | + $this->_validation_errors = array(); |
|
144 | + foreach ($this->get_validatable_subsections() as $subsection) { |
|
145 | + if ($subsection->form_data_present_in($req_data)) { |
|
146 | + try { |
|
147 | + $subsection->_normalize($req_data); |
|
148 | + } catch (EE_Validation_Error $e) { |
|
149 | + $subsection->add_validation_error($e); |
|
150 | + } |
|
151 | + } |
|
152 | + } |
|
153 | + } |
|
154 | 154 | |
155 | 155 | |
156 | 156 | |
157 | - /** |
|
158 | - * Performs validation on this form section and its subsections. For each subsection, |
|
159 | - * calls _validate_{subsection_name} on THIS form (if the function exists) and passes it the subsection, then calls _validate on that subsection. |
|
160 | - * If you need to perform validation on the form as a whole (considering multiple) you would be best to override this _validate method, |
|
161 | - * calling parent::_validate() first. |
|
162 | - */ |
|
163 | - protected function _validate() |
|
164 | - { |
|
165 | - foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) { |
|
166 | - if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) { |
|
167 | - if (method_exists($this, '_validate_'.$subsection_name)) { |
|
168 | - call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection)); |
|
169 | - } |
|
170 | - $subsection->_validate(); |
|
171 | - } elseif ($subsection instanceof EE_Form_Section_Proper) { |
|
172 | - $subsection->_received_submission = true; |
|
173 | - } |
|
174 | - } |
|
175 | - } |
|
157 | + /** |
|
158 | + * Performs validation on this form section and its subsections. For each subsection, |
|
159 | + * calls _validate_{subsection_name} on THIS form (if the function exists) and passes it the subsection, then calls _validate on that subsection. |
|
160 | + * If you need to perform validation on the form as a whole (considering multiple) you would be best to override this _validate method, |
|
161 | + * calling parent::_validate() first. |
|
162 | + */ |
|
163 | + protected function _validate() |
|
164 | + { |
|
165 | + foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) { |
|
166 | + if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) { |
|
167 | + if (method_exists($this, '_validate_'.$subsection_name)) { |
|
168 | + call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection)); |
|
169 | + } |
|
170 | + $subsection->_validate(); |
|
171 | + } elseif ($subsection instanceof EE_Form_Section_Proper) { |
|
172 | + $subsection->_received_submission = true; |
|
173 | + } |
|
174 | + } |
|
175 | + } |
|
176 | 176 | } |
@@ -29,10 +29,10 @@ discard block |
||
29 | 29 | public function __construct(EE_Registration $reg, $options = array()) |
30 | 30 | { |
31 | 31 | $this->_registration = $reg; |
32 | - if (! isset($options['layout_strategy'])) { |
|
32 | + if ( ! isset($options['layout_strategy'])) { |
|
33 | 33 | $options['layout_strategy'] = new EE_Admin_Two_Column_Layout(); |
34 | 34 | } |
35 | - if (! isset($options['html_id'])) { |
|
35 | + if ( ! isset($options['html_id'])) { |
|
36 | 36 | $options['html_id'] = 'reg-admin-attendee-questions-frm'; |
37 | 37 | } |
38 | 38 | $this->build_form_from_registration(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function build_form_from_registration() |
53 | 53 | { |
54 | 54 | $reg = $this->get_registration(); |
55 | - if (! $reg instanceof EE_Registration) { |
|
55 | + if ( ! $reg instanceof EE_Registration) { |
|
56 | 56 | throw new EE_Error(__('We cannot build the registration custom questions form because there is no registration set on it yet', 'event_espresso')); |
57 | 57 | } |
58 | 58 | // we want to get all their question groups |
@@ -63,16 +63,16 @@ discard block |
||
63 | 63 | 'Event_Question_Group.EQG_primary' => $reg->count() == 1 ? true : false, |
64 | 64 | 'OR' => array( |
65 | 65 | 'Question.QST_system*blank' => '', |
66 | - 'Question.QST_system*null' => array( 'IS_NULL' ) |
|
66 | + 'Question.QST_system*null' => array('IS_NULL') |
|
67 | 67 | ) |
68 | 68 | ), |
69 | - 'order_by' => array( 'QSG_order' => 'ASC' ) |
|
69 | + 'order_by' => array('QSG_order' => 'ASC') |
|
70 | 70 | ) |
71 | 71 | ); |
72 | 72 | // get each question groups questions |
73 | 73 | foreach ($question_groups as $question_group) { |
74 | 74 | if ($question_group instanceof EE_Question_Group) { |
75 | - $this->_subsections[ $question_group->ID() ] = $this->build_subform_from_question_group( |
|
75 | + $this->_subsections[$question_group->ID()] = $this->build_subform_from_question_group( |
|
76 | 76 | $question_group, |
77 | 77 | $reg |
78 | 78 | ); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function build_subform_from_question_group($question_group, $registration) |
93 | 93 | { |
94 | - if (! $question_group instanceof EE_Question_Group || |
|
94 | + if ( ! $question_group instanceof EE_Question_Group || |
|
95 | 95 | ! $registration instanceof EE_Registration) { |
96 | 96 | throw new EE_Error(__('A valid question group and registration must be passed to EE_Registration_Custom_Question_Form', 'event_espresso')); |
97 | 97 | } |
@@ -109,17 +109,17 @@ discard block |
||
109 | 109 | array( |
110 | 110 | 'OR' => array( |
111 | 111 | 'QST_system*blank' => '', |
112 | - 'QST_system*null' => array( 'IS_NULL' ) |
|
112 | + 'QST_system*null' => array('IS_NULL') |
|
113 | 113 | ) |
114 | 114 | ) |
115 | 115 | ) |
116 | 116 | ); |
117 | 117 | foreach ($questions as $question) { |
118 | - $parts_of_subsection[ $question->ID() ] = $question->generate_form_input($registration); |
|
118 | + $parts_of_subsection[$question->ID()] = $question->generate_form_input($registration); |
|
119 | 119 | } |
120 | 120 | $parts_of_subsection['edit_link'] = new EE_Form_Section_HTML( |
121 | - '<tr><th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" title="' . esc_attr__('click to edit question', 'event_espresso') . '"> |
|
122 | - <span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso') . '</span> |
|
121 | + '<tr><th/><td class="reg-admin-edit-attendee-question-td"><a class="reg-admin-edit-attendee-question-lnk" href="#" title="'.esc_attr__('click to edit question', 'event_espresso').'"> |
|
122 | + <span class="reg-admin-edit-question-group-spn lt-grey-txt">' . __('edit the above question group', 'event_espresso').'</span> |
|
123 | 123 | <div class="dashicons dashicons-edit"></div> |
124 | 124 | </a></td></tr>' |
125 | 125 | ); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | foreach ($this->get_validatable_subsections() as $subsection_name => $subsection) { |
166 | 166 | if ($subsection->form_data_present_in(array_merge($_GET, $_POST))) { |
167 | 167 | if (method_exists($this, '_validate_'.$subsection_name)) { |
168 | - call_user_func_array(array($this,'_validate_'.$subsection_name), array($subsection)); |
|
168 | + call_user_func_array(array($this, '_validate_'.$subsection_name), array($subsection)); |
|
169 | 169 | } |
170 | 170 | $subsection->_validate(); |
171 | 171 | } elseif ($subsection instanceof EE_Form_Section_Proper) { |
@@ -3,25 +3,25 @@ |
||
3 | 3 | <div class="ee-new-registration-step-content"> |
4 | 4 | <?php echo $content; ?> |
5 | 5 | <?php |
6 | - if ($show_notification_toggle |
|
7 | - && EE_Registry::instance()->CAP->current_user_can( |
|
8 | - 'ee_send_message', |
|
9 | - 'registration_message_type' |
|
10 | - )) : ?> |
|
6 | + if ($show_notification_toggle |
|
7 | + && EE_Registry::instance()->CAP->current_user_can( |
|
8 | + 'ee_send_message', |
|
9 | + 'registration_message_type' |
|
10 | + )) : ?> |
|
11 | 11 | <div class="ee-attention"> |
12 | 12 | <label for="txn_reg_status_change" class="last"> |
13 | 13 | <?php _e( |
14 | - 'Send Related Messages?', |
|
15 | - 'event_espresso' |
|
16 | - ); ?></label> |
|
14 | + 'Send Related Messages?', |
|
15 | + 'event_espresso' |
|
16 | + ); ?></label> |
|
17 | 17 | <input type="checkbox" value="1" name="txn_reg_status_change[send_notifications]" checked=checked> |
18 | 18 | <br/> |
19 | 19 | <br/> |
20 | 20 | <p class="description"> |
21 | 21 | <?php _e( |
22 | - 'Send a notification to registrants after processing?', |
|
23 | - 'event_espresso' |
|
24 | - ); ?></p><br/> |
|
22 | + 'Send a notification to registrants after processing?', |
|
23 | + 'event_espresso' |
|
24 | + ); ?></p><br/> |
|
25 | 25 | <label></label> |
26 | 26 | </div> |
27 | 27 | <?php endif; ?> |