payment_form
1 year ago
edit_data.php
4 months ago
email_form.php
1 year 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
edit_data.php
57 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-output-target=".invoice-document-wrapper" data-os-action="<?php echo OsRouterHelper::build_route_name('invoices', 'process_data_update'); ?>" class="invoice-data-form latepoint-lightbox-inner-form" data-os-pass-response="yes" data-os-after-call="latepointInvoicesAdminFeature.init_invoice_data_updated"> |
| 16 | <div class="latepoint-lightbox-heading"> |
| 17 | <h2><?php echo esc_html__('Edit Invoice Data', '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 | ?> |
| 32 | <div class="os-row"> |
| 33 | <div class="os-col-lg-4"> |
| 34 | <?php echo OsFormHelper::select_field( 'invoice[status]', __( 'Status', 'latepoint' ), OsInvoicesHelper::list_of_statuses_for_select(), $invoice->status, ['theme' => 'simple', 'class' => 'size-small'] ); ?> |
| 35 | </div> |
| 36 | <div class="os-col-lg-4"> |
| 37 | <?php echo OsFormHelper::money_field('invoice[charge_amount]', __('Amount Due', 'latepoint'), $invoice->charge_amount, ['theme' => 'simple', 'class' => 'size-small']); ?> |
| 38 | </div> |
| 39 | <div class="os-col-lg-4"> |
| 40 | <div class="os-form-group os-form-select-group os-form-group-simple"> |
| 41 | <label for=""><?php esc_html_e('Due At', 'latepoint'); ?></label> |
| 42 | <?php echo OsFormHelper::date_picker_field( 'invoice[due_at]', OsTimeHelper::get_readable_date_from_string( OsTimeHelper::date_from_db($invoice->due_at, 'Y-m-d') ), OsTimeHelper::date_from_db($invoice->due_at, 'Y-m-d', OsTimeHelper::get_wp_timezone_name()), [ 'class' => 'size-small', 'theme' => 'simple' ]); ?> |
| 43 | </div> |
| 44 | </div> |
| 45 | </div> |
| 46 | <?php |
| 47 | echo OsFormHelper::hidden_field('invoice_id', $invoice->id); |
| 48 | // Add protection nonce. |
| 49 | wp_nonce_field( 'update_invoice_' . $invoice->id, '_wpnonce', false ); |
| 50 | ?> |
| 51 | </div> |
| 52 | <?php if(empty($success)){ ?> |
| 53 | <div class="latepoint-lightbox-footer"> |
| 54 | <button type="submit" class="latepoint-btn latepoint-btn-primary latepoint-btn-position-end "><?php esc_html_e('Update', 'latepoint'); ?></button> |
| 55 | </div> |
| 56 | <?php } ?> |
| 57 | </form> |