| 1 |
<?php |
| 2 |
/* |
| 3 |
* @var $booking \FluentBooking\App\Models\Booking |
| 4 |
*/ |
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
?> |
| 7 |
|
| 8 |
<div class="fcal_confirmation"> |
| 9 |
<?php do_action('fluent_booking/booking_details_header', $booking); ?> |
| 10 |
<div class="fcal_confirm_header"> |
| 11 |
<div class="fcal_check_holder"> |
| 12 |
<?php if ($confirm_icon): ?> |
| 13 |
<img style="max-width: 44px;" src="<?php echo $confirm_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>" /> |
| 14 |
<?php else: ?> |
| 15 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar text-emphasis h-5 w-5"><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width="18" height="18" x="3" y="4" rx="2"></rect><path d="M3 10h18"></path></svg> |
| 16 |
<?php endif; ?> |
| 17 |
</div> |
| 18 |
<h2><?php echo esc_html($title); ?></h2> |
| 19 |
<p><?php echo wp_kses_post($sub_heading); ?></p> |
| 20 |
</div> |
| 21 |
<div class="fcal_confirm_body"> |
| 22 |
<?php foreach ($sections as $section): ?> |
| 23 |
<div class="fcal_confirm_section"> |
| 24 |
<div class="fcal_confirm_section_title"> |
| 25 |
<h4><?php echo esc_html($section['title']); ?></h4> |
| 26 |
</div> |
| 27 |
<?php foreach ((array)$section['content'] as $content) : ?> |
| 28 |
<div class="fcal_confirm_section_content"> |
| 29 |
<?php echo wp_kses_post($content); ?> |
| 30 |
</div> |
| 31 |
<?php endforeach; ?> |
| 32 |
</div> |
| 33 |
<?php endforeach; ?> |
| 34 |
|
| 35 |
<?php if($extra_html): ?> |
| 36 |
<hr /> |
| 37 |
<div class="fcal_payment_html"> |
| 38 |
<h3 style="margin-bottom: 10px;"><?php esc_html_e('Payment Details', 'fluent-booking'); ?></h3> |
| 39 |
<?php echo $extra_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 40 |
</div> |
| 41 |
<style> |
| 42 |
.fluent_booking_payment_receipt { |
| 43 |
background: transparent !important; |
| 44 |
padding: 0 !important; |
| 45 |
} |
| 46 |
.fcal_payment_html h4 { |
| 47 |
margin: 10px 0; |
| 48 |
} |
| 49 |
</style> |
| 50 |
<?php endif; ?> |
| 51 |
|
| 52 |
<?php if ($action_type == 'cancel'): ?> |
| 53 |
<div class="fcal_booking_manage fcal_cancellation_wrap fcal_action_<?php echo esc_attr($action_type); ?>"> |
| 54 |
<form id="fcal_cancellation_form" action="<?php echo esc_url($action_url); ?>" method="POST" class="fcal_form_cancellation"> |
| 55 |
<label for="cancellation_reason"> |
| 56 |
<?php echo esc_html($cancel_field['label'])?> |
| 57 |
<?php if ($cancel_field['required']) : ?> |
| 58 |
<span class="required">*</span> |
| 59 |
<?php endif; ?> |
| 60 |
</label> |
| 61 |
<div class="fcal_form_field"> |
| 62 |
<textarea placeholder="<?php echo esc_attr($cancel_field['placeholder']); ?>" |
| 63 |
name="cancellation_reason" id="cancellation_reason" rows="3"></textarea> |
| 64 |
<?php if ($cancel_field['help_text']) : ?> |
| 65 |
<p class="fcal_help_text"><?php echo esc_html($cancel_field['help_text']) ?></p> |
| 66 |
<?php endif; ?> |
| 67 |
</div> |
| 68 |
<div class="fcal_form_actions"> |
| 69 |
<a href="<?php echo esc_url($booking->getConfirmationUrl()); ?>" |
| 70 |
class="fcal_btn fcal_btn_secondary"><?php esc_html_e('Nevermind', 'fluent-booking'); ?></a> |
| 71 |
<button class="fcal_btn fcal_btn_primary fcal_cancel_btn" |
| 72 |
type="submit"><?php esc_html_e('Cancel Booking', 'fluent-booking'); ?></button> |
| 73 |
</div> |
| 74 |
</form> |
| 75 |
</div> |
| 76 |
<?php else: ?> |
| 77 |
<?php if ($booking->canCancel() || $booking->canReschedule()): ?> |
| 78 |
<div class="fcal_booking_manage fcal_normal_booking_footer"> |
| 79 |
<?php esc_html_e('Need to make a change?', 'fluent-booking') ?> |
| 80 |
<?php if ($booking->canCancel()): ?> |
| 81 |
<a href="<?php echo esc_url($booking->getCancelUrl()); ?>"><?php esc_html_e('Cancel', 'fluent-booking') ?></a> |
| 82 |
<?php endif; ?> |
| 83 |
<?php ($booking->canCancel() && $booking->canReschedule()) ? esc_html_e('or', 'fluent-booking') : ''; ?> |
| 84 |
<?php if ($booking->canReschedule()): ?> |
| 85 |
<a href="<?php echo esc_url($booking->getRescheduleUrl()); ?>"><?php esc_html_e('Reschedule', 'fluent-booking'); ?></a> |
| 86 |
<?php endif; ?> |
| 87 |
</div> |
| 88 |
<?php endif; ?> |
| 89 |
<?php endif; ?> |
| 90 |
|
| 91 |
<?php if ($bookmarks): ?> |
| 92 |
<div class="fcal_booking_manage fcal_to_calendars"> |
| 93 |
<span><?php esc_html_e('Add to calendar', 'fluent-booking'); ?></span> |
| 94 |
<div class="fcal_cal_items"> |
| 95 |
<?php foreach ($bookmarks as $bookmark): ?> |
| 96 |
<div title="<?php echo esc_attr($bookmark['title']); ?>"> |
| 97 |
<a href="<?php echo esc_url($bookmark['url']); ?>" target="_blank" rel="noopener"> |
| 98 |
<img style="width: 20px; height: 20px;" src="<?php echo esc_url($bookmark['icon']); ?>" alt="<?php echo esc_attr($bookmark['title']); ?>"/> |
| 99 |
</a> |
| 100 |
</div> |
| 101 |
<?php endforeach; ?> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
<?php endif; ?> |
| 105 |
</div> |
| 106 |
<?php do_action('fluent_booking/booking_confirmation_footer', $booking); ?> |
| 107 |
</div> |
| 108 |
|