PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.4.0
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.4.0
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.0, at includes/Admin/Elementor/Fundraising_Campaign_Widget.php

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