PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.4.1
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.4.1
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / includes / Admin / Elementor / Fundraising_Campaign_Widget.php

Fundraising_Campaign_Widget.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.4.1, at includes/Admin/Elementor/Fundraising_Campaign_Widget.php

3,791 lines 162.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Better_Payment\Lite\Admin\Elementor;
4
5 use Better_Payment\Lite\Admin\DB;
6 use Better_Payment\Lite\Classes\Handler;
7 use Better_Payment\Lite\Classes\Helper as ClassesHelper;
8 use Better_Payment\Lite\Traits\Helper;
9 use \Elementor\Controls_Manager as Controls_Manager;
10 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
11 use Elementor\Group_Control_Background;
12 use Elementor\Group_Control_Border;
13 use Elementor\Group_Control_Box_Shadow;
14 use Elementor\Group_Control_Typography;
15 use Elementor\Plugin;
16 use \Elementor\Repeater;
17 use Elementor\Utils;
18 use \Elementor\Widget_Base as Widget_Base;
19
20 /**
21 * Exit if accessed directly
22 */
23 if (!defined('ABSPATH')) {
24 exit;
25 }
26
27 /**
28 * The elementor widget class
29 *
30 * @since 0.0.1
31 */
32 class Fundraising_Campaign_Widget extends Widget_Base {
33
34 use Helper;
35
36 private $better_payment_campaign_global_settings = [];
37
38 /**
39 * @var mixed|void
40 */
41 protected $pro_enabled;
42
43 /**
44 * Login_Register constructor.
45 * Initializing the Login_Register widget class.
46 * @inheritDoc
47 */
48 public function __construct( $data = [], $args = null ) {
49 parent::__construct( $data, $args );
50 $this->pro_enabled = apply_filters( 'better_payment/pro_enabled', false );
51 }
52
53 public function get_name() {
54 return 'fundraising-campaign';
55 }
56
57 public function get_title() {
58 return esc_html__( 'Fundraising Campaign', 'better-payment' );
59 }
60
61 public function get_icon() {
62 return 'bp-icon bp-fundraising-campaign';
63 }
64
65 public function get_categories() {
66 return ['better-payment'];
67 }
68
69 public function get_keywords() {
70 return [
71 'payment', 'better-payment' ,'paypal', 'stripe', 'sell', 'donate', 'transaction', 'online-transaction', 'paystack', 'fundraising', 'campaign', 'better payment'
72 ];
73 }
74
75 public function get_custom_help_url() {
76 return 'https://betterpayment.co/docs/configure-fundraising-campaign-in-better-payment';
77 }
78
79 public function get_style_depends() {
80 // Better Payment Pro adds its Updates tab styles here, and needs this widget
81 // passed to tell it apart from the other widgets on the filter.
82 return apply_filters( 'better_payment/elementor/editor/get_style_depends', [ 'fundraising-campaign-style' ], $this );
83 }
84
85 public function get_script_depends() {
86 return apply_filters( 'better_payment/elementor/editor/get_script_depends', [ 'fundraising-campaign-script' ] );
87 }
88
89 function generate_short_unique_id( int $length = 8 ) {
90 $timestamp = microtime(true);
91 $random = random_int(0, 999999);
92 $base = base_convert((int)($timestamp * 1000000) + $random, 10, 36);
93
94 return strtoupper( substr(str_pad($base, $length, '0', STR_PAD_LEFT), -$length) );
95 }
96
97
98 protected function register_controls() {
99 $this->better_payment_campaign_global_settings = DB::get_settings();
100
101 $is_edit_mode = Plugin::instance()->editor->is_edit_mode();
102
103 if ( $is_edit_mode && ( ! current_user_can('manage_options') ) ) {
104 $this->better_payment_campaign_global_settings = [];
105 }
106
107 $this->start_controls_section(
108 'better_payment_campaign_settings_general',
109 [
110 'label' => esc_html__( 'General', 'better-payment' ),
111 ]
112 );
113
114 $campaign_id = $this->generate_short_unique_id();
115
116 $this->add_control(
117 'better_payment_campaign_id',
118 [
119 'label' => esc_html__( 'Campaign ID', 'better-payment' ),
120 'type' => Controls_Manager::TEXT,
121 'placeholder' => $campaign_id,
122 'default' => $campaign_id,
123 'description' => esc_html__('Unique campaign ID required. It is auto-generated; if modified, don\'t make it repetitive.', 'better-payment'),
124 'label_block' => false,
125 'ai' => [
126 'active' => false,
127 ],
128 ]
129 );
130
131 $this->add_control(
132 'better_payment_campaign_layout',
133 [
134 'label' => esc_html__( 'Campaign Layout', 'better-payment' ),
135 'type' => Controls_Manager::SELECT,
136 'default' => 'layout-1',
137 'options' => $this->better_payment_campaign_layouts(),
138 ]
139 );
140
141 $better_payment_helper = new ClassesHelper();
142 $better_payment_general_currency = $this->better_payment_campaign_global_settings['better_payment_settings_general_general_currency'];
143
144 $this->add_control(
145 'better_payment_campaign_currency',
146 [
147 'label' => esc_html__( 'Currency', 'better-payment' ),
148 'type' => Controls_Manager::SELECT,
149 'default' => esc_html($better_payment_general_currency),
150 'options' => $better_payment_helper->get_currency_list(),
151 ]
152 );
153
154 $this->add_control(
155 'better_payment_campaign_general_header_enable',
156 [
157 'label' => __( 'Header', 'better-payment' ),
158 'type' => Controls_Manager::SWITCHER,
159 'label_on' => __( 'Show', 'better-payment' ),
160 'label_off' => __( 'Hide', 'better-payment' ),
161 'return_value' => 'yes',
162 'default' => 'yes',
163 'separator' => 'before',
164 ]
165 );
166
167 $this->add_control(
168 'better_payment_campaign_general_overview_enable',
169 [
170 'label' => __( 'Overview', 'better-payment' ),
171 'type' => Controls_Manager::SWITCHER,
172 'label_on' => __( 'Show', 'better-payment' ),
173 'label_off' => __( 'Hide', 'better-payment' ),
174 'return_value' => 'yes',
175 'default' => 'yes',
176 ]
177 );
178
179 if ( !$this->pro_enabled ) {
180 $this->add_control( 'better_payment_campaign_updates_pro', [
181 'label' => sprintf( __( 'Updates %s', 'better-payment' ), '<i class="bpc-pro-labe eicon-pro-icon"></i>' ),
182 'type' => Controls_Manager::SWITCHER,
183 'classes' => 'bpc-pro-control',
184 ] );
185 }
186
187 do_action('better_payment/elementor/editor/campaign_pro_sections', $this);
188
189 $this->add_control(
190 'better_payment_campaign_general_footer_team_enable_layout_1',
191 [
192 'label' => __( 'Our Team', 'better-payment' ),
193 'type' => Controls_Manager::SWITCHER,
194 'label_on' => __( 'Show', 'better-payment' ),
195 'label_off' => __( 'Hide', 'better-payment' ),
196 'return_value' => 'yes',
197 'default' => 'yes',
198 'condition' => [
199 'better_payment_campaign_layout' => [ 'layout-1' ],
200 ],
201 ]
202 );
203
204 $this->add_control(
205 'better_payment_campaign_general_footer_related_campaign_enable_layout_2',
206 [
207 'label' => __( 'Related Campaigns', 'better-payment' ),
208 'type' => Controls_Manager::SWITCHER,
209 'label_on' => __( 'Show', 'better-payment' ),
210 'label_off' => __( 'Hide', 'better-payment' ),
211 'return_value' => 'yes',
212 'default' => 'yes',
213 'condition' => [
214 'better_payment_campaign_layout' => [ 'layout-2' ],
215 ],
216 ]
217 );
218
219 $this->end_controls_section();
220
221 $this->campaign_header_settings();
222 $this->campaign_form_settings();
223 $this->campaign_overview_settings();
224 $this->campaign_our_team_settings();
225 do_action('better_payment/elementor/editor/campaign_pro_updates_section', $this);
226 $this->related_campaign_settings();
227
228 $this->form_style();
229 }
230
231 public function campaign_header_settings() {
232 $this->start_controls_section(
233 'better_payment_campaign_header_title',
234 [
235 'label' => esc_html__( 'Header', 'better-payment' ),
236 'condition' => [
237 'better_payment_campaign_general_header_enable' => 'yes',
238 ],
239 ]
240 );
241
242 $this->add_control(
243 'better_payment_campaign_general_title_enable',
244 [
245 'label' => __( 'Title', 'better-payment' ),
246 'type' => Controls_Manager::SWITCHER,
247 'label_on' => __( 'Show', 'better-payment' ),
248 'label_off' => __( 'Hide', 'better-payment' ),
249 'return_value' => 'yes',
250 'default' => 'yes',
251 'condition' => [
252 'better_payment_campaign_general_header_enable' => 'yes',
253 ],
254 ]
255 );
256
257 $this->add_control(
258 'better_payment_campaign_header_title_text',
259 [
260 'type' => Controls_Manager::TEXT,
261 'label_block' => true,
262 'ai' => [
263 'active' => false,
264 ],
265 'placeholder' => __( 'Campaign Title Content', 'better-payment' ),
266 'condition' => [
267 'better_payment_campaign_general_title_enable' => 'yes',
268 ],
269 ]
270 );
271
272 $this->add_control(
273 'better_payment_campaign_general_short_description_enable',
274 [
275 'label' => __( 'Subtitle', 'better-payment' ),
276 'type' => Controls_Manager::SWITCHER,
277 'label_on' => __( 'Show', 'better-payment' ),
278 'label_off' => __( 'Hide', 'better-payment' ),
279 'return_value' => 'yes',
280 'default' => 'yes',
281 'condition' => [
282 'better_payment_campaign_general_header_enable' => 'yes',
283 ],
284 ]
285 );
286
287 $this->add_control(
288 'better_payment_campaign_header_short_description',
289 [
290 'type' => Controls_Manager::TEXTAREA,
291 'label_block' => true,
292 'ai' => [
293 'active' => false,
294 ],
295 'placeholder' => __( 'Campaign Subtitle Description', 'better-payment' ),
296 'condition' => [
297 'better_payment_campaign_general_short_description_enable' => 'yes',
298 ],
299 ]
300 );
301
302 $this->add_control(
303 'better_payment_campaign_header_images_heading',
304 [
305 'label' => __( 'Images', 'better-payment' ),
306 'type' => \Elementor\Controls_Manager::HEADING,
307 ]
308 );
309
310 $this->start_controls_tabs( 'better_payment_campaign_header_images_tabs' );
311
312 $this->start_controls_tab(
313 'better_payment_campaign_header_image_one_tab',
314 [
315 'label' => __( 'One', 'better-payment' ),
316 'condition' => [
317 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ],
318 ],
319 ]
320 );
321
322 $this->add_control(
323 'better_payment_campaign_general_image_one_enable',
324 [
325 'label' => __( 'Show', 'better-payment' ),
326 'type' => Controls_Manager::SWITCHER,
327 'label_on' => __( 'Yes', 'better-payment' ),
328 'label_off' => __( 'No', 'better-payment' ),
329 'return_value' => 'yes',
330 'default' => 'yes',
331 'condition' => [
332 'better_payment_campaign_general_header_enable' => 'yes',
333 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ],
334 ],
335 ]
336 );
337
338 $this->add_control(
339 'better_payment_campaign_header_image_one',
340 [
341 'label' => __('Choose Image', 'better-payment'),
342 'type' => Controls_Manager::MEDIA,
343 'label_block' => true,
344 'ai' => [
345 'active' => false,
346 ],
347 'condition' => [
348 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', 'layout-3' ],
349 'better_payment_campaign_general_image_one_enable' => 'yes',
350 ],
351 ]
352 );
353
354 $this->end_controls_tab();
355
356 $this->start_controls_tab(
357 'better_payment_campaign_header_image_two_tab',
358 [
359 'label' => __( 'Two', 'better-payment' ),
360 'condition' => [
361 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ],
362 ],
363 ]
364 );
365
366 $this->add_control(
367 'better_payment_campaign_general_image_two_enable',
368 [
369 'label' => __( 'Show', 'better-payment' ),
370 'type' => Controls_Manager::SWITCHER,
371 'label_on' => __( 'Yes', 'better-payment' ),
372 'label_off' => __( 'No', 'better-payment' ),
373 'return_value' => 'yes',
374 'default' => 'yes',
375 'condition' => [
376 'better_payment_campaign_general_header_enable' => 'yes',
377 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ],
378 ],
379 ]
380 );
381
382 $this->add_control(
383 'better_payment_campaign_header_image_two',
384 [
385 'label' => __('Choose Image', 'better-payment'),
386 'type' => Controls_Manager::MEDIA,
387 'label_block' => true,
388 'ai' => [
389 'active' => false,
390 ],
391 'condition' => [
392 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ],
393 'better_payment_campaign_general_image_two_enable' => 'yes',
394 ],
395 ]
396 );
397
398 $this->end_controls_tab();
399
400 $this->start_controls_tab(
401 'better_payment_campaign_header_image_three_tab',
402 [
403 'label' => __( 'Three', 'better-payment' ),
404 'condition' => [
405 'better_payment_campaign_layout' => [ 'layout-2' ],
406 ],
407 ]
408 );
409
410 $this->add_control(
411 'better_payment_campaign_general_image_three_enable',
412 [
413 'label' => __( 'Show', 'better-payment' ),
414 'type' => Controls_Manager::SWITCHER,
415 'label_on' => __( 'Yes', 'better-payment' ),
416 'label_off' => __( 'No', 'better-payment' ),
417 'return_value' => 'yes',
418 'default' => 'yes',
419 'condition' => [
420 'better_payment_campaign_general_header_enable' => 'yes',
421 'better_payment_campaign_layout' => [ 'layout-2' ],
422 ],
423 ]
424 );
425
426 $this->add_control(
427 'better_payment_campaign_header_image_three',
428 [
429 'label' => __('Choose Image', 'better-payment'),
430 'type' => Controls_Manager::MEDIA,
431 'label_block' => true,
432 'ai' => [
433 'active' => false,
434 ],
435 'condition' => [
436 'better_payment_campaign_layout' => [ 'layout-2' ],
437 'better_payment_campaign_general_image_three_enable' => 'yes',
438 ],
439 ]
440 );
441
442 $this->end_controls_tab();
443 $this->end_controls_tabs();
444
445 $this->end_controls_section();
446 }
447
448 public function campaign_form_settings() {
449 $this->start_controls_section(
450 'better_payment_campaign_form_settings',
451 [
452 'label' => esc_html__( 'Form', 'better-payment' ),
453 ]
454 );
455
456 $this->add_control(
457 'better_payment_campaign_form_title_text_layout_1',
458 [
459 'label' => __( 'Title', 'better-payment' ),
460 'type' => Controls_Manager::TEXT,
461 'label_block' => true,
462 'placeholder' => 'Enter your form title',
463 'default' => 'Charity Raised',
464 'ai' => [
465 'active' => false,
466 ],
467 'condition' => [
468 'better_payment_campaign_layout' => [ 'layout-1' ],
469 ],
470 ]
471 );
472
473 $this->add_control(
474 'better_payment_campaign_form_title_text_layout_2',
475 [
476 'label' => __( 'Title', 'better-payment' ),
477 'type' => Controls_Manager::TEXT,
478 'label_block' => true,
479 'placeholder' => 'Enter your form title',
480 'default' => 'Save Lives and Bring Hope to Children in Gaza',
481 'ai' => [
482 'active' => false,
483 ],
484 'condition' => [
485 'better_payment_campaign_layout' => [ 'layout-2' ],
486 ],
487 ]
488 );
489
490 $this->add_control(
491 'better_payment_campaign_form_sub_title_text',
492 [
493 'label' => __( 'Sub Title', 'better-payment' ),
494 'type' => Controls_Manager::TEXT,
495 'label_block' => true,
496 'placeholder' => 'Enter your form sub title',
497 'default' => 'Urgent Cause',
498 'ai' => [
499 'active' => false,
500 ],
501 'condition' => [
502 'better_payment_campaign_layout' => [ 'layout-2' ],
503 ],
504 ]
505 );
506
507 $this->add_control(
508 'better_payment_campaign_form_image',
509 [
510 'label' => __('Choose Image', 'better-payment'),
511 'type' => Controls_Manager::MEDIA,
512 'label_block' => true,
513 'ai' => [
514 'active' => false,
515 ],
516 'default' => [
517 'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/form.webp',
518 ],
519 'condition' => [
520 'better_payment_campaign_layout' => [ 'layout-1' ],
521 ],
522 ]
523 );
524
525 $this->add_control(
526 'better_payment_campaign_form_goal_amount_label',
527 [
528 'label' => __( 'Goal Amount Label', 'better-payment' ),
529 'type' => Controls_Manager::TEXT,
530 'label_block' => true,
531 'ai' => [
532 'active' => false,
533 ],
534 'placeholder' => 'Enter your goal amount label',
535 'default' => 'Goal',
536 'condition' => [
537 'better_payment_campaign_layout' => [ 'layout-1' ],
538 ],
539 ]
540 );
541
542 $this->add_control(
543 'better_payment_campaign_form_goal_amount',
544 [
545 'label' => __( 'Goal Amount', 'better-payment' ),
546 'type' => Controls_Manager::NUMBER,
547 'placeholder' => 'Enter your goal amount',
548 'default' => 5000,
549 ]
550 );
551
552 $this->add_control(
553 'better_payment_campaign_form_goal_percentage_enable',
554 [
555 'label' => __( 'Goal Percentage', 'better-payment' ),
556 'type' => Controls_Manager::SWITCHER,
557 'label_on' => __( 'Show', 'better-payment' ),
558 'label_off' => __( 'Hide', 'better-payment' ),
559 'return_value' => 'yes',
560 'default' => 'yes',
561 'condition' => [
562 'better_payment_campaign_layout' => [ 'layout-1' ],
563 ],
564 ]
565 );
566
567 $this->add_control(
568 'better_payment_campaign_form_goal_bar_line_enable',
569 [
570 'label' => __( 'Goal Bar Line', 'better-payment' ),
571 'type' => Controls_Manager::SWITCHER,
572 'label_on' => __( 'Show', 'better-payment' ),
573 'label_off' => __( 'Hide', 'better-payment' ),
574 'return_value' => 'yes',
575 'default' => 'yes',
576 'condition' => [
577 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2' ],
578 ],
579 ]
580 );
581
582 $amount_list_repeater_l1 = new Repeater();
583 $amount_list_repeater_l1->add_control(
584 'better_payment_campaign_form_amount_list_val_layout_1',
585 [
586 'label' => esc_html__( 'Amount', 'better-payment' ),
587 'type' => Controls_Manager::NUMBER,
588 'min' => 1,
589 'default' => 5,
590 'placeholder' => 'Enter your amount',
591 ]
592 );
593
594 $this->add_control(
595 'better_payment_campaign_form_amount_list_layout_1',
596 [
597 'label' => esc_html__( 'Amount List', 'better-payment' ),
598 'type' => Controls_Manager::REPEATER,
599 'fields' => $amount_list_repeater_l1->get_controls(),
600 'default' => [
601 [
602 'better_payment_campaign_form_amount_list_val_layout_1' => 10
603 ],
604 [
605 'better_payment_campaign_form_amount_list_val_layout_1' => 20
606 ],
607 [
608 'better_payment_campaign_form_amount_list_val_layout_1' => 30
609 ],
610 [
611 'better_payment_campaign_form_amount_list_val_layout_1' => 80
612 ],
613 [
614 'better_payment_campaign_form_amount_list_val_layout_1' => 100
615 ],
616 ],
617 'title_field' => '<i class="{{ better_payment_campaign_form_amount_list_val_layout_1 }}" aria-hidden="true"></i> {{{ better_payment_campaign_form_amount_list_val_layout_1 }}}',
618 'condition' => [
619 'better_payment_campaign_layout' => [ 'layout-1' ],
620 ],
621 ]
622 );
623
624 $amount_list_repeater_l3 = new Repeater();
625 $amount_list_repeater_l3->add_control(
626 'better_payment_campaign_form_amount_list_val_layout_3',
627 [
628 'label' => esc_html__( 'Amount', 'better-payment' ),
629 'type' => Controls_Manager::NUMBER,
630 'min' => 1,
631 'default' => 5,
632 'placeholder' => 'Enter your amount',
633 ]
634 );
635
636 $this->add_control(
637 'better_payment_campaign_form_amount_list_layout_3',
638 [
639 'label' => esc_html__( 'Amount List', 'better-payment' ),
640 'type' => Controls_Manager::REPEATER,
641 'fields' => $amount_list_repeater_l3->get_controls(),
642 'default' => [
643 [
644 'better_payment_campaign_form_amount_list_val_layout_3' => 10
645 ],
646 [
647 'better_payment_campaign_form_amount_list_val_layout_3' => 20
648 ],
649 [
650 'better_payment_campaign_form_amount_list_val_layout_3' => 40
651 ],
652 [
653 'better_payment_campaign_form_amount_list_val_layout_3' => 80
654 ],
655 ],
656 'title_field' => '<i class="{{ better_payment_campaign_form_amount_list_val_layout_3 }}" aria-hidden="true"></i> {{{ better_payment_campaign_form_amount_list_val_layout_3 }}}',
657 'condition' => [
658 'better_payment_campaign_layout' => [ 'layout-3' ],
659 ],
660 ]
661 );
662
663 $this->add_control(
664 'better_payment_campaign_form_total_donation_enable',
665 [
666 'label' => __( 'Total Donation', 'better-payment' ),
667 'type' => Controls_Manager::SWITCHER,
668 'label_on' => __( 'Show', 'better-payment' ),
669 'label_off' => __( 'Hide', 'better-payment' ),
670 'return_value' => 'yes',
671 'default' => 'yes',
672 'condition' => [
673 'better_payment_campaign_layout' => [ 'layout-2' ],
674 ],
675 ]
676 );
677
678 $this->add_control(
679 'better_payment_campaign_form_total_donation_label',
680 [
681 'label' => __( 'Total Donation Label', 'better-payment' ),
682 'type' => Controls_Manager::TEXT,
683 'label_block' => true,
684 'placeholder' => 'Enter your total donation label',
685 'default' => 'Donations',
686 'ai' => [
687 'active' => false,
688 ],
689 'condition' => [
690 'better_payment_campaign_form_total_donation_enable' => 'yes',
691 'better_payment_campaign_layout' => [ 'layout-2' ],
692 ],
693 ]
694 );
695
696 $this->add_control(
697 'better_payment_campaign_form_goal_amount_raised_enable',
698 [
699 'label' => __( 'Raised Amount', 'better-payment' ),
700 'type' => Controls_Manager::SWITCHER,
701 'label_on' => __( 'Show', 'better-payment' ),
702 'label_off' => __( 'Hide', 'better-payment' ),
703 'return_value' => 'yes',
704 'default' => 'yes',
705 'condition' => [
706 'better_payment_campaign_layout' => [ 'layout-2' ],
707 ],
708 ]
709 );
710
711 $this->add_control(
712 'better_payment_campaign_form_goal_amount_raised_label',
713 [
714 'label' => __( 'Raised Amount Label', 'better-payment' ),
715 'type' => Controls_Manager::TEXT,
716 'label_block' => true,
717 'placeholder' => 'Enter your raised amount label',
718 'default' => 'Raised',
719 'ai' => [
720 'active' => false,
721 ],
722 'condition' => [
723 'better_payment_campaign_form_goal_amount_raised_enable' => 'yes',
724 'better_payment_campaign_layout' => [ 'layout-2' ],
725 ],
726 ]
727 );
728
729 $this->add_control(
730 'better_payment_campaign_form_placeholder_text_layout_1',
731 [
732 'label' => __( 'Custom Placeholder Text', 'better-payment' ),
733 'type' => Controls_Manager::TEXT,
734 'label_block' => true,
735 'placeholder' => 'Enter your placeholder text',
736 'default' => 'Enter your amount',
737 'ai' => [
738 'active' => false,
739 ],
740 'condition' => [
741 'better_payment_campaign_layout' => [ 'layout-1' ],
742 ],
743 ]
744 );
745
746 $this->add_control(
747 'better_payment_campaign_form_placeholder_text_layout_3',
748 [
749 'label' => __( 'Custom Placeholder Text', 'better-payment' ),
750 'type' => Controls_Manager::TEXT,
751 'label_block' => true,
752 'placeholder' => 'Enter your placeholder text',
753 'default' => '0',
754 'ai' => [
755 'active' => false,
756 ],
757 'condition' => [
758 'better_payment_campaign_layout' => [ 'layout-3' ],
759 ],
760 ]
761 );
762
763 $this->add_control(
764 'better_payment_campaign_form_button_text',
765 [
766 'label' => __( 'Button Text', 'better-payment' ),
767 'type' => Controls_Manager::TEXT,
768 'label_block' => true,
769 'placeholder' => 'Enter your button text',
770 'default' => 'Donate Now',
771 'ai' => [
772 'active' => false,
773 ],
774 ]
775 );
776
777 $this->add_control(
778 'better_payment_campaign_form_button_link',
779 [
780 'label' => __( 'Button Link', 'better-payment' ),
781 'type' => Controls_Manager::URL,
782 'default' => [
783 'url' => '#',
784 ],
785 'dynamic' => [
786 'active' => true,
787 ],
788 'show_external' => false,
789 'placeholder' => __( 'https://example.com/payment-form-page/', 'better-payment' ),
790 ]
791 );
792
793 $this->add_control(
794 'better_payment_campaign_form_button_link_info',
795 [
796 'type' => Controls_Manager::RAW_HTML,
797 'raw' => sprintf(
798 __( '<p>*You must create a separate payment form page with Better Payment and add the URL. Follow <a href="%1$s" target="_blank">this doc.</a></p>', 'better-payment' ),
799 esc_url('//betterpayment.co/docs/configure-form-settings-in-better-payment/'),
800 ),
801 'content_classes' => 'elementor-control-alert elementor-panel-alert elementor-panel-alert-info',
802 'ai' => [
803 'active' => false,
804 ]
805 ]
806 );
807
808 $this->end_controls_section();
809 }
810
811 public function campaign_overview_settings() {
812 $this->start_controls_section(
813 'better_payment_campaign_overview_settings',
814 [
815 'label' => esc_html__( 'Overview', 'better-payment' ),
816 'condition' => [
817 'better_payment_campaign_general_overview_enable' => 'yes'
818 ]
819 ]
820 );
821
822 $this->add_control(
823 'better_payment_campaign_overview_title_text',
824 [
825 'label' => __( 'Tab Title', 'better-payment' ),
826 'type' => Controls_Manager::TEXT,
827 'label_block' => true,
828 'placeholder' => 'Enter your overview title',
829 'ai' => [
830 'active' => false,
831 ],
832 'condition' => [
833 'better_payment_campaign_general_overview_enable' => 'yes'
834 ]
835 ]
836 );
837
838 $this->add_control(
839 'better_payment_campaign_overview_description_title',
840 [
841 'label' => esc_html__( 'Descriptions', 'better-payment' ),
842 'type' => Controls_Manager::HEADING,
843 'condition' => [
844 'better_payment_campaign_general_overview_enable' => 'yes',
845 ]
846 ]
847 );
848
849 $this->add_control(
850 'better_payment_campaign_general_overview_description_one_enable',
851 [
852 'label' => __( 'Top Description', 'better-payment' ),
853 'type' => Controls_Manager::SWITCHER,
854 'label_on' => __( 'Show', 'better-payment' ),
855 'label_off' => __( 'Hide', 'better-payment' ),
856 'return_value' => 'yes',
857 'default' => 'yes',
858 'condition' => [
859 'better_payment_campaign_general_overview_enable' => 'yes'
860 ]
861 ]
862 );
863
864 $this->add_control(
865 'better_payment_campaign_overview_description_one',
866 [
867 'label' => __( 'Description Field', 'better-payment' ),
868 'type' => Controls_Manager::TEXTAREA,
869 'label_block' => true,
870 'placeholder' => 'Enter your campaign description',
871 'ai' => [
872 'active' => false,
873 ],
874 'condition' => [
875 'better_payment_campaign_general_overview_enable' => 'yes',
876 'better_payment_campaign_general_overview_description_one_enable' => 'yes',
877 ]
878 ]
879 );
880
881 $this->add_control(
882 'better_payment_campaign_general_overview_description_two_enable',
883 [
884 'label' => __( 'Bottom Description', 'better-payment' ),
885 'type' => Controls_Manager::SWITCHER,
886 'label_on' => __( 'Show', 'better-payment' ),
887 'label_off' => __( 'Hide', 'better-payment' ),
888 'return_value' => 'yes',
889 'default' => 'yes',
890 'condition' => [
891 'better_payment_campaign_general_overview_enable' => 'yes',
892 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
893 ]
894 ]
895 );
896
897 $this->add_control(
898 'better_payment_campaign_overview_description_two',
899 [
900 'label' => __( 'Description Field', 'better-payment' ),
901 'type' => Controls_Manager::TEXTAREA,
902 'label_block' => true,
903 'placeholder' => 'Enter your campaign description',
904 'ai' => [
905 'active' => false,
906 ],
907 'condition' => [
908 'better_payment_campaign_general_overview_enable' => 'yes',
909 'better_payment_campaign_general_overview_description_two_enable' => 'yes',
910 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
911 ]
912 ]
913 );
914
915 $this->add_control(
916 'better_paymentcampaign_overview_images_heading',
917 [
918 'label' => __( 'Images', 'better-payment' ),
919 'type' => \Elementor\Controls_Manager::HEADING,
920 'condition' => [
921 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
922 'better_payment_campaign_general_overview_enable' => 'yes',
923 ],
924 'separator' => 'before',
925 ]
926 );
927
928 $this->add_control(
929 'better_payment_campaign_general_overview_images_enable',
930 [
931 'label' => __( 'Show', 'better-payment' ),
932 'type' => Controls_Manager::SWITCHER,
933 'label_on' => __( 'Yes', 'better-payment' ),
934 'label_off' => __( 'No', 'better-payment' ),
935 'return_value' => 'yes',
936 'default' => 'yes',
937 'condition' => [
938 'better_payment_campaign_general_overview_enable' => 'yes',
939 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
940 ]
941 ]
942 );
943
944 $this->start_controls_tabs( 'better_payment_campaign_overview_images_tabs' );
945
946 $this->start_controls_tab(
947 'better_payment_campaign_overview_image_one_tab',
948 [
949 'label' => __( 'One', 'better-payment' ),
950 'condition' => [
951 'better_payment_campaign_general_overview_images_enable' => 'yes',
952 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
953 'better_payment_campaign_general_overview_enable' => 'yes',
954 ]
955 ]
956 );
957
958 $this->add_control(
959 'better_payment_campaign_overview_image_one',
960 [
961 'label' => __('Choose Image', 'better-payment'),
962 'type' => Controls_Manager::MEDIA,
963 'label_block' => true,
964 'ai' => [
965 'active' => false,
966 ],
967 'condition' => [
968 'better_payment_campaign_general_overview_images_enable' => 'yes',
969 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
970 'better_payment_campaign_general_overview_enable' => 'yes',
971 ]
972 ]
973 );
974
975 $this->end_controls_tab();
976
977 $this->start_controls_tab(
978 'better_payment_campaign_overview_image_two_tab',
979 [
980 'label' => __( 'Two', 'better-payment' ),
981 'condition' => [
982 'better_payment_campaign_general_overview_images_enable' => 'yes',
983 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
984 'better_payment_campaign_general_overview_enable' => 'yes',
985 ]
986 ]
987 );
988
989 $this->add_control(
990 'better_payment_campaign_overview_image_two',
991 [
992 'label' => __('Choose Image', 'better-payment'),
993 'type' => Controls_Manager::MEDIA,
994 'label_block' => true,
995 'ai' => [
996 'active' => false,
997 ],
998 'condition' => [
999 'better_payment_campaign_general_overview_images_enable' => 'yes',
1000 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1001 'better_payment_campaign_general_overview_enable' => 'yes',
1002 ]
1003 ]
1004 );
1005
1006 $this->end_controls_tab();
1007
1008 $this->start_controls_tab(
1009 'better_payment_campaign_overview_image_three_tab',
1010 [
1011 'label' => __( 'Three', 'better-payment' ),
1012 'condition' => [
1013 'better_payment_campaign_general_overview_images_enable' => 'yes',
1014 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1015 'better_payment_campaign_general_overview_enable' => 'yes',
1016 ]
1017 ]
1018 );
1019
1020 $this->add_control(
1021 'better_payment_campaign_overview_image_three',
1022 [
1023 'label' => __('Choose Image', 'better-payment'),
1024 'type' => Controls_Manager::MEDIA,
1025 'label_block' => true,
1026 'ai' => [
1027 'active' => false,
1028 ],
1029 'condition' => [
1030 'better_payment_campaign_general_overview_images_enable' => 'yes',
1031 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1032 'better_payment_campaign_general_overview_enable' => 'yes',
1033 ]
1034 ]
1035 );
1036
1037 $this->end_controls_tab();
1038 $this->end_controls_tabs();
1039
1040 $this->add_control(
1041 'better_paymentcampaign_overview_our_mission_heading',
1042 [
1043 'label' => __( 'Our Mission', 'better-payment' ),
1044 'type' => \Elementor\Controls_Manager::HEADING,
1045 'condition' => [
1046 'better_payment_campaign_layout' => [ 'layout-1' ],
1047 'better_payment_campaign_general_overview_enable' => 'yes',
1048 ],
1049 'separator' => 'before',
1050 ]
1051 );
1052
1053 $this->add_control(
1054 'better_payment_campaign_general_overview_mossion_enable',
1055 [
1056 'label' => __( 'Show', 'better-payment' ),
1057 'type' => Controls_Manager::SWITCHER,
1058 'label_on' => __( 'Yes', 'better-payment' ),
1059 'label_off' => __( 'No', 'better-payment' ),
1060 'return_value' => 'yes',
1061 'default' => 'yes',
1062 'condition' => [
1063 'better_payment_campaign_general_overview_enable' => 'yes',
1064 'better_payment_campaign_layout' => [ 'layout-1' ],
1065 ]
1066 ]
1067 );
1068
1069 $this->add_control(
1070 'better_payment_campaign_overview_our_mission_title_text',
1071 [
1072 'label' => __( 'Title', 'better-payment' ),
1073 'type' => Controls_Manager::TEXT,
1074 'label_block' => true,
1075 'placeholder' => 'Our Mission',
1076 'ai' => [
1077 'active' => false,
1078 ],
1079 'condition' => [
1080 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
1081 'better_payment_campaign_layout' => [ 'layout-1' ],
1082 'better_payment_campaign_general_overview_enable' => 'yes',
1083 ]
1084 ]
1085 );
1086
1087 $our_mission_repeater = new Repeater();
1088 $our_mission_repeater->add_control(
1089 'better_payment_campaign_overview_our_mission_item',
1090 [
1091 'label' => esc_html__('Mission', 'better-payment'),
1092 'type' => Controls_Manager::TEXT,
1093 'placeholder' => 'Mission item',
1094 'label_block' => true,
1095 'ai' => [
1096 'active' => false,
1097 ],
1098 ]
1099 );
1100
1101 $this->add_control(
1102 'better_payment_campaign_overview_our_mission_items',
1103 [
1104 'label' => esc_html__( 'Missions', 'better-payment' ),
1105 'type' => Controls_Manager::REPEATER,
1106 'fields' => $our_mission_repeater->get_controls(),
1107 'default' => [
1108 [
1109 'better_payment_campaign_overview_our_mission_item' => 'Provide nutritious meals to children in need',
1110 ],
1111 [
1112 'better_payment_campaign_overview_our_mission_item' => 'Offer educational support and resources',
1113 ],
1114 [
1115 'better_payment_campaign_overview_our_mission_item' => 'Create safe and nurturing environments',
1116 ],
1117 [
1118 'better_payment_campaign_overview_our_mission_item' => 'Promote awareness and advocacy for child rights',
1119 ],
1120 ],
1121 'title_field' => '{{{ better_payment_campaign_overview_our_mission_item }}}',
1122 'condition' => [
1123 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
1124 'better_payment_campaign_layout' => [ 'layout-1' ],
1125 'better_payment_campaign_general_overview_enable' => 'yes',
1126 ]
1127 ]
1128 );
1129
1130 $this->end_controls_section();
1131 }
1132
1133 public function campaign_our_team_settings() {
1134 $this->start_controls_section(
1135 'better_payment_campaign_our_team_settings',
1136 [
1137 'label' => esc_html__( '⮑ Our Team', 'better-payment' ),
1138 'condition' => [
1139 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
1140 'better_payment_campaign_layout' => [ 'layout-1' ],
1141 ]
1142 ]
1143 );
1144
1145 $this->add_control(
1146 'better_payment_campaign_footer_our_team_title_text',
1147 [
1148 'label' => __( 'Title', 'better-payment' ),
1149 'type' => Controls_Manager::TEXT,
1150 'label_block' => true,
1151 'default' => 'Our Team',
1152 'placeholder' => 'Our Team',
1153 'ai' => [
1154 'active' => false,
1155 ],
1156 'condition' => [
1157 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
1158 'better_payment_campaign_layout' => [ 'layout-1' ],
1159 ]
1160 ]
1161 );
1162
1163 $team_member_repeater = new Repeater();
1164 $team_member_repeater->add_control(
1165 'better_payment_campaign_team_member_name',
1166 [
1167 'label' => esc_html__('Name', 'better-payment'),
1168 'type' => Controls_Manager::TEXT,
1169 'placeholder' => 'Annette Black',
1170 'label_block' => true,
1171 'ai' => [
1172 'active' => false,
1173 ],
1174 ]
1175 );
1176
1177 $team_member_repeater->add_control(
1178 'better_payment_campaign_team_member_image',
1179 [
1180 'label' => __('Choose Image', 'better-payment'),
1181 'type' => Controls_Manager::MEDIA,
1182 'label_block' => true,
1183 'ai' => [
1184 'active' => false,
1185 ],
1186 ]
1187 );
1188
1189 $team_member_repeater->add_control(
1190 'better_payment_campaign_team_member_designation',
1191 [
1192 'label' => esc_html__('Designation', 'better-payment'),
1193 'type' => Controls_Manager::TEXT,
1194 'placeholder' => 'Designation',
1195 'label_block' => true,
1196 'ai' => [
1197 'active' => false,
1198 ],
1199 ]
1200 );
1201
1202 $team_member_repeater->add_control(
1203 'better_payment_campaign_team_member_social_links_enable',
1204 [
1205 'label' => __( 'Social Links', 'better-payment' ),
1206 'type' => Controls_Manager::SWITCHER,
1207 'label_on' => __( 'Show', 'better-payment' ),
1208 'label_off' => __( 'Hide', 'better-payment' ),
1209 'return_value' => 'yes',
1210 'default' => 'yes',
1211 ]
1212 );
1213
1214 $team_member_repeater->add_control(
1215 'better_payment_campaign_team_member_social_links_facebook',
1216 [
1217 'label' => esc_html__('Facebook', 'better-payment'),
1218 'type' => Controls_Manager::URL,
1219 'placeholder' => 'https://www.facebook.com/',
1220 'label_block' => true,
1221 'ai' => [
1222 'active' => false,
1223 ],
1224 'condition' => [
1225 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1226 ]
1227 ]
1228 );
1229
1230 $team_member_repeater->add_control(
1231 'better_payment_campaign_team_member_social_links_facebook_icon',
1232 [
1233 'label' => esc_html__('Facebook Icon', 'better-payment'),
1234 'type' => Controls_Manager::ICONS,
1235 'default' => [
1236 'value' => 'fab fa-facebook-f',
1237 'library' => 'fa-brands',
1238 ],
1239 'condition' => [
1240 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1241 ]
1242 ]
1243 );
1244
1245 $team_member_repeater->add_control(
1246 'better_payment_campaign_team_member_social_links_twitter',
1247 [
1248 'label' => esc_html__('X/Twitter', 'better-payment'),
1249 'type' => Controls_Manager::URL,
1250 'placeholder' => 'https://www.twitter.com/ or https://www.x.com/',
1251 'label_block' => true,
1252 'ai' => [
1253 'active' => false,
1254 ],
1255 'condition' => [
1256 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1257 ]
1258 ]
1259 );
1260
1261 $team_member_repeater->add_control(
1262 'better_payment_campaign_team_member_social_links_twitter_icon',
1263 [
1264 'label' => esc_html__('X/Twitter Icon', 'better-payment'),
1265 'type' => Controls_Manager::ICONS,
1266 'default' => [
1267 'value' => 'fab fa-x-twitter',
1268 'library' => 'fa-brands',
1269 ],
1270 'condition' => [
1271 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1272 ]
1273 ]
1274 );
1275
1276 $team_member_repeater->add_control(
1277 'better_payment_campaign_team_member_social_links_linkedin',
1278 [
1279 'label' => esc_html__('LinkedIn', 'better-payment'),
1280 'type' => Controls_Manager::URL,
1281 'placeholder' => 'https://www.linkedin.com/',
1282 'label_block' => true,
1283 'ai' => [
1284 'active' => false,
1285 ],
1286 'condition' => [
1287 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1288 ]
1289 ]
1290 );
1291
1292 $team_member_repeater->add_control(
1293 'better_payment_campaign_team_member_social_links_linkedin_icon',
1294 [
1295 'label' => esc_html__('LinkedIn Icon', 'better-payment'),
1296 'type' => Controls_Manager::ICONS,
1297 'default' => [
1298 'value' => 'fab fa-linkedin-in',
1299 'library' => 'fa-brands',
1300 ],
1301 'condition' => [
1302 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1303 ]
1304 ]
1305 );
1306
1307 $team_member_repeater->add_control(
1308 'better_payment_campaign_team_member_social_links_instagram',
1309 [
1310 'label' => esc_html__('Instagram', 'better-payment'),
1311 'type' => Controls_Manager::URL,
1312 'placeholder' => 'https://www.instagram.com/',
1313 'label_block' => true,
1314 'ai' => [
1315 'active' => false,
1316 ],
1317 'condition' => [
1318 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1319 ]
1320 ]
1321 );
1322
1323 $team_member_repeater->add_control(
1324 'better_payment_campaign_team_member_social_links_instagram_icon',
1325 [
1326 'label' => esc_html__('Instagram Icon', 'better-payment'),
1327 'type' => Controls_Manager::ICONS,
1328 'default' => [
1329 'value' => 'fab fa-instagram',
1330 'library' => 'fa-brands',
1331 ],
1332 'condition' => [
1333 'better_payment_campaign_team_member_social_links_enable' => 'yes',
1334 ]
1335 ]
1336 );
1337
1338 $this->add_control(
1339 'better_payment_campaign_team_members',
1340 [
1341 'label' => esc_html__( 'Team Members', 'better-payment' ),
1342 'type' => Controls_Manager::REPEATER,
1343 'fields' => $team_member_repeater->get_controls(),
1344 'default' => [
1345 [
1346 'better_payment_campaign_team_member_name' => 'Annette Black',
1347 'better_payment_campaign_team_member_image' => [
1348 'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-1.webp',
1349 ],
1350 ],
1351 [
1352 'better_payment_campaign_team_member_name' => 'Darrell Steward',
1353 'better_payment_campaign_team_member_image' => [
1354 'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-2.webp',
1355 ],
1356 ],
1357 [
1358 'better_payment_campaign_team_member_name' => 'Theresa Webb',
1359 'better_payment_campaign_team_member_image' => [
1360 'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-3.webp',
1361 ],
1362 ],
1363 [
1364 'better_payment_campaign_team_member_name' => 'Guy Hawkins',
1365 'better_payment_campaign_team_member_image' => [
1366 'url' => BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/team-4.webp',
1367 ],
1368 ],
1369 ],
1370 'title_field' => '{{{ better_payment_campaign_team_member_name }}}',
1371 'condition' => [
1372 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
1373 'better_payment_campaign_layout' => [ 'layout-1' ],
1374 ]
1375 ]
1376 );
1377
1378 $this->end_controls_section();
1379 }
1380
1381 public function related_campaign_settings() {
1382 $this->start_controls_section(
1383 'better_payment_campaign_related_campaign_settings',
1384 [
1385 'label' => esc_html__( 'Related Campaigns', 'better-payment' ),
1386 'condition' => [
1387 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
1388 'better_payment_campaign_layout' => [ 'layout-2' ],
1389 ]
1390 ]
1391 );
1392
1393 $this->add_control(
1394 'better_payment_campaign_related_campaign_sub_title_text',
1395 [
1396 'label' => __( 'Sub Title', 'better-payment' ),
1397 'type' => Controls_Manager::TEXT,
1398 'label_block' => true,
1399 'placeholder' => 'We Helped More Than 3,400 Children With Your Generosity',
1400 'ai' => [
1401 'active' => false,
1402 ],
1403 'condition' => [
1404 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
1405 'better_payment_campaign_layout' => [ 'layout-2' ],
1406 ]
1407 ]
1408 );
1409
1410 $related_campaign_repeater = new Repeater();
1411 $related_campaign_repeater->add_control(
1412 'better_payment_campaign_related_campaign_id',
1413 [
1414 'label' => esc_html__('Campaign ID', 'better-payment'),
1415 'type' => Controls_Manager::TEXT,
1416 'placeholder' => '42b4249',
1417 'label_block' => true,
1418 'ai' => [
1419 'active' => false,
1420 ],
1421 ]
1422 );
1423
1424 $this->add_control(
1425 'better_payment_campaign_related_campaigns',
1426 [
1427 'label' => esc_html__( 'Campaigns', 'better-payment' ),
1428 'type' => Controls_Manager::REPEATER,
1429 'fields' => $related_campaign_repeater->get_controls(),
1430 'default' => [
1431 [
1432 'better_payment_campaign_related_campaign_id' => '',
1433 ],
1434 [
1435 'better_payment_campaign_related_campaign_id' => '',
1436 ],
1437 [
1438 'better_payment_campaign_related_campaign_id' => '',
1439 ],
1440 [
1441 'better_payment_campaign_related_campaign_id' => '',
1442 ],
1443 ],
1444 'title_field' => '{{{ better_payment_campaign_related_campaign_id }}}',
1445 'condition' => [
1446 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
1447 'better_payment_campaign_layout' => [ 'layout-2' ],
1448 ]
1449 ]
1450 );
1451
1452 $this->add_control(
1453 'better_payment_campaign_related_campaigns_info',
1454 [
1455 'type' => Controls_Manager::RAW_HTML,
1456 'raw' => sprintf(
1457 __( '<p class="better-payment-dynamic-value-info" style="word-break: break-word;">Under Items, provide other campaign IDs. The first campaign will be featured. Follow <a href="%1$s" target="_blank">this doc</a> to retrieve campaign ID.</p>', 'better-payment' ),
1458 esc_url('//betterpayment.co/docs/retrieve-fundraising-campaign-id')
1459 ),
1460 'content_classes' => 'elementor-control-alert elementor-panel-alert elementor-panel-alert-info',
1461 'ai' => [
1462 'active' => false,
1463 ],
1464 'condition' => [
1465 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
1466 'better_payment_campaign_layout' => [ 'layout-2' ],
1467 ],
1468 ]
1469 );
1470
1471 $this->end_controls_section();
1472 }
1473 public function form_style() {
1474 $this->campaign_container_style();
1475 $this->campaign_header_style();
1476 $this->campaign_form_style();
1477 $this->campaign_tab_navigation_style();
1478 $this->campaign_overview_style();
1479 $this->campaign_team_style();
1480 do_action('better_payment/elementor/editor/campaign_pro_updates_section_style', $this);
1481 $this->related_campaign_style();
1482 }
1483
1484 public function campaign_container_style() {
1485 $this->start_controls_section(
1486 'better_payment_campaign_container_style',
1487 [
1488 'label' => esc_html__( 'Container', 'better-payment' ),
1489 'tab' => Controls_Manager::TAB_STYLE,
1490 ]
1491 );
1492
1493 $this->add_group_control(
1494 Group_Control_Background::get_type(),
1495 [
1496 'name' => 'better_payment_campaign_container_bg_color',
1497 'types' => [ 'classic', 'gradient' ],
1498 'selector' => '
1499 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1,
1500 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2,
1501 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3
1502 ',
1503 ]
1504 );
1505
1506 $this->add_responsive_control(
1507 'better_payment_campaign_container_padding',
1508 [
1509 'label' => esc_html__( 'Padding', 'better-payment' ),
1510 'type' => Controls_Manager::DIMENSIONS,
1511 'size_units' => [ 'px', 'em', '%' ],
1512 'selectors' => [
1513 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1514 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1515 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1516 ],
1517 ]
1518 );
1519
1520 $this->add_responsive_control(
1521 'better_payment_campaign_container_margin',
1522 [
1523 'label' => esc_html__( 'Margin', 'better-payment' ),
1524 'type' => Controls_Manager::DIMENSIONS,
1525 'size_units' => [ 'px', 'em', '%' ],
1526 'selectors' => [
1527 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1528 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1529 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1530 ],
1531 ]
1532 );
1533
1534 $this->add_group_control(
1535 Group_Control_Border::get_type(),
1536 [
1537 'name' => 'better_payment_campaign_container_border',
1538 'selector' => '
1539 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1,
1540 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2,
1541 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3
1542 ',
1543 ]
1544 );
1545
1546 $this->add_control(
1547 'better_payment_campaign_container_border_radius',
1548 [
1549 'label' => esc_html__( 'Border Radius', 'better-payment' ),
1550 'type' => Controls_Manager::DIMENSIONS,
1551 'size_units' => [ 'px' ],
1552 'selectors' => [
1553 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1554 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1555 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1556 ],
1557 ]
1558 );
1559
1560 $this->add_group_control(
1561 Group_Control_Box_Shadow::get_type(),
1562 [
1563 'name' => 'better_payment_campaign_container_box_shadow',
1564 'selector' => '
1565 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1,
1566 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2,
1567 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3
1568 ',
1569 ]
1570 );
1571
1572 $this->end_controls_section();
1573 }
1574
1575 public function campaign_header_style() {
1576 $this->start_controls_section(
1577 'better_payment_campaign_header_style',
1578 [
1579 'label' => esc_html__( 'Header', 'better-payment' ),
1580 'tab' => Controls_Manager::TAB_STYLE,
1581 ]
1582 );
1583
1584 $this->add_group_control(
1585 Group_Control_Background::get_type(),
1586 [
1587 'name' => 'better_payment_campaign_header_background',
1588 'types' => [ 'classic', 'gradient' ],
1589 'selector' => '
1590 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section,
1591 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section,
1592 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section',
1593 ]
1594 );
1595
1596 $this->add_control(
1597 'better_payment_campaign_header_content',
1598 [
1599 'label' => __( 'Content', 'better-payment' ),
1600 'type' => \Elementor\Controls_Manager::HEADING,
1601 ]
1602 );
1603
1604 $this->start_controls_tabs(
1605 'better_payment_campaign_header_content_tabs'
1606 );
1607
1608 $this->start_controls_tab(
1609 'better_payment_campaign_header_title_tab',
1610 [
1611 'label' => __( 'Title', 'better-payment' ),
1612 ]
1613 );
1614
1615 $this->add_control(
1616 'better_payment_campaign_header_title_color',
1617 [
1618 'label' => __( 'Color', 'better-payment' ),
1619 'type' => Controls_Manager::COLOR,
1620 'default' => '',
1621 'selectors' => [
1622 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}',
1623 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}',
1624 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'color: {{VALUE}}',
1625 ],
1626 ]
1627 );
1628
1629 $this->add_group_control(
1630 Group_Control_Typography::get_type(),
1631 [
1632 'name' => 'better_payment_campaign_header_title_typography',
1633 'selector' => '
1634 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary,
1635 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary,
1636 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary
1637 ',
1638 ]
1639 );
1640
1641 $this->add_responsive_control(
1642 'better_payment_campaign_header_title_padding',
1643 [
1644 'label' => esc_html__( 'Padding', 'better-payment' ),
1645 'type' => Controls_Manager::DIMENSIONS,
1646 'size_units' => [ 'px', 'em', '%' ],
1647 'selectors' => [
1648 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1649 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1650 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_primary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1651 ],
1652 ]
1653 );
1654
1655 $this->end_controls_tab();
1656
1657 $this->start_controls_tab(
1658 'better_payment_campaign_header_short_desc_tab',
1659 [
1660 'label' => __( 'Short Description', 'better-payment' ),
1661 ]
1662 );
1663
1664 $this->add_control(
1665 'better_payment_campaign_header_short_desc_color',
1666 [
1667 'label' => __( 'Color', 'better-payment' ),
1668 'type' => Controls_Manager::COLOR,
1669 'default' => '',
1670 'selectors' => [
1671 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary' => 'color: {{VALUE}}',
1672 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm' => 'color: {{VALUE}}',
1673 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary' => 'color: {{VALUE}}',
1674 ],
1675 ]
1676 );
1677
1678 $this->add_group_control(
1679 Group_Control_Typography::get_type(),
1680 [
1681 'name' => 'better_payment_campaign_header_short_desc_typography',
1682 'selector' => '
1683 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary,
1684 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary,
1685 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm,
1686 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary
1687 ',
1688 ]
1689 );
1690
1691 $this->add_responsive_control(
1692 'better_payment_campaign_header_short_desc_padding',
1693 [
1694 'label' => esc_html__( 'Padding', 'better-payment' ),
1695 'type' => Controls_Manager::DIMENSIONS,
1696 'size_units' => [ 'px', 'em', '%' ],
1697 'selectors' => [
1698 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-text_wrapper .bp-text_secondary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1699 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-text_xm' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1700 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-text_wrapper .bp-text_secondary' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1701 ],
1702 ]
1703 );
1704
1705 $this->end_controls_tab();
1706
1707 $this->end_controls_tabs();
1708
1709 $this->add_control(
1710 'better_payment_campaign_images',
1711 [
1712 'label' => __( 'Images', 'better-payment' ),
1713 'type' => \Elementor\Controls_Manager::HEADING,
1714 'separator' => 'before',
1715 'condition' => [
1716 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1717 ],
1718 ]
1719 );
1720
1721 $this->start_controls_tabs(
1722 'better_payment_campaign_images_tabs'
1723 );
1724
1725 $this->start_controls_tab(
1726 'better_payment_campaign_image_one_tab',
1727 [
1728 'label' => __( 'One', 'better-payment' ),
1729 'condition' => [
1730 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1731 ],
1732 ]
1733 );
1734
1735 $this->add_responsive_control(
1736 'better_payment_campaign_image_one_padding',
1737 [
1738 'label' => esc_html__( 'Padding', 'better-payment' ),
1739 'type' => Controls_Manager::DIMENSIONS,
1740 'size_units' => [ 'px', 'em', '%' ],
1741 'selectors' => [
1742 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1743 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1744 ],
1745 'condition' => [
1746 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1747 ],
1748 ]
1749 );
1750
1751 $this->add_responsive_control(
1752 'better_payment_campaign_image_one_margin',
1753 [
1754 'label' => esc_html__( 'Margin', 'better-payment' ),
1755 'type' => Controls_Manager::DIMENSIONS,
1756 'size_units' => [ 'px', 'em', '%' ],
1757 'selectors' => [
1758 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1759 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1760 ],
1761 'condition' => [
1762 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1763 ],
1764 ]
1765 );
1766
1767 $this->add_group_control(
1768 Group_Control_Border::get_type(),
1769 [
1770 'name' => 'better_payment_campaign_image_one_border',
1771 'selector' => '
1772 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img,
1773 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img
1774 ',
1775 'condition' => [
1776 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1777 ],
1778 ]
1779 );
1780
1781 $this->add_control(
1782 'better_payment_campaign_image_one_border_radius',
1783 [
1784 'label' => esc_html__( 'Border Radius', 'better-payment' ),
1785 'type' => Controls_Manager::DIMENSIONS,
1786 'size_units' => [ 'px' ],
1787 'selectors' => [
1788 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1789 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1790 ],
1791 'condition' => [
1792 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1793 ],
1794 ]
1795 );
1796
1797 $this->add_responsive_control(
1798 'better_payment_campaign_image_one_width',
1799 [
1800 'label' => esc_html__( 'Width', 'better-payment' ),
1801 'type' => Controls_Manager::SLIDER,
1802 'range' => [
1803 'px' => [
1804 'min' => 0,
1805 'max' => 1200,
1806 'step' => 1,
1807 ],
1808 ],
1809 'size_units' => [ 'px', 'em', '%' ],
1810 'selectors' => [
1811 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
1812 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'width: {{SIZE}}{{UNIT}};',
1813 ],
1814 'condition' => [
1815 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1816 ],
1817 ]
1818 );
1819
1820 $this->add_responsive_control(
1821 'better_payment_campaign_image_one_height',
1822 [
1823 'label' => esc_html__( 'Height', 'better-payment' ),
1824 'type' => Controls_Manager::SLIDER,
1825 'range' => [
1826 'px' => [
1827 'min' => 0,
1828 'max' => 1200,
1829 'step' => 1,
1830 ],
1831 ],
1832 'size_units' => [ 'px', 'em', '%' ],
1833 'selectors' => [
1834 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-left .bp-left-img-wrapper img' => 'height: {{SIZE}}{{UNIT}};',
1835 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-img_wrapper img' => 'height: {{SIZE}}{{UNIT}};',
1836 ],
1837 'condition' => [
1838 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3' ],
1839 ],
1840 ]
1841 );
1842
1843 $this->end_controls_tab();
1844
1845 $this->start_controls_tab(
1846 'better_payment_campaign_image_two_tab',
1847 [
1848 'label' => __( 'Two', 'better-payment' ),
1849 'condition' => [
1850 'better_payment_campaign_layout' => [ 'layout-1' ],
1851 ],
1852 ]
1853 );
1854
1855 $this->add_responsive_control(
1856 'better_payment_campaign_image_two_padding',
1857 [
1858 'label' => esc_html__( 'Padding', 'better-payment' ),
1859 'type' => Controls_Manager::DIMENSIONS,
1860 'size_units' => [ 'px', 'em', '%' ],
1861 'selectors' => [
1862 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1863 ],
1864 'condition' => [
1865 'better_payment_campaign_layout' => [ 'layout-1' ],
1866 ],
1867 ]
1868 );
1869
1870 $this->add_responsive_control(
1871 'better_payment_campaign_image_two_margin',
1872 [
1873 'label' => esc_html__( 'Margin', 'better-payment' ),
1874 'type' => Controls_Manager::DIMENSIONS,
1875 'size_units' => [ 'px', 'em', '%' ],
1876 'selectors' => [
1877 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1878 ],
1879 'condition' => [
1880 'better_payment_campaign_layout' => [ 'layout-1' ],
1881 ],
1882 ]
1883 );
1884
1885 $this->add_group_control(
1886 Group_Control_Border::get_type(),
1887 [
1888 'name' => 'better_payment_campaign_image_two_border',
1889 'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img',
1890 'condition' => [
1891 'better_payment_campaign_layout' => [ 'layout-1' ],
1892 ],
1893 ]
1894 );
1895
1896 $this->add_control(
1897 'better_payment_campaign_image_two_border_radius',
1898 [
1899 'label' => esc_html__( 'Border Radius', 'better-payment' ),
1900 'type' => Controls_Manager::DIMENSIONS,
1901 'size_units' => [ 'px' ],
1902 'selectors' => [
1903 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1904 ],
1905 'condition' => [
1906 'better_payment_campaign_layout' => [ 'layout-1' ],
1907 ],
1908 ]
1909 );
1910
1911 $this->add_responsive_control(
1912 'better_payment_campaign_image_two_width',
1913 [
1914 'label' => esc_html__( 'Width', 'better-payment' ),
1915 'type' => Controls_Manager::SLIDER,
1916 'range' => [
1917 'px' => [
1918 'min' => 0,
1919 'max' => 1200,
1920 'step' => 1,
1921 ],
1922 ],
1923 'size_units' => [ 'px', 'em', '%' ],
1924 'selectors' => [
1925 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
1926 ],
1927 'condition' => [
1928 'better_payment_campaign_layout' => [ 'layout-1' ],
1929 ],
1930 ]
1931 );
1932
1933 $this->add_responsive_control(
1934 'better_payment_campaign_image_two_height',
1935 [
1936 'label' => esc_html__( 'Height', 'better-payment' ),
1937 'type' => Controls_Manager::SLIDER,
1938 'range' => [
1939 'px' => [
1940 'min' => 0,
1941 'max' => 1200,
1942 'step' => 1,
1943 ],
1944 ],
1945 'size_units' => [ 'px', 'em', '%' ],
1946 'selectors' => [
1947 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-donation_thoughts-section .bp-image_wrapper-right .bp-right-img-wrapper img' => 'height: {{SIZE}}{{UNIT}};',
1948 ],
1949 'condition' => [
1950 'better_payment_campaign_layout' => [ 'layout-1' ],
1951 ],
1952 ]
1953 );
1954
1955 $this->end_controls_tab();
1956 $this->end_controls_tabs();
1957
1958 $this->end_controls_section();
1959 }
1960
1961 public function campaign_form_style() {
1962 $this->start_controls_section(
1963 'better_payment_campaign_form_style',
1964 [
1965 'label' => esc_html__( 'Form', 'better-payment' ),
1966 'tab' => Controls_Manager::TAB_STYLE,
1967 ]
1968 );
1969
1970 $this->add_group_control(
1971 Group_Control_Background::get_type(),
1972 [
1973 'name' => 'better_payment_campaign_form_background_color',
1974 'types' => [ 'classic', 'gradient' ],
1975 'selector' => '
1976 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card,
1977 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card
1978 ',
1979 'condition' => [
1980 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
1981 ],
1982 ]
1983 );
1984
1985 $this->add_group_control(
1986 Group_Control_Border::get_type(),
1987 [
1988 'name' => 'better_payment_campaign_form_border',
1989 'selector' => '
1990 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card,
1991 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card
1992 ',
1993 'condition' => [
1994 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
1995 ],
1996 ]
1997 );
1998
1999 $this->add_control(
2000 'better_payment_campaign_form_border_radius',
2001 [
2002 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2003 'type' => Controls_Manager::DIMENSIONS,
2004 'size_units' => [ 'px' ],
2005 'selectors' => [
2006 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2007 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2008 ],
2009 'condition' => [
2010 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
2011 ],
2012 ]
2013 );
2014
2015 $this->start_controls_tabs(
2016 'better_payment_campaign_form_tabs',
2017 [
2018 'condition' => [
2019 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
2020 ],
2021 'separator' => 'before',
2022 ]
2023 );
2024
2025 $this->start_controls_tab(
2026 'better_payment_campaign_form_title_tab',
2027 [
2028 'label' => __( 'Title', 'better-payment' ),
2029 'condition' => [
2030 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
2031 ],
2032 ]
2033 );
2034
2035 $this->add_control(
2036 'better_payment_campaign_form_title_color',
2037 [
2038 'label' => __( 'Color', 'better-payment' ),
2039 'type' => Controls_Manager::COLOR,
2040 'selectors' => [
2041 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper .bp-form_header' => 'color: {{VALUE}}',
2042 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-header' => 'color: {{VALUE}}',
2043 ],
2044 'condition' => [
2045 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
2046 ],
2047 ]
2048 );
2049
2050 $this->add_group_control(
2051 Group_Control_Typography::get_type(),
2052 [
2053 'name' => 'better_payment_campaign_form_title_typography',
2054 'selector' => '
2055 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper .bp-form_header,
2056 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-header
2057 ',
2058 'condition' => [
2059 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
2060 ],
2061 ]
2062 );
2063
2064 $this->end_controls_tab();
2065
2066 $this->start_controls_tab(
2067 'better_payment_campaign_form_sub_title_tab',
2068 [
2069 'label' => __( 'Sub Title', 'better-payment' ),
2070 'condition' => [
2071 'better_payment_campaign_layout' => [ 'layout-2', ],
2072 ],
2073 ]
2074 );
2075
2076 $this->add_control(
2077 'better_payment_campaign_form_sub_title_color',
2078 [
2079 'label' => __( 'Color', 'better-payment' ),
2080 'type' => Controls_Manager::COLOR,
2081 'selectors' => [
2082 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'color: {{VALUE}}',
2083 ],
2084 'condition' => [
2085 'better_payment_campaign_layout' => [ 'layout-2', ],
2086 ],
2087 ]
2088 );
2089
2090 $this->add_group_control(
2091 Group_Control_Typography::get_type(),
2092 [
2093 'name' => 'better_payment_campaign_form_sub_title_typography',
2094 'selector' => '
2095 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag
2096 ',
2097 'condition' => [
2098 'better_payment_campaign_layout' => [ 'layout-2', ],
2099 ],
2100 ]
2101 );
2102
2103 $this->add_control(
2104 'better_payment_campaign_form_sub_title_background_color',
2105 [
2106 'label' => __( 'Background', 'better-payment' ),
2107 'type' => Controls_Manager::COLOR,
2108 'selectors' => [
2109 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'background-color: {{VALUE}}',
2110 ],
2111 'condition' => [
2112 'better_payment_campaign_layout' => [ 'layout-2', ],
2113 ],
2114 ]
2115 );
2116
2117 $this->add_control(
2118 'better_payment_campaign_form_sub_title_padding',
2119 [
2120 'label' => esc_html__( 'Padding', 'better-payment' ),
2121 'type' => Controls_Manager::DIMENSIONS,
2122 'size_units' => [ 'px' ],
2123 'selectors' => [
2124 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2125 ],
2126 'condition' => [
2127 'better_payment_campaign_layout' => [ 'layout-2', ],
2128 ],
2129 ]
2130 );
2131
2132 $this->add_group_control(
2133 Group_Control_Border::get_type(),
2134 [
2135 'name' => 'better_payment_campaign_form_sub_title_border',
2136 'label' => __( 'Border', 'better-payment' ),
2137 'placeholder' => '1px',
2138 'default' => '1px',
2139 'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag',
2140 'condition' => [
2141 'better_payment_campaign_layout' => [ 'layout-2', ],
2142 ],
2143 ]
2144 );
2145
2146 $this->add_control(
2147 'better_payment_campaign_form_sub_title_border_radius',
2148 [
2149 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2150 'type' => Controls_Manager::DIMENSIONS,
2151 'size_units' => [ 'px' ],
2152 'selectors' => [
2153 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card .card-tag' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2154 ],
2155 'condition' => [
2156 'better_payment_campaign_layout' => [ 'layout-2', ],
2157 ],
2158 ]
2159 );
2160
2161 $this->end_controls_tab();
2162 $this->end_controls_tabs();
2163
2164 $this->add_control(
2165 'better_payment_campaign_form_progress_bar_heading',
2166 [
2167 'label' => esc_html__( 'Progress Bar', 'better-payment' ),
2168 'type' => Controls_Manager::HEADING,
2169 'separator' => 'before',
2170 'condition' => [
2171 'better_payment_campaign_layout' => [ 'layout-1' ],
2172 ],
2173 ]
2174 );
2175
2176 $this->start_controls_tabs(
2177 'better_payment_campaign_form_progress_bar_tabs',
2178 [
2179 'condition' => [
2180 'better_payment_campaign_layout' => [ 'layout-1' ],
2181 ],
2182 ]
2183 );
2184
2185 $this->start_controls_tab(
2186 'better_payment_campaign_form_progress_bar_amount_tab',
2187 [
2188 'label' => __( 'Amount', 'better-payment' ),
2189 'condition' => [
2190 'better_payment_campaign_layout' => [ 'layout-1' ],
2191 ],
2192 ]
2193 );
2194
2195 $this->add_control(
2196 'better_payment_campaign_form_progress_bar_amount_color',
2197 [
2198 'label' => __( 'Color', 'better-payment' ),
2199 'type' => Controls_Manager::COLOR,
2200 'selectors' => [
2201 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-aamount' => 'color: {{VALUE}}'
2202 ],
2203 'condition' => [
2204 'better_payment_campaign_layout' => [ 'layout-1' ],
2205 ],
2206 ]
2207 );
2208
2209 $this->add_group_control(
2210 Group_Control_Typography::get_type(),
2211 [
2212 'name' => 'better_payment_campaign_form_progress_bar_amount_typography',
2213 'selector' => '
2214 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-aamount
2215 ',
2216 'condition' => [
2217 'better_payment_campaign_layout' => [ 'layout-1' ],
2218 ],
2219 ]
2220 );
2221
2222 $this->end_controls_tab();
2223
2224 $this->start_controls_tab(
2225 'better_payment_campaign_form_progress_bar_percentage_tab',
2226 [
2227 'label' => __( 'Percentage', 'better-payment' ),
2228 'condition' => [
2229 'better_payment_campaign_layout' => [ 'layout-1' ],
2230 ],
2231 ]
2232 );
2233
2234 $this->add_control(
2235 'better_payment_campaign_form_progress_bar_percentage_color',
2236 [
2237 'label' => __( 'Color', 'better-payment' ),
2238 'type' => Controls_Manager::COLOR,
2239 'selectors' => [
2240 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-progress_output' => 'color: {{VALUE}}',
2241 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top span.bp-amount-label' => 'color: {{VALUE}}',
2242 ],
2243 'condition' => [
2244 'better_payment_campaign_layout' => [ 'layout-1' ],
2245 ],
2246 ]
2247 );
2248
2249 $this->add_group_control(
2250 Group_Control_Typography::get_type(),
2251 [
2252 'name' => 'better_payment_campaign_form_progress_bar_percentage_typography',
2253 'selector' => '
2254 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top .bp-progress_output,
2255 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-form_top span.bp-amount-label
2256 ',
2257 'condition' => [
2258 'better_payment_campaign_layout' => [ 'layout-1' ],
2259 ],
2260 ]
2261 );
2262
2263 $this->end_controls_tab();
2264
2265 $this->start_controls_tab(
2266 'better_payment_campaign_form_progress_bar_bar_tab',
2267 [
2268 'label' => __( 'Bar', 'better-payment' ),
2269 'condition' => [
2270 'better_payment_campaign_layout' => [ 'layout-1' ],
2271 ],
2272 ]
2273 );
2274
2275 $this->add_control(
2276 'better_payment_campaign_form_progress_bar_bar_color',
2277 [
2278 'label' => __( 'Color', 'better-payment' ),
2279 'type' => Controls_Manager::COLOR,
2280 'selectors' => [
2281 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar::-webkit-progress-value' => 'background-color: {{VALUE}}',
2282 ],
2283 'condition' => [
2284 'better_payment_campaign_layout' => [ 'layout-1' ],
2285 ],
2286 ]
2287 );
2288
2289 $this->add_control(
2290 'better_payment_campaign_form_progress_bar_bar_bg_color',
2291 [
2292 'label' => __( 'Background', 'better-payment' ),
2293 'type' => Controls_Manager::COLOR,
2294 'selectors' => [
2295 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar::-webkit-progress-bar' => 'background-color: {{VALUE}}',
2296 ],
2297 'condition' => [
2298 'better_payment_campaign_layout' => [ 'layout-1' ],
2299 ],
2300 ]
2301 );
2302
2303 $this->add_control(
2304 'better_payment_campaign_form_progress_bar_bar_height',
2305 [
2306 'label' => esc_html__( 'Height', 'better-payment' ),
2307 'type' => Controls_Manager::SLIDER,
2308 'size_units' => [ 'px' ],
2309 'range' => [
2310 'px' => [
2311 'min' => 1,
2312 'max' => 100,
2313 'step' => 1,
2314 ],
2315 ],
2316 'selectors' => [
2317 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar' => 'height: {{SIZE}}{{UNIT}};',
2318 ],
2319 'condition' => [
2320 'better_payment_campaign_layout' => [ 'layout-1' ],
2321 ],
2322 ]
2323 );
2324
2325 $this->add_control(
2326 'better_payment_campaign_form_progress_bar_bar_border_radius',
2327 [
2328 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2329 'type' => Controls_Manager::DIMENSIONS,
2330 'size_units' => [ 'px' ],
2331 'selectors' => [
2332 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-progress_bar' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2333 ],
2334 'condition' => [
2335 'better_payment_campaign_layout' => [ 'layout-1' ],
2336 ],
2337 ]
2338 );
2339
2340 $this->end_controls_tab();
2341
2342 $this->end_controls_tabs();
2343
2344 $this->add_control(
2345 'better_payment_campaign_form_progress_bar_heading_l2',
2346 [
2347 'label' => esc_html__( 'Progress Bar', 'better-payment' ),
2348 'type' => Controls_Manager::HEADING,
2349 'separator' => 'before',
2350 'condition' => [
2351 'better_payment_campaign_layout' => [ 'layout-2' ],
2352 ],
2353 ]
2354 );
2355
2356 $this->start_controls_tabs(
2357 'better_payment_campaign_form_progress_bar_tabs_l2',
2358 [
2359 'condition' => [
2360 'better_payment_campaign_layout' => [ 'layout-2' ],
2361 ],
2362 ]
2363 );
2364
2365 $this->start_controls_tab(
2366 'better_payment_campaign_form_progress_bar_bar_tab_l2',
2367 [
2368 'label' => __( 'Bar', 'better-payment' ),
2369 'condition' => [
2370 'better_payment_campaign_layout' => [ 'layout-2' ],
2371 ],
2372 ]
2373 );
2374
2375 $this->add_control(
2376 'better_payment_campaign_form_progress_bar_bar_color_l2',
2377 [
2378 'label' => __( 'Color', 'better-payment' ),
2379 'type' => Controls_Manager::COLOR,
2380 'selectors' => [
2381 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar::-webkit-progress-value' => 'background-color: {{VALUE}}',
2382 ],
2383 'condition' => [
2384 'better_payment_campaign_layout' => [ 'layout-2' ],
2385 ],
2386 ]
2387 );
2388
2389 $this->add_control(
2390 'better_payment_campaign_form_progress_bar_bar_bg_color_l2',
2391 [
2392 'label' => __( 'Background', 'better-payment' ),
2393 'type' => Controls_Manager::COLOR,
2394 'selectors' => [
2395 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar::-webkit-progress-bar' => 'background-color: {{VALUE}}',
2396 ],
2397 'condition' => [
2398 'better_payment_campaign_layout' => [ 'layout-2' ],
2399 ],
2400 ]
2401 );
2402
2403 $this->add_control(
2404 'better_payment_campaign_form_progress_bar_bar_height_l2',
2405 [
2406 'label' => esc_html__( 'Height', 'better-payment' ),
2407 'type' => Controls_Manager::SLIDER,
2408 'size_units' => [ 'px' ],
2409 'range' => [
2410 'px' => [
2411 'min' => 1,
2412 'max' => 100,
2413 'step' => 1,
2414 ],
2415 ],
2416 'selectors' => [
2417 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar' => 'height: {{SIZE}}{{UNIT}};',
2418 ],
2419 'condition' => [
2420 'better_payment_campaign_layout' => [ 'layout-2' ],
2421 ],
2422 ]
2423 );
2424
2425 $this->add_control(
2426 'better_payment_campaign_form_progress_bar_bar_border_radius_l2',
2427 [
2428 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2429 'type' => Controls_Manager::DIMENSIONS,
2430 'size_units' => [ 'px' ],
2431 'selectors' => [
2432 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form .bp-progress_bar' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2433 ],
2434 'condition' => [
2435 'better_payment_campaign_layout' => [ 'layout-2' ],
2436 ],
2437 ]
2438 );
2439
2440 $this->end_controls_tab();
2441
2442 $this->start_controls_tab(
2443 'better_payment_campaign_form_progress_bar_amount_tab_l2',
2444 [
2445 'label' => __( 'Donations', 'better-payment' ),
2446 'condition' => [
2447 'better_payment_campaign_layout' => [ 'layout-2' ],
2448 ],
2449 ]
2450 );
2451
2452 $this->add_control(
2453 'better_payment_campaign_form_progress_bar_amount_color_l2',
2454 [
2455 'label' => __( 'Color', 'better-payment' ),
2456 'type' => Controls_Manager::COLOR,
2457 'selectors' => [
2458 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form label.bp-donations' => 'color: {{VALUE}}',
2459 ],
2460 'condition' => [
2461 'better_payment_campaign_layout' => [ 'layout-2' ],
2462 ],
2463 ]
2464 );
2465
2466 $this->add_group_control(
2467 Group_Control_Typography::get_type(),
2468 [
2469 'name' => 'better_payment_campaign_form_progress_bar_amount_typography_l2',
2470 'selector' => '
2471 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-progress_bar-card form label.bp-donations
2472 ',
2473 'condition' => [
2474 'better_payment_campaign_layout' => [ 'layout-2' ],
2475 ],
2476 ]
2477 );
2478
2479 $this->end_controls_tab();
2480
2481 $this->start_controls_tab(
2482 'better_payment_campaign_form_progress_bar_percentage_tab_l2',
2483 [
2484 'label' => __( 'Raised', 'better-payment' ),
2485 'condition' => [
2486 'better_payment_campaign_layout' => [ 'layout-2' ],
2487 ],
2488 ]
2489 );
2490
2491 $this->add_control(
2492 'better_payment_campaign_form_progress_bar_percentage_color_l2',
2493 [
2494 'label' => __( 'Color', 'better-payment' ),
2495 'type' => Controls_Manager::COLOR,
2496 'selectors' => [
2497 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 form .bp-text_m' => 'color: {{VALUE}}',
2498 ],
2499 'condition' => [
2500 'better_payment_campaign_layout' => [ 'layout-2' ],
2501 ],
2502 ]
2503 );
2504
2505 $this->add_group_control(
2506 Group_Control_Typography::get_type(),
2507 [
2508 'name' => 'better_payment_campaign_form_progress_bar_percentage_typography_l2',
2509 'selector' => '
2510 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 form .bp-text_m
2511 ',
2512 'condition' => [
2513 'better_payment_campaign_layout' => [ 'layout-2' ],
2514 ],
2515 ]
2516 );
2517
2518 $this->end_controls_tab();
2519
2520 $this->end_controls_tabs();
2521
2522 $this->add_control(
2523 'better_payment_campaign_form_amount_list_heading',
2524 [
2525 'label' => esc_html__( 'Amount List', 'better-payment' ),
2526 'type' => Controls_Manager::HEADING,
2527 'separator' => 'before',
2528 'condition' => [
2529 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2530 ],
2531 ]
2532 );
2533
2534 $this->start_controls_tabs(
2535 'better_payment_campaign_form_amount_list_tabs',
2536 [
2537 'condition' => [
2538 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2539 ],
2540 ]
2541 );
2542
2543 $this->start_controls_tab(
2544 'better_payment_campaign_form_amount_list_normal_tab',
2545 [
2546 'label' => __( 'Normal', 'better-payment' ),
2547 'condition' => [
2548 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2549 ],
2550 ]
2551 );
2552
2553 $this->add_control(
2554 'better_payment_campaign_form_amount_list_normal_color',
2555 [
2556 'label' => __( 'Color', 'better-payment' ),
2557 'type' => Controls_Manager::COLOR,
2558 'selectors' => [
2559 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'color: {{VALUE}}',
2560 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'color: {{VALUE}}',
2561 ],
2562 'condition' => [
2563 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2564 ],
2565 ]
2566 );
2567
2568 $this->add_group_control(
2569 Group_Control_Typography::get_type(),
2570 [
2571 'name' => 'better_payment_campaign_form_amount_list_typography',
2572 'selector' => '
2573 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label,
2574 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg
2575 ',
2576 'condition' => [
2577 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2578 ],
2579 ]
2580 );
2581
2582 $this->add_control(
2583 'better_payment_campaign_form_amount_list_normal_background_color',
2584 [
2585 'label' => __( 'Background', 'better-payment' ),
2586 'type' => Controls_Manager::COLOR,
2587 'selectors' => [
2588 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'background-color: {{VALUE}}',
2589 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'background-color: {{VALUE}}',
2590 ],
2591 'condition' => [
2592 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2593 ],
2594 ]
2595 );
2596
2597 $this->add_responsive_control(
2598 'better_payment_campaign_form_amount_list_normal_padding',
2599 [
2600 'label' => esc_html__( 'Padding', 'better-payment' ),
2601 'type' => Controls_Manager::DIMENSIONS,
2602 'size_units' => [ 'px', 'em', '%' ],
2603 'selectors' => [
2604 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2605 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2606 ],
2607 'condition' => [
2608 'better_payment_campaign_layout' => [ 'layout-3', ],
2609 ],
2610 ]
2611 );
2612
2613 $this->add_group_control(
2614 Group_Control_Border::get_type(),
2615 [
2616 'name' => 'better_payment_campaign_form_amount_list_normal_border',
2617 'label' => __( 'Border', 'better-payment' ),
2618 'placeholder' => '1px',
2619 'default' => '1px',
2620 'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label, {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg',
2621 'condition' => [
2622 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2623 ],
2624 ]
2625 );
2626
2627 $this->add_control(
2628 'better_payment_campaign_form_amount_list_normal_border_radius',
2629 [
2630 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2631 'type' => Controls_Manager::DIMENSIONS,
2632 'size_units' => [ 'px' ],
2633 'selectors' => [
2634 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2635 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2636 ],
2637 'condition' => [
2638 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2639 ],
2640 ]
2641 );
2642
2643 $this->end_controls_tab();
2644
2645 $this->start_controls_tab(
2646 'better_payment_campaign_form_amount_list_active_tab',
2647 [
2648 'label' => __( 'Active', 'better-payment' ),
2649 'condition' => [
2650 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2651 ],
2652 ]
2653 );
2654
2655 $this->add_control(
2656 'better_payment_campaign_form_amount_list_active_color',
2657 [
2658 'label' => __( 'Color', 'better-payment' ),
2659 'type' => Controls_Manager::COLOR,
2660 'selectors' => [
2661 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active' => 'color: {{VALUE}}',
2662 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border' => 'color: {{VALUE}}',
2663 ],
2664 'condition' => [
2665 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2666 ],
2667 ]
2668 );
2669
2670 $this->add_control(
2671 'better_payment_campaign_form_amount_list_active_background_color',
2672 [
2673 'label' => __( 'Background Color', 'better-payment' ),
2674 'type' => Controls_Manager::COLOR,
2675 'selectors' => [
2676 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active' => 'background-color: {{VALUE}}',
2677 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border' => 'background-color: {{VALUE}}',
2678 ],
2679 'condition' => [
2680 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2681 ],
2682 ]
2683 );
2684
2685 $this->add_group_control(
2686 Group_Control_Border::get_type(),
2687 [
2688 'name' => 'better_payment_campaign_form_amount_list_active_border',
2689 'label' => __( 'Border', 'better-payment' ),
2690 'placeholder' => '1px',
2691 'default' => '1px',
2692 'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-radio_active, {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_item .bp-payment_item_bg.active_border',
2693 'condition' => [
2694 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2695 ],
2696 ]
2697 );
2698
2699 $this->end_controls_tab();
2700 $this->end_controls_tabs();
2701
2702 $this->add_control(
2703 'better_payment_campaign_form_amount_field_heading',
2704 [
2705 'label' => __( 'Amount Field', 'better-payment' ),
2706 'type' => Controls_Manager::HEADING,
2707 'separator' => 'before',
2708 'condition' => [
2709 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2710 ],
2711 ]
2712 );
2713
2714 $this->add_control(
2715 'better_payment_campaign_form_amount_field_color',
2716 [
2717 'label' => __( 'Color', 'better-payment' ),
2718 'type' => Controls_Manager::COLOR,
2719 'selectors' => [
2720 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'color: {{VALUE}}',
2721 '.better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount::placeholder' => 'color: {{VALUE}}',
2722 '.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'color: {{VALUE}}',
2723 '.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input::placeholder' => 'color: {{VALUE}}',
2724 ],
2725 'condition' => [
2726 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2727 ],
2728 ]
2729 );
2730
2731 $this->add_group_control(
2732 Group_Control_Typography::get_type(),
2733 [
2734 'name' => 'better_payment_campaign_form_amount_field_typography',
2735 'selector' => '
2736 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount,
2737 .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input
2738 ',
2739 'condition' => [
2740 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2741 ],
2742 ]
2743 );
2744
2745 $this->add_control(
2746 'better_payment_campaign_form_amount_field_background_color',
2747 [
2748 'label' => __( 'Background', 'better-payment' ),
2749 'type' => Controls_Manager::COLOR,
2750 'selectors' => [
2751 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'background-color: {{VALUE}}',
2752 '.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'background-color: {{VALUE}}',
2753 ],
2754 'condition' => [
2755 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2756 ],
2757 ]
2758 );
2759
2760 $this->add_responsive_control(
2761 'better_payment_campaign_form_amount_field_padding',
2762 [
2763 'label' => esc_html__( 'Padding', 'better-payment' ),
2764 'type' => Controls_Manager::DIMENSIONS,
2765 'size_units' => [ 'px', 'em', '%' ],
2766 'selectors' => [
2767 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2768 '.better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .bp-payment_form-input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2769 ],
2770 'condition' => [
2771 'better_payment_campaign_layout' => [ 'layout-1', 'layout-3', ],
2772 ],
2773 ]
2774 );
2775
2776 $this->add_control(
2777 'better_payment_campaign_form_amount_field_border_bottom_width',
2778 [
2779 'label' => esc_html__('Border Bottom Width', 'better-payment'),
2780 'type' => \Elementor\Controls_Manager::SLIDER,
2781 'size_units' => ['px'],
2782 'range' => [
2783 'px' => [
2784 'min' => 0,
2785 'max' => 20,
2786 ],
2787 ],
2788 'selectors' => [
2789 '{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-width: {{SIZE}}{{UNIT}};',
2790 ],
2791 'condition' => [
2792 'better_payment_campaign_layout' => [ 'layout-3', ],
2793 ],
2794 ]
2795 );
2796
2797 $this->add_control(
2798 'better_payment_campaign_form_amount_field_border_bottom_style',
2799 [
2800 'label' => esc_html__('Border Style', 'better-payment'),
2801 'type' => \Elementor\Controls_Manager::SELECT,
2802 'default' => 'solid',
2803 'options' => [
2804 '' => 'Default',
2805 'none' => 'None',
2806 'solid' => 'Solid',
2807 'dashed' => 'Dashed',
2808 'double' => 'Double',
2809 'dotted' => 'Dotted',
2810 'groove' => 'Groove',
2811 ],
2812 'selectors' => [
2813 '{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-style: {{VALUE}};',
2814 ],
2815 'condition' => [
2816 'better_payment_campaign_layout' => [ 'layout-3', ],
2817 ],
2818 ]
2819 );
2820
2821 $this->add_control(
2822 'better_payment_campaign_form_amount_field_border_bottom_color',
2823 [
2824 'label' => esc_html__('Border Color', 'better-payment'),
2825 'type' => \Elementor\Controls_Manager::COLOR,
2826 'selectors' => [
2827 '{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild' => 'border-bottom-color: {{VALUE}};',
2828 ],
2829 'condition' => [
2830 'better_payment_campaign_layout' => [ 'layout-3', ],
2831 ],
2832 ]
2833 );
2834
2835 $this->add_control(
2836 'better_payment_campaign_form_currency_color_l3',
2837 [
2838 'label' => __( 'Currency Color', 'better-payment' ),
2839 'type' => Controls_Manager::COLOR,
2840 'selectors' => [
2841 '{{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .layout-3-currency' => 'color: {{VALUE}};',
2842 ],
2843 'condition' => [
2844 'better_payment_campaign_layout' => [ 'layout-3', ],
2845 ],
2846 ]
2847 );
2848
2849 $this->add_group_control(
2850 Group_Control_Typography::get_type(),
2851 [
2852 'name' => 'better_payment_campaign_form_currency_typography_l3',
2853 'selector' => '
2854 {{WRAPPER}} .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .input-fild .layout-3-currency
2855 ',
2856 'condition' => [
2857 'better_payment_campaign_layout' => [ 'layout-3', ],
2858 ],
2859 ]
2860 );
2861
2862 $this->add_group_control(
2863 Group_Control_Border::get_type(),
2864 [
2865 'name' => 'better_payment_campaign_form_amount_field_border',
2866 'label' => __( 'Border', 'better-payment' ),
2867 'placeholder' => '1px',
2868 'default' => '1px',
2869 'selector' => '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount',
2870 'condition' => [
2871 'better_payment_campaign_layout' => [ 'layout-1' ],
2872 ],
2873 ]
2874 );
2875
2876 $this->add_control(
2877 'better_payment_campaign_form_amount_field_border_radius',
2878 [
2879 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2880 'type' => Controls_Manager::DIMENSIONS,
2881 'size_units' => [ 'px' ],
2882 'selectors' => [
2883 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .campaign-custom-amount' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2884 ],
2885 'condition' => [
2886 'better_payment_campaign_layout' => [ 'layout-1' ],
2887 ],
2888 ]
2889 );
2890
2891 $this->add_control(
2892 'better_payment_campaign_form_button_heading',
2893 [
2894 'label' => __( 'Button', 'better-payment' ),
2895 'type' => Controls_Manager::HEADING,
2896 'separator' => 'before',
2897 ]
2898 );
2899
2900 $this->start_controls_tabs(
2901 'better_payment_campaign_form_button_tabs'
2902 );
2903
2904 $this->start_controls_tab(
2905 'better_payment_campaign_form_button_normal_tab',
2906 [
2907 'label' => __( 'Normal', 'better-payment' ),
2908 ]
2909 );
2910
2911 $this->add_control(
2912 'better_payment_campaign_form_button_normal_color',
2913 [
2914 'label' => __( 'Color', 'better-payment' ),
2915 'type' => Controls_Manager::COLOR,
2916 'selectors' => [
2917 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'color: {{VALUE}}',
2918 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'color: {{VALUE}}',
2919 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'color: {{VALUE}}',
2920 ],
2921 ]
2922 );
2923
2924 $this->add_group_control(
2925 Group_Control_Typography::get_type(),
2926 [
2927 'name' => 'better_payment_campaign_form_button_typography',
2928 'selector' => '
2929 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn,
2930 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn,
2931 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn
2932 ',
2933 ]
2934 );
2935
2936 $this->add_control(
2937 'better_payment_campaign_form_button_icon_color',
2938 [
2939 'label' => __( 'Icon Color', 'better-payment' ),
2940 'type' => Controls_Manager::COLOR,
2941 'selectors' => [
2942 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn svg path' => 'stroke: {{VALUE}}',
2943 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn svg path' => 'stroke: {{VALUE}}',
2944 ],
2945 'condition' => [
2946 'better_payment_campaign_layout' => [ 'layout-2', 'layout-3', ],
2947 ],
2948 ]
2949 );
2950
2951 $this->add_control(
2952 'better_payment_campaign_form_button_normal_background_color',
2953 [
2954 'label' => __( 'Background', 'better-payment' ),
2955 'type' => Controls_Manager::COLOR,
2956 'selectors' => [
2957 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'background-color: {{VALUE}}',
2958 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'background-color: {{VALUE}}',
2959 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'background-color: {{VALUE}}',
2960 ],
2961 ]
2962 );
2963
2964 $this->add_responsive_control(
2965 'better_payment_campaign_form_button_normal_padding',
2966 [
2967 'label' => esc_html__( 'Padding', 'better-payment' ),
2968 'type' => Controls_Manager::DIMENSIONS,
2969 'size_units' => [ 'px', 'em', '%' ],
2970 'selectors' => [
2971 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2972 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2973 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2974 ],
2975 ]
2976 );
2977
2978 $this->add_group_control(
2979 Group_Control_Border::get_type(),
2980 [
2981 'name' => 'better_payment_campaign_form_button_normal_border',
2982 'label' => __( 'Border', 'better-payment' ),
2983 'placeholder' => '1px',
2984 'default' => '1px',
2985 'selector' => '
2986 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn,
2987 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn,
2988 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn
2989 ',
2990 ]
2991 );
2992
2993 $this->add_control(
2994 'better_payment_campaign_form_button_normal_border_radius',
2995 [
2996 'label' => esc_html__( 'Border Radius', 'better-payment' ),
2997 'type' => Controls_Manager::DIMENSIONS,
2998 'size_units' => [ 'px' ],
2999 'selectors' => [
3000 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3001 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3002 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3003 ],
3004 ]
3005 );
3006
3007 $this->end_controls_tab();
3008
3009 $this->start_controls_tab(
3010 'better_payment_campaign_form_button_hover_tab',
3011 [
3012 'label' => __( 'Hover', 'better-payment' ),
3013 ]
3014 );
3015
3016 $this->add_control(
3017 'better_payment_campaign_form_button_hover_color',
3018 [
3019 'label' => __( 'Color', 'better-payment' ),
3020 'type' => Controls_Manager::COLOR,
3021 'selectors' => [
3022 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'color: {{VALUE}}',
3023 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'color: {{VALUE}}',
3024 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'color: {{VALUE}}',
3025 ],
3026 ]
3027 );
3028
3029 $this->add_control(
3030 'better_payment_campaign_form_button_hover_icon_color',
3031 [
3032 'label' => __( 'Icon Color', 'better-payment' ),
3033 'type' => Controls_Manager::COLOR,
3034 'selectors' => [
3035 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover svg path' => 'stroke: {{VALUE}}',
3036 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover svg path' => 'stroke: {{VALUE}}',
3037 ],
3038 'condition' => [
3039 'better_payment_campaign_layout' => [ 'layout-2', 'layout-3', ],
3040 ],
3041 ]
3042 );
3043
3044 $this->add_control(
3045 'better_payment_campaign_form_button_hover_background_color',
3046 [
3047 'label' => __( 'Background', 'better-payment' ),
3048 'type' => Controls_Manager::COLOR,
3049 'selectors' => [
3050 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'background-color: {{VALUE}}',
3051 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'background-color: {{VALUE}}',
3052 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'background-color: {{VALUE}}',
3053 ],
3054 ]
3055 );
3056
3057 $this->add_control(
3058 'better_payment_campaign_form_button_hover_border_color',
3059 [
3060 'label' => __( 'Border Color', 'better-payment' ),
3061 'type' => Controls_Manager::COLOR,
3062 'selectors' => [
3063 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-charity_raised-section .bp-charity_raised-card .bp-form_wrapper form .bp-donate_btn:hover' => 'border-color: {{VALUE}}',
3064 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donation_hero-section .bp-text_wrapper .bp-donate_btn:hover' => 'border-color: {{VALUE}}',
3065 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-donation_hero-section .bp-hero_wrapper .bp-text_wrapper .bp-payment_form .bp-donation_btn:hover' => 'border-color: {{VALUE}}',
3066 ],
3067 ]
3068 );
3069
3070 $this->end_controls_tab();
3071
3072 $this->end_controls_tabs();
3073
3074 $this->end_controls_section();
3075 }
3076
3077 public function campaign_overview_style() {
3078 $this->start_controls_section(
3079 'better_payment_campaign_overview_style',
3080 [
3081 'label' => esc_html__( 'Overview', 'better-payment' ),
3082 'tab' => Controls_Manager::TAB_STYLE,
3083 ]
3084 );
3085
3086 $this->add_control(
3087 'better_payment_campaign_overview_title_heading_l_3',
3088 [
3089 'label' => esc_html__( 'Title', 'better-payment' ),
3090 'type' => Controls_Manager::HEADING,
3091 'condition' => [
3092 'better_payment_campaign_layout' => [ 'layout-3', ],
3093 ]
3094 ]
3095 );
3096
3097 $this->add_control(
3098 'better_payment_campaign_overview_title_color_l3',
3099 [
3100 'label' => __( 'Color', 'better-payment' ),
3101 'type' => Controls_Manager::COLOR,
3102 'selectors' => [
3103 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_xxl' => 'color: {{VALUE}}',
3104 ],
3105 'condition' => [
3106 'better_payment_campaign_layout' => [ 'layout-3', ],
3107 ]
3108 ]
3109 );
3110
3111 $this->add_group_control(
3112 Group_Control_Typography::get_type(),
3113 [
3114 'name' => 'better_payment_campaign_overview_title_typography_l3',
3115 'selector' => '
3116 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_xxl
3117 ',
3118 'condition' => [
3119 'better_payment_campaign_layout' => [ 'layout-3', ],
3120 ]
3121 ]
3122 );
3123
3124 $this->add_control(
3125 'better_payment_campaign_overview_short_desc_heading',
3126 [
3127 'label' => esc_html__( 'Short Description', 'better-payment' ),
3128 'type' => Controls_Manager::HEADING,
3129 ]
3130 );
3131
3132 $this->add_control(
3133 'better_payment_campaign_overview_short_desc_color',
3134 [
3135 'label' => __( 'Color', 'better-payment' ),
3136 'type' => Controls_Manager::COLOR,
3137 'selectors' => [
3138 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-body .bp-text_secondary' => 'color: {{VALUE}}',
3139 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-tab_content .bp-overviow_text-wrapper .bp-overview_text' => 'color: {{VALUE}}',
3140 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_secondary' => 'color: {{VALUE}}',
3141 ],
3142 ]
3143 );
3144
3145 $this->add_group_control(
3146 Group_Control_Typography::get_type(),
3147 [
3148 'name' => 'better_payment_campaign_overview_short_desc_typography',
3149 'selector' => '
3150 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-body .bp-text_secondary,
3151 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-tab_content .bp-overviow_text-wrapper .bp-overview_text,
3152 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-help_wrapper .bp-text_secondary
3153 ',
3154 ]
3155 );
3156
3157 $this->add_control(
3158 'better_payment_campaign_overview_our_mission_heading',
3159 [
3160 'label' => esc_html__( 'Our Mission', 'better-payment' ),
3161 'type' => Controls_Manager::HEADING,
3162 'separator' => 'before',
3163 'condition' => [
3164 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3165 'better_payment_campaign_layout' => [ 'layout-1' ],
3166 'better_payment_campaign_general_overview_enable' => 'yes',
3167 ]
3168 ]
3169 );
3170
3171 $this->start_controls_tabs(
3172 'better_payment_campaign_overview_our_mission_tabs',
3173 [
3174 'condition' => [
3175 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3176 'better_payment_campaign_layout' => [ 'layout-1' ],
3177 'better_payment_campaign_general_overview_enable' => 'yes',
3178 ]
3179 ]
3180 );
3181
3182 $this->start_controls_tab(
3183 'better_payment_campaign_overview_our_mission_tab',
3184 [
3185 'label' => __( 'Title', 'better-payment' ),
3186 ]
3187 );
3188
3189 $this->add_control(
3190 'better_payment_campaign_overview_our_mission_title_color',
3191 [
3192 'label' => __( 'Color', 'better-payment' ),
3193 'type' => Controls_Manager::COLOR,
3194 'selectors' => [
3195 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-text_l' => 'color: {{VALUE}}',
3196 ],
3197 'condition' => [
3198 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3199 'better_payment_campaign_layout' => [ 'layout-1' ],
3200 'better_payment_campaign_general_overview_enable' => 'yes',
3201 ]
3202 ]
3203 );
3204
3205 $this->add_group_control(
3206 Group_Control_Typography::get_type(),
3207 [
3208 'name' => 'better_payment_campaign_overview_our_mission_title_typography',
3209 'selector' => '
3210 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-text_l
3211 ',
3212 'condition' => [
3213 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3214 'better_payment_campaign_layout' => [ 'layout-1' ],
3215 'better_payment_campaign_general_overview_enable' => 'yes',
3216 ]
3217 ]
3218 );
3219
3220 $this->end_controls_tab();
3221
3222 $this->start_controls_tab(
3223 'better_payment_campaign_overview_our_mission_items_tab',
3224 [
3225 'label' => __( 'List', 'better-payment' ),
3226 ]
3227 );
3228
3229 $this->add_control(
3230 'better_payment_campaign_overview_our_mission_items_color',
3231 [
3232 'label' => __( 'Color', 'better-payment' ),
3233 'type' => Controls_Manager::COLOR,
3234 'selectors' => [
3235 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item p' => 'color: {{VALUE}}',
3236 ],
3237 'condition' => [
3238 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3239 'better_payment_campaign_layout' => [ 'layout-1' ],
3240 'better_payment_campaign_general_overview_enable' => 'yes',
3241 ]
3242 ]
3243 );
3244
3245 $this->add_group_control(
3246 Group_Control_Typography::get_type(),
3247 [
3248 'name' => 'better_payment_campaign_overview_our_mission_items_typography',
3249 'selector' => '
3250 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item p
3251 ',
3252 'condition' => [
3253 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3254 'better_payment_campaign_layout' => [ 'layout-1' ],
3255 'better_payment_campaign_general_overview_enable' => 'yes',
3256 ]
3257 ]
3258 );
3259
3260 $this->add_control(
3261 'better_payment_campaign_overview_our_mission_items_bullet_color',
3262 [
3263 'label' => __( 'Bullet Color', 'better-payment' ),
3264 'type' => Controls_Manager::COLOR,
3265 'selectors' => [
3266 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_text-wrapper .bp-overview_list .bp-overview_list-item span svg path' => 'fill: {{VALUE}}',
3267 ],
3268 'condition' => [
3269 'better_payment_campaign_general_overview_mossion_enable' => 'yes',
3270 'better_payment_campaign_layout' => [ 'layout-1' ],
3271 'better_payment_campaign_general_overview_enable' => 'yes',
3272 ]
3273 ]
3274 );
3275
3276 $this->end_controls_tab();
3277 $this->end_controls_tabs();
3278
3279 $this->end_controls_section();
3280 }
3281
3282 public function campaign_tab_navigation_style() {
3283 $this->start_controls_section(
3284 'better_payment_campaign_tab_navigation_style',
3285 [
3286 'label' => esc_html__( 'Tabs', 'better-payment' ),
3287 'tab' => Controls_Manager::TAB_STYLE,
3288 'condition' => [
3289 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
3290 ],
3291 ]
3292 );
3293
3294 $this->add_control(
3295 'better_payment_campaign_overview_title_color',
3296 [
3297 'label' => __( 'Color', 'better-payment' ),
3298 'type' => Controls_Manager::COLOR,
3299 'selectors' => [
3300 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button' => 'color: {{VALUE}}',
3301 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button' => 'color: {{VALUE}}',
3302 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-text_xxl' => 'color: {{VALUE}}',
3303 ],
3304 ]
3305 );
3306
3307 $this->add_group_control(
3308 Group_Control_Typography::get_type(),
3309 [
3310 'name' => 'better_payment_campaign_overview_title_typography',
3311 'selector' => '
3312 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button,
3313 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button,
3314 {{WRAPPER}} .better-payment .better-payment_campaign-layout_3 .bp-text_xxl
3315 ',
3316 ]
3317 );
3318
3319 $this->add_control(
3320 'better_payment_campaign_overview_active_tab_background_color',
3321 [
3322 'label' => __( 'Active Tab Color', 'better-payment' ),
3323 'type' => Controls_Manager::COLOR,
3324 'selectors' => [
3325 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button::after' => 'background-color: {{VALUE}}',
3326 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-content_navigation-section .bp-tab_navigation .bp-tab_button::after' => 'background-color: {{VALUE}}',
3327 ],
3328 'condition' => [
3329 'better_payment_campaign_layout' => [ 'layout-1', 'layout-2', ],
3330 ],
3331 ]
3332 );
3333
3334 $this->end_controls_section();
3335 }
3336
3337 public function campaign_team_style() {
3338
3339 $this->start_controls_section(
3340 'better_payment_campaign_team_style',
3341 [
3342 'label' => __( '⮑ Our Team', 'better-payment' ),
3343 'tab' => Controls_Manager::TAB_STYLE,
3344 'condition' => [
3345 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3346 'better_payment_campaign_layout' => [ 'layout-1' ],
3347 ],
3348 ]
3349 );
3350
3351 $this->add_control(
3352 'better_payment_campaign_team_title_heading',
3353 [
3354 'label' => esc_html__( 'Title', 'better-payment' ),
3355 'type' => Controls_Manager::HEADING,
3356 'condition' => [
3357 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3358 'better_payment_campaign_layout' => [ 'layout-1' ],
3359 ]
3360 ]
3361 );
3362
3363 $this->add_control(
3364 'better_payment_campaign_team_title_color',
3365 [
3366 'label' => __( 'Color', 'better-payment' ),
3367 'type' => Controls_Manager::COLOR,
3368 'selectors' => [
3369 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-footer.bp-overview_team-wrapper .bp-text_xxl' => 'color: {{VALUE}}',
3370 ],
3371 'condition' => [
3372 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3373 'better_payment_campaign_layout' => [ 'layout-1' ],
3374 ]
3375 ]
3376 );
3377
3378 $this->add_group_control(
3379 Group_Control_Typography::get_type(),
3380 [
3381 'name' => 'better_payment_campaign_team_title_typography',
3382 'selector' => '
3383 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-section-footer.bp-overview_team-wrapper .bp-text_xxl
3384 ',
3385 'condition' => [
3386 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3387 'better_payment_campaign_layout' => [ 'layout-1' ],
3388 ]
3389 ]
3390 );
3391
3392 $this->add_control(
3393 'better_payment_campaign_team_name_heading',
3394 [
3395 'label' => esc_html__( 'Name', 'better-payment' ),
3396 'type' => Controls_Manager::HEADING,
3397 'condition' => [
3398 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3399 'better_payment_campaign_layout' => [ 'layout-1' ],
3400 ],
3401 'separator' => 'before',
3402 ]
3403 );
3404
3405 $this->add_control(
3406 'better_payment_campaign_team_member_name_color',
3407 [
3408 'label' => __( 'Color', 'better-payment' ),
3409 'type' => Controls_Manager::COLOR,
3410 'selectors' => [
3411 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-name' => 'color: {{VALUE}}',
3412 ],
3413 'condition' => [
3414 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3415 'better_payment_campaign_layout' => [ 'layout-1' ],
3416 ]
3417 ]
3418 );
3419
3420 $this->add_group_control(
3421 Group_Control_Typography::get_type(),
3422 [
3423 'name' => 'better_payment_campaign_team_member_name_typography',
3424 'selector' => '
3425 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-name
3426 ',
3427 'condition' => [
3428 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3429 'better_payment_campaign_layout' => [ 'layout-1' ],
3430 ]
3431 ]
3432 );
3433
3434 $this->add_control(
3435 'better_payment_campaign_team_designation_heading',
3436 [
3437 'label' => esc_html__( 'Designation', 'better-payment' ),
3438 'type' => Controls_Manager::HEADING,
3439 'condition' => [
3440 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3441 'better_payment_campaign_layout' => [ 'layout-1' ],
3442 ],
3443 'separator' => 'before',
3444 ]
3445 );
3446
3447 $this->add_control(
3448 'better_payment_campaign_team_member_designation_color',
3449 [
3450 'label' => __( 'Color', 'better-payment' ),
3451 'type' => Controls_Manager::COLOR,
3452 'selectors' => [
3453 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-designation' => 'color: {{VALUE}}',
3454 ],
3455 'condition' => [
3456 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3457 'better_payment_campaign_layout' => [ 'layout-1' ],
3458 ]
3459 ]
3460 );
3461
3462 $this->add_group_control(
3463 Group_Control_Typography::get_type(),
3464 [
3465 'name' => 'better_payment_campaign_team_member_designation_typography',
3466 'selector' => '
3467 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .member-designation
3468 ',
3469 'condition' => [
3470 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3471 'better_payment_campaign_layout' => [ 'layout-1' ],
3472 ]
3473 ]
3474 );
3475
3476 $this->add_control(
3477 'better_payment_campaign_team_social_links_heading',
3478 [
3479 'label' => esc_html__( 'Social Links', 'better-payment' ),
3480 'type' => Controls_Manager::HEADING,
3481 'condition' => [
3482 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3483 'better_payment_campaign_layout' => [ 'layout-1' ],
3484 ],
3485 'separator' => 'before',
3486 ]
3487 );
3488
3489 $this->start_controls_tabs(
3490 'better_payment_campaign_team_social_links_tabs',
3491 [
3492 'condition' => [
3493 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3494 'better_payment_campaign_layout' => [ 'layout-1' ],
3495 ]
3496 ]
3497 );
3498
3499 $this->start_controls_tab(
3500 'better_payment_campaign_team_social_links_normal_tab',
3501 [
3502 'label' => esc_html__( 'Normal', 'better-payment' ),
3503 ]
3504 );
3505
3506 $this->add_control(
3507 'better_payment_campaign_team_social_links_color',
3508 [
3509 'label' => __( 'Color', 'better-payment' ),
3510 'type' => Controls_Manager::COLOR,
3511 'selectors' => [
3512 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg' => 'fill: {{VALUE}}',
3513 ],
3514 'condition' => [
3515 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3516 'better_payment_campaign_layout' => [ 'layout-1' ],
3517 ]
3518 ]
3519 );
3520
3521 // size
3522 $this->add_responsive_control(
3523 'better_payment_campaign_team_social_links_size',
3524 [
3525 'label' => esc_html__( 'Size', 'better-payment' ),
3526 'type' => Controls_Manager::SLIDER,
3527 'range' => [
3528 'px' => [
3529 'min' => 0,
3530 'max' => 100,
3531 'step' => 1,
3532 ],
3533 ],
3534 'size_units' => [ 'px', 'em', '%' ],
3535 'selectors' => [
3536 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg' => 'height: {{SIZE}}{{UNIT}};',
3537 ],
3538 'condition' => [
3539 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3540 'better_payment_campaign_layout' => [ 'layout-1' ],
3541 ]
3542 ]
3543 );
3544
3545 $this->end_controls_tab();
3546
3547 $this->start_controls_tab(
3548 'better_payment_campaign_team_social_links_hover_tab',
3549 [
3550 'label' => esc_html__( 'Hover', 'better-payment' ),
3551 ]
3552 );
3553
3554 $this->add_control(
3555 'better_payment_campaign_team_social_links_hover_color',
3556 [
3557 'label' => __( 'Color', 'better-payment' ),
3558 'type' => Controls_Manager::COLOR,
3559 'selectors' => [
3560 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane .bp-team-social_links-wrapper a svg:hover' => 'fill: {{VALUE}}',
3561 ],
3562 'condition' => [
3563 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3564 'better_payment_campaign_layout' => [ 'layout-1' ],
3565 ]
3566 ]
3567 );
3568
3569 $this->end_controls_tab();
3570
3571 $this->end_controls_tabs();
3572
3573 $this->add_control(
3574 'better_payment_campaign_team_image_heading',
3575 [
3576 'label' => esc_html__( 'Image', 'better-payment' ),
3577 'type' => Controls_Manager::HEADING,
3578 'condition' => [
3579 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3580 'better_payment_campaign_layout' => [ 'layout-1' ],
3581 ],
3582 'separator' => 'before',
3583 ]
3584 );
3585
3586 $this->add_responsive_control(
3587 'better_payment_campaign_team_member_image_size',
3588 [
3589 'label' => esc_html__( 'Size', 'better-payment' ),
3590 'type' => Controls_Manager::SLIDER,
3591 'range' => [
3592 'px' => [
3593 'min' => 0,
3594 'max' => 1200,
3595 'step' => 1,
3596 ],
3597 ],
3598 'size_units' => [ 'px', 'em', '%' ],
3599 'selectors' => [
3600 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
3601 ],
3602 'condition' => [
3603 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3604 'better_payment_campaign_layout' => [ 'layout-1' ],
3605 ]
3606 ]
3607 );
3608
3609 $this->add_group_control(
3610 Group_Control_Border::get_type(),
3611 [
3612 'name' => 'better_payment_campaign_team_member_image_border',
3613 'selector' => '
3614 {{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img
3615 ',
3616 'condition' => [
3617 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3618 'better_payment_campaign_layout' => [ 'layout-1' ],
3619 ]
3620 ]
3621 );
3622
3623 $this->add_control(
3624 'better_payment_campaign_team_member_image_border_radius',
3625 [
3626 'label' => esc_html__( 'Border Radius', 'better-payment' ),
3627 'type' => Controls_Manager::DIMENSIONS,
3628 'size_units' => [ 'px' ],
3629 'selectors' => [
3630 '{{WRAPPER}} .better-payment .better-payment_campaign-layout_1 .bp-content_navigation-section .bp-tab_content .bp-tab_pane#overview .bp-overview_team-wrapper .img-box img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3631 ],
3632 'condition' => [
3633 'better_payment_campaign_general_footer_team_enable_layout_1' => 'yes',
3634 'better_payment_campaign_layout' => [ 'layout-1' ],
3635 ]
3636 ]
3637 );
3638
3639 $this->end_controls_section();
3640 }
3641
3642 public function related_campaign_style() {
3643 $this->start_controls_section(
3644 'better_payment_related_campaign_style',
3645 [
3646 'label' => __( 'Related Campaigns', 'better-payment' ),
3647 'tab' => Controls_Manager::TAB_STYLE,
3648 'condition' => [
3649 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
3650 'better_payment_campaign_layout' => [ 'layout-2' ],
3651 ],
3652 ]
3653 );
3654
3655 $this->add_group_control(
3656 Group_Control_Background::get_type(),
3657 [
3658 'name' => 'better_payment_related_campaign_background_color',
3659 'types' => [ 'classic', 'gradient' ],
3660 'selector' => '
3661 {{WRAPPER}} .better-payment .better-payment_campaign-layout_2 .bp-donate_section .bp-donate_section-wrapper
3662 ',
3663 'condition' => [
3664 'better_payment_campaign_general_footer_related_campaign_enable_layout_2' => 'yes',
3665 'better_payment_campaign_layout' => [ 'layout-2' ],
3666 ],
3667 ]
3668 );
3669
3670 $this->end_controls_section();
3671 }
3672
3673 /**
3674 * Render the widget output on the frontend.
3675 *
3676 * @since 1.0.0
3677 */
3678 protected function render() {
3679 $is_edit_mode = Plugin::instance()->editor->is_edit_mode();
3680
3681 if ( $is_edit_mode && ( ! current_user_can('manage_options') ) ) {
3682 return;
3683 }
3684
3685 $settings = $this->get_settings_for_display();
3686
3687 $payment_field = "number";
3688 $bp_widget_page_id = get_the_ID();
3689 $bp_widget_id = $this->get_id();
3690 $campaign_id_prefix = sanitize_text_field( 'bp_campaign_' . $bp_widget_page_id . '_' );
3691 $campaign_id_postfix = sanitize_text_field( $settings[ 'better_payment_campaign_id' ] );
3692 $better_payment_campaign_id = $campaign_id_prefix . $campaign_id_postfix;
3693 $bp_goal_amount = sanitize_text_field($settings[ 'better_payment_campaign_form_goal_amount' ]);
3694 $bp_currency = sanitize_text_field($settings[ 'better_payment_campaign_currency' ]);
3695
3696 global $wpdb;
3697 $table = "{$wpdb->prefix}better_payment";
3698 $bpc_raised_amount_data = $wpdb->get_results(
3699 $wpdb->prepare( "SELECT * FROM $table WHERE campaign_id=%s", sanitize_text_field( $better_payment_campaign_id ) )
3700 );
3701
3702 // The same rows CampaignStats counts (approved statuses incl. Paystack's `success`,
3703 // a confirmed legacy free checkout worth 0), not only Stripe's `paid`.
3704 $bpc_totals = \Better_Payment\Lite\Classes\Helper::campaign_totals_from_rows( $bpc_raised_amount_data );
3705 $bpc_total_amount_raised = $bpc_totals['amount'];
3706 $bpc_total_payment_count = $bpc_totals['count'];
3707
3708 $bpc_goal_percentage = 0;
3709 if ( ! empty( $bp_goal_amount ) && $bp_goal_amount > 0 && $bpc_total_amount_raised > 0 ) {
3710 $bpc_goal_percentage = floor( ( $bpc_total_amount_raised / floatval( $bp_goal_amount ) ) * 100 );
3711 }
3712
3713 wp_enqueue_script( 'fundraising-campaign-script' );
3714
3715 $action = esc_url( admin_url( 'admin-post.php' ) );
3716
3717 $setting_meta = wp_json_encode( [
3718 'page_id' => $bp_widget_page_id,
3719 'widget_id' => esc_attr( $bp_widget_id ),
3720 'campaign_id' => esc_attr( $better_payment_campaign_id ),
3721 'goal_amount' => esc_attr( $bp_goal_amount ),
3722 'currency' => esc_attr( $bp_currency ),
3723 'campaign_id_prefix' => esc_attr( $campaign_id_prefix ),
3724 'campaign_id_postfix' => esc_attr( $campaign_id_postfix ),
3725 'raised_amount' => esc_attr( $bpc_total_amount_raised ),
3726 ] );
3727
3728 $better_payment_campaigns = get_option( 'better_payment_campaigns', [] );
3729 $better_payment_campaigns[ esc_attr( $bp_widget_id ) ] = $setting_meta;
3730 update_option( 'better_payment_campaigns', $better_payment_campaigns );
3731
3732
3733 $better_payment_placeholder_class = '';
3734 if ( !empty($settings[ 'better_payment_placeholder_switch' ]) && $settings[ 'better_payment_placeholder_switch' ] != 'yes' ) {
3735 $better_payment_placeholder_class = 'better-payment-hide-placeholder';
3736 }
3737
3738 $data = [
3739 'payment_field' => $payment_field,
3740 'action' => $action,
3741 'setting_meta' => $setting_meta,
3742 'better_payment_placeholder_class' => $better_payment_placeholder_class,
3743 'better_payment_campaign_id' => $better_payment_campaign_id,
3744 'campaign_id_prefix' => $campaign_id_prefix,
3745 'bpc_total_amount_raised' => $bpc_total_amount_raised,
3746 'bpc_total_payment_count' => $bpc_total_payment_count,
3747 'bpc_goal_percentage' => $bpc_goal_percentage,
3748 ];
3749
3750 $widgetObj = $this;
3751
3752 $better_payment_campaign_layout = sanitize_text_field($settings[ 'better_payment_campaign_layout' ]);
3753 $better_payment_campaign_layout = in_array($better_payment_campaign_layout, array_keys( $this->better_payment_campaign_layouts() ) ) ? $better_payment_campaign_layout : 'layout-1';
3754
3755 $template_file = BETTER_PAYMENT_ADMIN_VIEWS_PATH . '/elementor/fundraising-campaign/' . $better_payment_campaign_layout . '.php';
3756
3757 $better_payment_campaign_content = '';
3758
3759 if ( file_exists($template_file) ) {
3760 ob_start();
3761 include $template_file;
3762 $better_payment_campaign_content = ob_get_contents();
3763 ob_end_clean();
3764 }
3765
3766 $better_payment_campaign_content = apply_filters( 'better_payment/elementor/editor/get_layout_content', $better_payment_campaign_content, $settings, $this, $data );
3767
3768 echo $better_payment_campaign_content;
3769 }
3770
3771 public function render_campaign_hidden_fields( $settings ) {
3772 $better_payment_campaign_id = 'bp_campaign_' . get_the_ID() . '_' . sanitize_text_field($settings[ 'better_payment_campaign_id' ]);
3773 $better_payment_campaign_currency = sanitize_text_field($settings[ 'better_payment_campaign_currency' ]);
3774
3775 $hidden_fields = '<input type="hidden" class="better_payment_campaign_id" name="better_payment_campaign_id" value="' . esc_attr( $better_payment_campaign_id ) . '">
3776 <input type="hidden" class="better_payment_campaign_currency" name="better_payment_campaign_currency" value="' . esc_attr( $better_payment_campaign_currency ) . '">';
3777
3778 return $hidden_fields;
3779 }
3780
3781 public function better_payment_campaign_layouts() {
3782 $layouts = apply_filters('better_payment/elementor/widget/campaign_layouts', [
3783 'layout-1' => 'Layout 1',
3784 'layout-2' => 'Layout 2',
3785 'layout-3' => 'Layout 3'
3786 ]);
3787
3788 return $layouts;
3789 }
3790 }
3791