| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') or die; |
| 4 |
|
| 5 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables in view files |
| 6 |
/** @var Array $subscriptions */ |
| 7 |
/** @var Array $config */ |
| 8 |
?> |
| 9 |
<div class="ff_subscriptions"> |
| 10 |
<?php |
| 11 |
foreach ($subscriptions as $subscription): ?> |
| 12 |
<div class="ff_subscription"> |
| 13 |
<div class="ff_subscription_header"> |
| 14 |
<div class="ff_pay_info"> |
| 15 |
<div class="ff_form_name"><span class="ff_sub_id">#<?php echo esc_html($subscription->id); ?></span> <?php echo fluentform_sanitize_html($subscription->title); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div> |
| 16 |
<div class="ff_sub_name"><?php echo esc_html($subscription->plan_name); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 17 |
<span class="ff_sub_input_name">(<?php echo fluentform_sanitize_html($subscription->item_name); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>)</span> |
| 18 |
</div> |
| 19 |
<div class="head_payment_amount"> |
| 20 |
<span class="pay_amount"><?php echo fluentform_sanitize_html($subscription->formatted_recurring_amount); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted amount contains decoded currency symbols ?></span> |
| 21 |
<span>/<?php echo esc_html($subscription->billing_interval); ?></span> |
| 22 |
<span class="ff_pay_status_badge ff_pay_status_<?php echo esc_attr($subscription->status); ?>"> |
| 23 |
<?php echo esc_html($subscription->status); ?> |
| 24 |
</span> |
| 25 |
<?php if ($subscription->billing_text): ?> |
| 26 |
<p class="ff_billing_text"><?php echo fluentform_sanitize_html($subscription->billing_text); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> |
| 27 |
<?php endif; ?> |
| 28 |
</div> |
| 29 |
</div> |
| 30 |
<div class="ff_plan_info"> |
| 31 |
<p class="ff_billing_dates"> |
| 32 |
<span class="ff_sub_start"><?php esc_html_e('Started:', 'fluentform') ?> <?php echo esc_html($subscription->starting_date_formated); ?></span> |
| 33 |
</p> |
| 34 |
<div class="ff_payment_count_btn"> |
| 35 |
<button data-subscription_id="<?php echo esc_attr($subscription->id); ?>" class="ff_show_payments"><?php esc_html_e('View Payments', 'fluentform'); ?> |
| 36 |
</button> |
| 37 |
<?php if($subscription->can_cancel): ?> |
| 38 |
<button data-submission_id="<?php echo esc_attr($subscription->submission_id); ?>" data-subscription_id="<?php echo esc_attr($subscription->id); ?>" class="ff_cancel_subscription"><?php esc_html_e('Cancel', 'fluentform'); ?> |
| 39 |
</button> |
| 40 |
<?php endif; ?> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<?php if($subscription->can_cancel): ?> |
| 45 |
<div style="display: none;" class="ff_sub_cancel_confirmation"> |
| 46 |
<h4><?php echo esc_html($config['sub_cancel_confirm_heading']); ?></h4> |
| 47 |
<div class="sub_cancel_btns"> |
| 48 |
<button class="ff_confirm_subscription_cancel"><?php echo esc_html($config['sub_cancel_confirm_btn']); ?></button> |
| 49 |
<button class="ff_cancel_close"><?php echo esc_html($config['sub_cancel_close']); ?></button> |
| 50 |
<p class="ff_sub_message_notices"></p> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
<?php endif; ?> |
| 54 |
<div class="ff_subscription_payments"></div> |
| 55 |
</div> |
| 56 |
<?php endforeach; ?> |
| 57 |
</div> |
| 58 |
|