PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | stripe/models/FrmTransLiteAction.php +16 -7 6.26 → trunk View file →
@@ -6,9 +6,9 @@
6 6 class FrmTransLiteAction extends FrmFormAction {
7 7
8 8 public function __construct() {
9 9 $action_ops = array(
10 - 'classes' => 'frm_stripe_icon frm_credit_card_alt_icon frm_icon_font',
10 + 'classes' => 'frm_stripe_icon frm_credit_card_alt_icon frmfont',
11 11 // This is 99 in the Payments submodule but Stripe Lite only supports a single action.
12 12 'limit' => 1,
13 13 'active' => true,
14 14 // After user registration.
@@ -13,9 +13,9 @@
13 13 'active' => true,
14 14 // After user registration.
15 15 'priority' => 45,
16 16 'event' => array( 'create' ),
17 - 'color' => 'var(--green)',
17 + 'color' => '#3fac25',
18 18 );
19 19
20 20 $this->FrmFormAction( 'payment', __( 'Collect a Payment', 'formidable' ), $action_ops );
21 21 }
@@ -86,8 +86,14 @@
86 86 'gateway' => array(),
87 87 'credit_card' => '',
88 88 'billing_first_name' => '',
89 89 'billing_last_name' => '',
90 + 'billing_address' => '',
91 + 'shipping_email' => '',
92 + 'shipping_first_name' => '',
93 + 'shipping_last_name' => '',
94 + 'shipping_address' => '',
95 + 'entry_data_sync' => 'overwrite',
90 96 );
91 97 return (array) apply_filters( 'frm_pay_action_defaults', $defaults );
92 98 }
93 99
@@ -112,9 +118,8 @@
112 118 *
113 119 * @return array
114 120 */
115 121 public function get_field_options( $form_id ) {
116 -
117 122 $form_id = absint( $form_id );
118 123 $form_ids = $form_id;
119 124
120 125 /**
@@ -126,9 +131,9 @@
126 131 * @param int $form_id
127 132 */
128 133 $form_ids = apply_filters( 'frm_trans_action_get_field_options_form_id', $form_ids, $form_id );
129 134
130 - $form_fields = FrmField::getAll(
135 + return FrmField::getAll(
131 136 array(
132 137 'fi.form_id' => $form_ids,
133 138 'fi.type not' => array( 'divider', 'end_divider', 'html', 'break', 'captcha', 'rte', 'form' ),
134 139 ),
@@ -133,10 +138,8 @@
133 138 'fi.type not' => array( 'divider', 'end_divider', 'html', 'break', 'captcha', 'rte', 'form' ),
134 139 ),
135 140 'field_order'
136 141 );
137 -
138 - return $form_fields;
139 142 }
140 143
141 144 /**
142 145 * Get the ID of the credit card field.
@@ -180,9 +183,11 @@
180 183 $field_atts['skipped_fields'] = array( FrmSubmitHelper::FIELD_TYPE );
181 184 }
182 185
183 186 $has_field = false;
187 + // phpcs:disable Generic.WhiteSpace.ScopeIndent
184 188 ?>
189 + <?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
185 190 <select class="frm_with_left_label" name="<?php echo esc_attr( $this->get_field_name( $field_atts['name'] ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( $field_atts['name'] ) ); ?>">
186 191 <option value=""><?php esc_html_e( '&mdash; Select &mdash;' ); ?></option>
187 192 <?php
188 193 foreach ( $form_atts['form_fields'] as $field ) {
@@ -198,15 +203,17 @@
198 203
199 204 $has_field = true;
200 205 $key_exists = array_key_exists( $field_atts['name'], $form_atts['form_action']->post_content );
201 206 ?>
207 + <?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?>
202 208 <option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>>
203 209 <?php
204 - echo esc_attr( FrmAppHelper::truncate( $field->name, 50, 1 ) );
210 + echo esc_html( FrmAppHelper::truncate( $field->name, 50, 1 ) );
205 211
206 212 if ( 'name' === $field->type && isset( $field_atts['name'] ) ) {
207 213 switch ( $field_atts['name'] ) {
208 214 case 'billing_first_name':
215 + case 'shipping_first_name':
209 216 echo ' (';
210 217 esc_html_e( 'First', 'formidable' );
211 218 echo ')';
212 219 break;
@@ -211,8 +218,9 @@
211 218 echo ')';
212 219 break;
213 220
214 221 case 'billing_last_name':
222 + case 'shipping_last_name':
215 223 echo ' (';
216 224 esc_html_e( 'Last', 'formidable' );
217 225 echo ')';
218 226 break;
@@ -237,8 +245,9 @@
237 245 }
238 246 ?>
239 247 </select>
240 248 <?php
249 + // phpcs:enable Generic.WhiteSpace.ScopeIndent
241 250 }
242 251
243 252 public static function get_single_action_type( $action_id, $type = '' ) {
244 253 /**