payment_form
1 year ago
edit_data.php
4 months ago
email_form.php
4 days ago
new_form.php
4 months ago
payment_form.php
1 year ago
summary_before_payment.php
1 year ago
view.php
1 year ago
view_by_key.php
1 year ago
email_form.php
48 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Copyright (c) 2023 LatePoint LLC. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /* @var $invoice OsInvoiceModel */ |
| 7 | /* @var $errors array */ |
| 8 | /* @var $success string */ |
| 9 | /* @var $to string */ |
| 10 | /* @var $subject string */ |
| 11 | /* @var $content string */ |
| 12 | |
| 13 | |
| 14 | ?> |
| 15 | <form action="" data-os-action="<?php echo OsRouterHelper::build_route_name('invoices', 'email_form'); ?>" class="invoice-email-form latepoint-lightbox-inner-form" data-os-after-call="latepointInvoicesAdminFeature.init_email_invoice_form" data-os-output-target=".invoice-email-form"> |
| 16 | <div class="latepoint-lightbox-heading"> |
| 17 | <h2><?php echo esc_html__('Email Invoice', 'latepoint'); ?></h2> |
| 18 | <a href="#" class="latepoint-lightbox-close" tabindex="0"><i class="latepoint-icon latepoint-icon-x"></i></a> |
| 19 | </div> |
| 20 | <div class="latepoint-lightbox-content"> |
| 21 | <?php |
| 22 | |
| 23 | // Output errors if any |
| 24 | if (!empty($errors)){ |
| 25 | echo '<div class="latepoint-message latepoint-message-error">'; |
| 26 | foreach($errors as $error){ |
| 27 | echo '<div>'.$error.'</div>'; |
| 28 | } |
| 29 | echo '</div>'; |
| 30 | } |
| 31 | if (!empty($success)){ |
| 32 | echo '<div class="latepoint-message latepoint-message-success">'.$success.'</div>'; |
| 33 | }else{ |
| 34 | ?> |
| 35 | <?php |
| 36 | echo '<div class="latepoint-message latepoint-message-subtle">' . __( 'You can customize subject and content of the email in general settings', 'latepoint' ). '</div>'; |
| 37 | echo OsFormHelper::text_field('invoice_email[to]', __('Email to:', 'latepoint'), $to, ['theme' => 'simple']); |
| 38 | echo OsFormHelper::hidden_field('invoice_id', $invoice->id); |
| 39 | wp_nonce_field( 'email_invoice_' . $invoice->id, '_wpnonce', false ); |
| 40 | } |
| 41 | ?> |
| 42 | </div> |
| 43 | <?php if(empty($success)){ ?> |
| 44 | <div class="latepoint-lightbox-footer"> |
| 45 | <button type="submit" class="latepoint-btn latepoint-btn-primary latepoint-btn-position-end "><?php esc_html_e('Send', 'latepoint'); ?></button> |
| 46 | </div> |
| 47 | <?php } ?> |
| 48 | </form> |