Completed
Branch ADMIN-REFRESH (b2fee6)
by
unknown
05:07 queued 02:36
created
admin/extend/events/templates/event_registration_options.template.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@  discard block
 block discarded – undo
15 15
 
16 16
 <?php
17 17
 $settings_array                = [
18
-    'max_registrants'                 => '<p>
18
+	'max_registrants'                 => '<p>
19 19
         <label for="max-registrants">
20 20
         ' . esc_html__(
21
-        'Maximum number of tickets allowed per order for this event: ',
22
-        'event_espresso'
23
-    ) . '
21
+		'Maximum number of tickets allowed per order for this event: ',
22
+		'event_espresso'
23
+	) . '
24 24
         </label>
25 25
         <input class="ee-numeric"
26 26
                 type="text" 
@@ -30,31 +30,31 @@  discard block
 block discarded – undo
30 30
                 size="4" 
31 31
                 />
32 32
         </p>',
33
-    'additional_registration_options' => $additional_registration_options,
34
-    'display_ticket_selector'         => '<p>
33
+	'additional_registration_options' => $additional_registration_options,
34
+	'display_ticket_selector'         => '<p>
35 35
             <label>' . esc_html__('Display Ticket Selector', 'event_espresso') . '</label>'
36
-            . $display_ticket_selector // already escaped
37
-            . '</p>',
38
-    'alternative_registration_page'   => '<p>
36
+			. $display_ticket_selector // already escaped
37
+			. '</p>',
38
+	'alternative_registration_page'   => '<p>
39 39
             <label>' . esc_html__('Alternative Registration Page', 'event_espresso') . '</label>
40 40
             <input name="externalURL" size="20" type="text" value="' . esc_url_raw($_event->external_url()) . '"> 
41 41
             </p>',
42
-    'event_phone_number'              => '<p>
42
+	'event_phone_number'              => '<p>
43 43
             <label>' . esc_html__('Event Phone Number', 'event_espresso') . '</label>
44 44
             <input name="event_phone" size="20" type="text" value="' . esc_attr($_event->phone()) . '">
45 45
             </p>',
46
-    'default_registration_status'     => '<p>
46
+	'default_registration_status'     => '<p>
47 47
             <label>
48 48
             ' . esc_html__('Default Registration Status', 'event_espresso')
49
-             . EEH_Template::get_help_tab_link('event_editor_event_registration_options_help_tab')
50
-            . '</label>'
51
-             . $EVT_default_registration_status // already escaped
52
-             . '</p>',
49
+			 . EEH_Template::get_help_tab_link('event_editor_event_registration_options_help_tab')
50
+			. '</label>'
51
+			 . $EVT_default_registration_status // already escaped
52
+			 . '</p>',
53 53
 ];
54 54
 // filter
55 55
 $settings_array = apply_filters('FHEE__caffeinated_event_registration_options__template__settings', $settings_array);
56 56
 
57 57
 // echo
58 58
 foreach ($settings_array as $item) {
59
-    echo $item; // already escaped
59
+	echo $item; // already escaped
60 60
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -14,34 +14,34 @@
 block discarded – undo
14 14
     </p>
15 15
 
16 16
 <?php
17
-$settings_array                = [
17
+$settings_array = [
18 18
     'max_registrants'                 => '<p>
19 19
         <label for="max-registrants">
20 20
         ' . esc_html__(
21 21
         'Maximum number of tickets allowed per order for this event: ',
22 22
         'event_espresso'
23
-    ) . '
23
+    ).'
24 24
         </label>
25 25
         <input class="ee-numeric"
26 26
                 type="text" 
27 27
                 id="max-registrants" 
28 28
                 name="additional_limit" 
29
-                value="' . esc_attr($additional_limit) . '"
29
+                value="' . esc_attr($additional_limit).'"
30 30
                 size="4" 
31 31
                 />
32 32
         </p>',
33 33
     'additional_registration_options' => $additional_registration_options,
34 34
     'display_ticket_selector'         => '<p>
35
-            <label>' . esc_html__('Display Ticket Selector', 'event_espresso') . '</label>'
35
+            <label>' . esc_html__('Display Ticket Selector', 'event_espresso').'</label>'
36 36
             . $display_ticket_selector // already escaped
37 37
             . '</p>',
38 38
     'alternative_registration_page'   => '<p>
39
-            <label>' . esc_html__('Alternative Registration Page', 'event_espresso') . '</label>
40
-            <input name="externalURL" size="20" type="text" value="' . esc_url_raw($_event->external_url()) . '"> 
39
+            <label>' . esc_html__('Alternative Registration Page', 'event_espresso').'</label>
40
+            <input name="externalURL" size="20" type="text" value="' . esc_url_raw($_event->external_url()).'"> 
41 41
             </p>',
42 42
     'event_phone_number'              => '<p>
43
-            <label>' . esc_html__('Event Phone Number', 'event_espresso') . '</label>
44
-            <input name="event_phone" size="20" type="text" value="' . esc_attr($_event->phone()) . '">
43
+            <label>' . esc_html__('Event Phone Number', 'event_espresso').'</label>
44
+            <input name="event_phone" size="20" type="text" value="' . esc_attr($_event->phone()).'">
45 45
             </p>',
46 46
     'default_registration_status'     => '<p>
47 47
             <label>
Please login to merge, or discard this patch.
registration_form/templates/question_groups_main_meta_box.template.php 2 patches
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 /* @var EE_Question[] $all_questions */
14 14
 assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));// list of unused questions
15 15
 foreach ($all_questions as $unused_question) {
16
-    assert($unused_question);
17
-    assert($unused_question instanceof EE_Question);
16
+	assert($unused_question);
17
+	assert($unused_question instanceof EE_Question);
18 18
 }
19 19
 /* @var array $values . Array of arrays, where each sub-array contains 2 keys: 'id' (internal value) and 'name' (label for displaying) */
20 20
 assert(is_array($values));
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             <th>
34 34
                 <label for="QSG_name">
35 35
                     <?php esc_html_e('Group Name', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
36
-                        'group_name_info'
37
-                    ); ?>
36
+						'group_name_info'
37
+					); ?>
38 38
                 </label>
39 39
             </th>
40 40
             <td>
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
             <th>
49 49
                 <label for="QSG_identifier">
50 50
                     <?php esc_html_e('Group Identifier', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
51
-                        'group_identifier_info'
52
-                    ); ?>
51
+						'group_identifier_info'
52
+					); ?>
53 53
                 </label>
54 54
             </th>
55 55
             <td>
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
             <th>
69 69
                 <label for="QSG_desc">
70 70
                     <?php esc_html_e('Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
71
-                        'group_description_info'
72
-                    ); ?>
71
+						'group_description_info'
72
+					); ?>
73 73
                 </label>
74 74
             </th>
75 75
             <td>
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
             <th>
83 83
                 <label for="QSG_order">
84 84
                     <?php esc_html_e('Question Group Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
85
-                        'group_order_info'
86
-                    ); ?>
85
+						'group_order_info'
86
+					); ?>
87 87
                 </label>
88 88
             </th>
89 89
             <td>
@@ -96,16 +96,16 @@  discard block
 block discarded – undo
96 96
             <th>
97 97
                 <label for="QSG_show_group_name">
98 98
                     <?php esc_html_e('Show Name', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
99
-                        'show_group_name_info'
100
-                    ); ?>
99
+						'show_group_name_info'
100
+					); ?>
101 101
                 </label>
102 102
             </th>
103 103
             <td>
104 104
                     <?php echo EEH_Form_Fields::select_input(
105
-                        'QSG_show_group_name',
106
-                        $values,
107
-                        $question_group->show_group_name()
108
-                    ); ?>
105
+						'QSG_show_group_name',
106
+						$values,
107
+						$question_group->show_group_name()
108
+					); ?>
109 109
                     <p class="description">
110 110
                         <?php esc_html_e('Show Group Name on Registration Page?', 'event_espresso'); ?>
111 111
                     </p>
@@ -116,19 +116,19 @@  discard block
 block discarded – undo
116 116
             <th>
117 117
                 <label for="QSG_show_group_order">
118 118
                     <?php esc_html_e(' Show Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
119
-                        'show_group_description_info'
120
-                    ); ?>
119
+						'show_group_description_info'
120
+					); ?>
121 121
                 </label>
122 122
             </th>
123 123
             <td>
124 124
                     <?php echo EEH_Form_Fields::select_input(
125
-                        'QSG_show_group_desc',
126
-                        $values,
127
-                        $question_group->show_group_desc()
128
-                    ); ?>
125
+						'QSG_show_group_desc',
126
+						$values,
127
+						$question_group->show_group_desc()
128
+					); ?>
129 129
                     <p class="description"><?php
130
-                        esc_html_e(' Show Group Description on Registration Page?', 'event_espresso');
131
-                    ?></p>
130
+						esc_html_e(' Show Group Description on Registration Page?', 'event_espresso');
131
+					?></p>
132 132
                 <input type="hidden" name="QSG_system" value="<?php echo $question_group->system_group(); ?>">
133 133
             </td>
134 134
         </tr>
@@ -141,89 +141,89 @@  discard block
 block discarded – undo
141 141
     <h2><?php esc_html_e('Questions', 'event_espresso'); ?></h2>
142 142
     <div class="form-table question-group-questions inside">
143 143
         <p><span class="description"><?php
144
-                esc_html_e(
145
-                    'Select which questions should be shown in this group by checking or unchecking boxes. You can drag and drop questions to reorder them. Your changes will be updated when you save.',
146
-                    'event_espresso'
147
-                ); ?></span></p>
144
+				esc_html_e(
145
+					'Select which questions should be shown in this group by checking or unchecking boxes. You can drag and drop questions to reorder them. Your changes will be updated when you save.',
146
+					'event_espresso'
147
+				); ?></span></p>
148 148
         <div>
149 149
             <ul class="question-list-sortable">
150 150
                 <?php
151
-                $question_order = 0;
152
-                $question_group_questions = $question_group->questions();
153
-                foreach ($all_questions as $question_ID => $question) {
154
-                    if ($question instanceof EE_Question) {
155
-                        /*@var $question EE_Question*/
156
-                        $checked = isset($question_group_questions[ $question_ID ]) ? ' checked="checked"' : '';
157
-                        // disable questions from the personal information question group
158
-                        // is it required in the current question group? if so don't allow admins to remove it
159
-                        $disabled = in_array(
160
-                            $question->system_ID(),
161
-                            EEM_Question::instance()->required_system_questions_in_system_question_group(
162
-                                $QSG_system
163
-                            )
164
-                        ) ? 'disabled="disabled"' : '';
165
-                        // limit where system questions can appear
166
-                        if (
167
-                            $question->system_ID() &&
168
-                            ! in_array(
169
-                                $question->system_ID(),
170
-                                EEM_Question::instance()->allowed_system_questions_in_system_question_group(
171
-                                    $QSG_system
172
-                                )
173
-                            )
174
-                        ) {
175
-                            continue; // skip over system question not assigned to this group except for the address system group cause we want the address questions to display even if they aren't selected (but still not show the personal system questions).  The third condition checks if we're displaying a non system question group and the question is a system question, then we skip because for non-system question groups we only want to show non-system questions.
176
-                        }
177
-                        ?>
151
+				$question_order = 0;
152
+				$question_group_questions = $question_group->questions();
153
+				foreach ($all_questions as $question_ID => $question) {
154
+					if ($question instanceof EE_Question) {
155
+						/*@var $question EE_Question*/
156
+						$checked = isset($question_group_questions[ $question_ID ]) ? ' checked="checked"' : '';
157
+						// disable questions from the personal information question group
158
+						// is it required in the current question group? if so don't allow admins to remove it
159
+						$disabled = in_array(
160
+							$question->system_ID(),
161
+							EEM_Question::instance()->required_system_questions_in_system_question_group(
162
+								$QSG_system
163
+							)
164
+						) ? 'disabled="disabled"' : '';
165
+						// limit where system questions can appear
166
+						if (
167
+							$question->system_ID() &&
168
+							! in_array(
169
+								$question->system_ID(),
170
+								EEM_Question::instance()->allowed_system_questions_in_system_question_group(
171
+									$QSG_system
172
+								)
173
+							)
174
+						) {
175
+							continue; // skip over system question not assigned to this group except for the address system group cause we want the address questions to display even if they aren't selected (but still not show the personal system questions).  The third condition checks if we're displaying a non system question group and the question is a system question, then we skip because for non-system question groups we only want to show non-system questions.
176
+						}
177
+						?>
178 178
                         <li class="ee-question-sortable">
179 179
                             <label for="question-<?php echo $question_ID ?>">
180 180
                                 <input type="checkbox" name="questions[<?php echo $question_ID; ?>]"
181 181
                                        id="question-<?php echo $question_ID; ?>"
182 182
                                        value="<?php echo $question_ID; ?>"<?php echo $disabled; ?><?php echo $checked; ?>/>
183 183
                                 <span class="question-text"><?php
184
-                                    echo trim($question->display_text())
185
-                                         . (95 <= strlen(trim($question->display_text()))
186
-                                            ? "&hellip;"
187
-                                            : '');
188
-                                                            ?>
184
+									echo trim($question->display_text())
185
+										 . (95 <= strlen(trim($question->display_text()))
186
+											? "&hellip;"
187
+											: '');
188
+															?>
189 189
                                 </span>
190 190
                                 <input class="question-group-QGQ_order" type="hidden"
191 191
                                        name="question_orders[<?php echo $question_ID; ?>]"
192 192
                                        value="<?php echo $question_order; ?>">
193 193
                             </label>
194 194
                             <?php
195
-                            if (
196
-                                EE_Registry::instance()->CAP->current_user_can(
197
-                                    'ee_edit_question',
198
-                                    'espresso_registration_form_edit_question',
199
-                                    $question->ID()
200
-                                )
201
-                            ) {
202
-                                $edit_query_args = array(
203
-                                    'action' => 'edit_question',
204
-                                    'QST_ID' => $question->ID(),
205
-                                );
206
-                                $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
195
+							if (
196
+								EE_Registry::instance()->CAP->current_user_can(
197
+									'ee_edit_question',
198
+									'espresso_registration_form_edit_question',
199
+									$question->ID()
200
+								)
201
+							) {
202
+								$edit_query_args = array(
203
+									'action' => 'edit_question',
204
+									'QST_ID' => $question->ID(),
205
+								);
206
+								$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
207 207
 
208
-                                echo '<a href="' . $edit_link . '" 
208
+								echo '<a href="' . $edit_link . '" 
209 209
                                          class="button button--small button--icon-only"
210 210
                                          target="_blank" 
211 211
                                          title="' .
212
-                                    sprintf(
213
-                                        esc_attr__('Edit %s', 'event_espresso'),
214
-                                        $question->admin_label()
215
-                                    )
216
-                                    . '">
212
+									sprintf(
213
+										esc_attr__('Edit %s', 'event_espresso'),
214
+										$question->admin_label()
215
+									)
216
+									. '">
217 217
                                     <span class="dashicons dashicons-edit"></span>
218 218
                                     </a>';
219
-                            }
220
-                            ?>
219
+							}
220
+							?>
221 221
                         </li>
222 222
                         <?php
223
-                        $question_order++;
224
-                    }
225
-                }
226
-                ?>
223
+						$question_order++;
224
+					}
225
+				}
226
+				?>
227 227
             </ul>
228 228
         </div>
229 229
     </div>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 assert($question_group);
12 12
 assert($question_group instanceof EE_Question_Group);
13 13
 /* @var EE_Question[] $all_questions */
14
-assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions)));// list of unused questions
14
+assert(isset($all_questions) && (empty($all_questions) || is_array($all_questions))); // list of unused questions
15 15
 foreach ($all_questions as $unused_question) {
16 16
     assert($unused_question);
17 17
     assert($unused_question instanceof EE_Question);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 <input id="QSG_identifier" name="QSG_identifier<?php echo $id; ?>"
57 57
                        value="<?php $question_group->f('QSG_identifier') ?>" type="text"
58 58
                        class="regular-text"<?php echo $disabled; ?>>
59
-                <?php if (! empty($QSG_system)) { ?>
59
+                <?php if ( ! empty($QSG_system)) { ?>
60 60
                     <p><span class="description" style="color:#D54E21;">
61 61
                             <?php esc_html_e('System question group! This field cannot be changed.', 'event_espresso') ?>
62 62
                     </span><br/></p>
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 foreach ($all_questions as $question_ID => $question) {
154 154
                     if ($question instanceof EE_Question) {
155 155
                         /*@var $question EE_Question*/
156
-                        $checked = isset($question_group_questions[ $question_ID ]) ? ' checked="checked"' : '';
156
+                        $checked = isset($question_group_questions[$question_ID]) ? ' checked="checked"' : '';
157 157
                         // disable questions from the personal information question group
158 158
                         // is it required in the current question group? if so don't allow admins to remove it
159 159
                         $disabled = in_array(
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                                 );
206 206
                                 $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
207 207
 
208
-                                echo '<a href="' . $edit_link . '" 
208
+                                echo '<a href="'.$edit_link.'" 
209 209
                                          class="button button--small button--icon-only"
210 210
                                          target="_blank" 
211 211
                                          title="' .
Please login to merge, or discard this patch.