| 1 |
<?php |
| 2 |
include BETTER_PAYMENT_ADMIN_VIEWS_PATH . "/partials/campaign-vars.php"; |
| 3 |
?> |
| 4 |
<main class="better-payment better-payment-campaign"> |
| 5 |
<div class="better-payment_campaign-layout_2"> |
| 6 |
<section class="bp-donation_hero-section" id="bp-bgimage"> |
| 7 |
<div class="bp-hero_overlay"></div> |
| 8 |
<div class="bp-container"> |
| 9 |
<div class="bp-row bp-align_items-center"> |
| 10 |
<div class="bp-col_8 bp-col bp-col_100-active_900 "> |
| 11 |
<div class="bp-text_wrapper"> |
| 12 |
<?php if( $header_title_enable ): ?> |
| 13 |
<h1 class="bp-text_primary bp-hanken_font"> |
| 14 |
<?php echo esc_html( $header_title ); ?> |
| 15 |
</h1> |
| 16 |
<?php endif; ?> |
| 17 |
<?php if( $header_short_desc_enable ): ?> |
| 18 |
<p class="bp-text_xm bp-ibm_font"> |
| 19 |
<?php echo esc_html( $header_short_desc ); ?> |
| 20 |
</p> |
| 21 |
<?php endif; ?> |
| 22 |
<div class="bp-flex"> |
| 23 |
<a <?php echo $this->print_render_attribute_string( 'better_payment_campaign_form_button_link' ); ?> class="btn-2 bp-donate_btn bp-inter_font"> |
| 24 |
<span><?php esc_html_e( $button_text, 'better-payment' ); ?></span> |
| 25 |
<span> |
| 26 |
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" |
| 27 |
xmlns="http://www.w3.org/2000/svg"> |
| 28 |
<path d="M1.5 10.5L10.5 1.5M10.5 1.5H3.75M10.5 1.5V8.25" stroke="#344054" |
| 29 |
stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" /> |
| 30 |
</svg> |
| 31 |
</span> |
| 32 |
</a> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<div class="bp-col_4 bp-col bp-col_100-active_900 "> |
| 37 |
<div class="bp-progress_bar-card"> |
| 38 |
<?php if( !empty( $form_sub_title_text ) ): ?> |
| 39 |
<span class="card-tag bp-ibm_font"> |
| 40 |
<?php echo esc_html( $form_sub_title_text ); ?> |
| 41 |
</span> |
| 42 |
<?php endif; ?> |
| 43 |
|
| 44 |
<?php if( !empty( $form_title_text ) ): ?> |
| 45 |
<h3 class="card-header bp-text_xl bp-ibm_font"> |
| 46 |
<?php echo esc_html( $form_title_text ); ?> |
| 47 |
</h3> |
| 48 |
<?php endif; ?> |
| 49 |
<form> |
| 50 |
<?php if ( method_exists( $widgetObj, 'render_campaign_hidden_fields' ) ) { |
| 51 |
echo $widgetObj->render_campaign_hidden_fields( $settings ); |
| 52 |
}?> |
| 53 |
<?php if( $form_goal_bar_line_enable ): ?> |
| 54 |
<progress id="bpProgressBar" class="bp-progress_bar" value="<?php echo esc_attr( $bpc_goal_percentage ); ?>" max="100"><?php echo esc_html( $bpc_goal_percentage ); ?>%</progress> |
| 55 |
<?php endif; ?> |
| 56 |
|
| 57 |
<?php if( $form_total_donation_enable ): ?> |
| 58 |
<label for="bpProgressBar" class="bp-donations bp-flex bp-text_m bp-ibm_font "> |
| 59 |
<span> <?php echo esc_html( $bpc_total_payment_count );?> </span> <span> <?php echo esc_html( $form_total_donation_label );?> </span> |
| 60 |
</label> |
| 61 |
<?php endif; ?> |
| 62 |
<div class="bp-flex bp-justify_content-space_between bp-align_items-center"> |
| 63 |
<?php if( $form_goal_amount_raised_enable ): ?> |
| 64 |
<label for="bpProgressBar" class="bp-flex bp-text_m bp-ibm_font " style="gap: 3px;"> |
| 65 |
<span><?php echo esc_html( $better_payment_campaign_currency_symbol ); ?><?php echo esc_html( $bpc_total_amount_raised );?></span> <span><?php echo esc_html( $form_goal_amount_raised_label );?></span> |
| 66 |
</label> |
| 67 |
<?php endif; ?> |
| 68 |
|
| 69 |
<!-- <a href="#" |
| 70 |
class="card-raised_btn bp-flex bp-align_items-center bp-justify_content-center"> |
| 71 |
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" |
| 72 |
xmlns="http://www.w3.org/2000/svg"> |
| 73 |
<path d="M1 11L11 1M11 1H3.5M11 1V8.5" stroke="#1C274C" stroke-width="1.25" |
| 74 |
stroke-linecap="round" stroke-linejoin="round" /> |
| 75 |
</svg> |
| 76 |
</a> --> |
| 77 |
</div> |
| 78 |
</form> |
| 79 |
</div> |
| 80 |
|
| 81 |
<div class="bp-image_gallery-wrapper bp-d_none-ctive_900"> |
| 82 |
<div class="image-gallery bp-flex bp-justify_content-center"> |
| 83 |
<?php if( $header_image_one_enable ): ?> |
| 84 |
<div class="img-wrapper bp-position_reletive"> |
| 85 |
<div class="image_overlay"></div> |
| 86 |
<img src="<?php echo esc_url( $header_image_one_url ); ?>" alt="Image 1" class="gallery-img" data-bg="<?php echo esc_url( $header_image_one_url ); ?>" /> |
| 87 |
</div> |
| 88 |
<?php endif; ?> |
| 89 |
|
| 90 |
<?php if( $header_image_two_enable ): ?> |
| 91 |
<div class="img-wrapper bp-position_reletive"> |
| 92 |
<div class="image_overlay"></div> |
| 93 |
<img src="<?php echo esc_url( $header_image_two_url ); ?>" alt="Image 2" class="gallery-img" data-bg="<?php echo esc_url( $header_image_two_url ); ?>" /> |
| 94 |
</div> |
| 95 |
<?php endif; ?> |
| 96 |
|
| 97 |
<?php if( $header_image_three_enable ): ?> |
| 98 |
<div class="img-wrapper bp-position_reletive"> |
| 99 |
<div class="image_overlay"></div> |
| 100 |
<img src="<?php echo esc_url( $header_image_three_url ); ?>" alt="Image 3" class="gallery-img" data-bg="<?php echo esc_url( $header_image_three_url ); ?>" /> |
| 101 |
</div> |
| 102 |
<?php endif; ?> |
| 103 |
</div> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</section> |
| 109 |
|
| 110 |
<section class="bp-content_navigation-section"> |
| 111 |
<div class="bp-container"> |
| 112 |
<!-- Tab navigation --> |
| 113 |
<div class="bp-tab_navigation bp-flex"> |
| 114 |
<?php if( $overview_enable ): ?> |
| 115 |
<button class="bp-tab_button bp-text_xl bp-text_align-left bp-hanken_font bp-active" data-tab="overview"> |
| 116 |
<?php echo esc_html( $overview_title ); ?> |
| 117 |
</button> |
| 118 |
<?php endif; ?> |
| 119 |
<?php if( ( ! $this->pro_enabled && $is_edit_mode ) ): ?> |
| 120 |
<button class="bp-tab_button bp-text_xl bp-hanken_font " data-tab="comment">Comment</button> |
| 121 |
<button class="bp-tab_button bp-text_xl bp-hanken_font " data-tab="update">Update</button> |
| 122 |
<?php endif; ?> |
| 123 |
<?php |
| 124 |
do_action('better_payment/widget/fundraising-campaign/tab_navigation', $settings); |
| 125 |
?> |
| 126 |
</div> |
| 127 |
|
| 128 |
<!-- Tab content --> |
| 129 |
<div class="bp-tab_content"> |
| 130 |
<div class="bp-tab_pane bp-active " id="overview"> |
| 131 |
<div class="bp-row"> |
| 132 |
<?php if( $layout_overview_enable ): ?> |
| 133 |
<div class="bp-col bp-col_8 bp-col_100-active_900"> |
| 134 |
<div class="bp-overviow_text-wrapper"> |
| 135 |
<p class="bp-text_secondary bp-inter_font bp-overview_text"> |
| 136 |
<?php echo esc_html( $overview_desc_one ); ?> |
| 137 |
</p> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
<?php endif; ?> |
| 141 |
</div> |
| 142 |
</div> |
| 143 |
<?php |
| 144 |
do_action('better_payment/widget/fundraising-campaign/comment_tab_content', $settings); |
| 145 |
?> |
| 146 |
<?php if( $is_edit_mode && ! $this->pro_enabled ): ?> |
| 147 |
<div class="bp-tab_pane" id="comment"> |
| 148 |
<a href="https://betterpayment.io/pricing" target="_blank" class="bp-upgrade_pro"> |
| 149 |
<img class="bp-pro-banner" src="<?php echo esc_url( BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/comingsoon.webp' ); ?>" alt="coming-soon"> |
| 150 |
</a> |
| 151 |
</div> |
| 152 |
<?php endif; ?> |
| 153 |
<?php |
| 154 |
do_action('better_payment/widget/fundraising-campaign/update_tab_content', $settings); |
| 155 |
?> |
| 156 |
<?php if( $is_edit_mode && ! $this->pro_enabled ): ?> |
| 157 |
<div class="bp-tab_pane" id="update"> |
| 158 |
<a href="https://betterpayment.io/pricing" target="_blank" class="bp-upgrade_pro"> |
| 159 |
<img class="bp-pro-banner" src="<?php echo esc_url( BETTER_PAYMENT_ASSETS . '/img/campaign/layout-1/update-pro.webp' ); ?>" alt="upgrade-to-pro"> |
| 160 |
</a> |
| 161 |
</div> |
| 162 |
<?php endif; ?> |
| 163 |
</div> |
| 164 |
</div> |
| 165 |
</section> |
| 166 |
|
| 167 |
<?php if( $related_campaign_enable && count( $related_campaigns ) > 0 ): ?> |
| 168 |
<section class="bp-donate_section"> |
| 169 |
<div class="bp-container"> |
| 170 |
<div class="bp-donate_section-wrapper"> |
| 171 |
<div class="bp-section_top-wrapper"> |
| 172 |
<div class="bp-row"> |
| 173 |
<div class="bp-col bp-col_7 bp-col_100-active_900"> |
| 174 |
<div class="bp-text_wrapper"> |
| 175 |
<h2 class="bp-hanken_font bp-donate_section-header"> |
| 176 |
<?php echo esc_html( $related_campaigns[0]['title'] ); ?> |
| 177 |
</h2> |
| 178 |
<p class="bp-text_xm bp-ibm_font bp-donate_section-sub_header"> |
| 179 |
<?php echo esc_html( $related_campaigns[0]['description'] ); ?> |
| 180 |
</p> |
| 181 |
<div class="bp-flex"> |
| 182 |
<a href="<?php echo esc_url( $related_campaigns[0]['page_url'] ); ?>" target="_blank" class="btn-2 bp-donate_btn bp-inter_font"> |
| 183 |
<span><?php esc_html_e( $button_text, 'better-payment' ); ?></span> |
| 184 |
<span> |
| 185 |
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" |
| 186 |
xmlns="http://www.w3.org/2000/svg"> |
| 187 |
<path d="M1.5 10.5L10.5 1.5M10.5 1.5H3.75M10.5 1.5V8.25" |
| 188 |
stroke="#344054" stroke-width="1.4" stroke-linecap="round" |
| 189 |
stroke-linejoin="round" /> |
| 190 |
</svg> |
| 191 |
|
| 192 |
</span> |
| 193 |
</a> |
| 194 |
</div> |
| 195 |
</div> |
| 196 |
</div> |
| 197 |
<div class="bp-col bp-col_5 bp-col_100-active_900"> |
| 198 |
<div class="img-wrapper"> |
| 199 |
<img src="<?php echo esc_url( $related_campaigns[0]['image'] ); ?>" alt="image 246.png" /> |
| 200 |
</div> |
| 201 |
</div> |
| 202 |
</div> |
| 203 |
</div> |
| 204 |
<?php if( count( $related_campaigns ) > 1 ): ?> |
| 205 |
<div class="bp-section-footer bp-section_bottom-wrapper"> |
| 206 |
<h3 class="bp-hanken_font bp-text_xxl bottom-wrapper_header"><?php echo esc_html( $related_campaign_sub_title ); ?></h3> |
| 207 |
<div class="bp-row"> |
| 208 |
<?php |
| 209 |
$i = 0; |
| 210 |
foreach( $related_campaigns as $related_campaign ): |
| 211 |
if( $i === 0 ) { |
| 212 |
$i++; |
| 213 |
continue; |
| 214 |
} |
| 215 |
?> |
| 216 |
<div class="bp-col bp-col_4 bp-col_100-active_700"> |
| 217 |
<div class="card-wrapper bp-flex"> |
| 218 |
<div class="card-img_box bp-line_height-0"> |
| 219 |
<img src="<?php echo esc_url( $related_campaign['image'] ); ?>" alt=""> |
| 220 |
</div> |
| 221 |
<div class="card-text_box"> |
| 222 |
<h5 class="bp-hanken_font card-header"> |
| 223 |
<?php echo esc_html( $related_campaign['title'] ); ?> |
| 224 |
</h5> |
| 225 |
|
| 226 |
<div class="bp-flex bp-justify_content-space_between bp-align_items-center"> |
| 227 |
<span class="bp-ibm_font bp-text_m"><?php echo esc_html( $related_campaign['currency_symbol'] ); ?><?php echo esc_html( $related_campaign['raised_amount'] );?> raised</span> |
| 228 |
<a href="<?php echo esc_url( $related_campaign['page_url'] ); ?>" target="_blank" class="card-btn"> |
| 229 |
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" |
| 230 |
xmlns="http://www.w3.org/2000/svg"> |
| 231 |
<path |
| 232 |
d="M0.664062 7.33268L7.33073 0.666016M7.33073 0.666016H2.33073M7.33073 0.666016V5.66602" |
| 233 |
stroke="#48506D" stroke-width="0.833333" stroke-linecap="round" |
| 234 |
stroke-linejoin="round" /> |
| 235 |
</svg> |
| 236 |
</a> |
| 237 |
</div> |
| 238 |
</div> |
| 239 |
</div> |
| 240 |
</div> |
| 241 |
<?php endforeach; ?> |
| 242 |
</div> |
| 243 |
</div> |
| 244 |
<?php endif; ?> |
| 245 |
</div> |
| 246 |
</div> |
| 247 |
</section> |
| 248 |
<?php endif; ?> |
| 249 |
</div> |
| 250 |
</main> |