← All changes
|
inc/admin/views/meta-boxes/order/exports-invoice.php
+95
-95
4.3.9
→
4.4.10
View file →
| @@ -1,95 +1,95 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Admin View: Order invoice export pdf Meta box | |
| 4 | - * | |
| 5 | - * @author hungkv | |
| 6 | - * @since 3.2.7.8 | |
| 7 | - * @version 1.0.1 | |
| 8 | - */ | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * Prevent loading this file directly | |
| 12 | - */ | |
| 13 | -defined( 'ABSPATH' ) || exit(); | |
| 14 | -if ( ! isset( $order ) ) { | |
| 15 | - return; | |
| 16 | -} | |
| 17 | - | |
| 18 | -$currency_symbol = learn_press_get_currency_symbol( $order->get_currency() ); | |
| 19 | -?> | |
| 20 | - | |
| 21 | -<?php global $post; ?> | |
| 22 | - | |
| 23 | -<div class="submitbox" id="order-export"> | |
| 24 | - <div id="order-export__section"> | |
| 25 | - <div id="editor"></div> | |
| 26 | - <button data-id="<?php echo esc_attr( $order->get_id() ); ?>" type="button" class="button" id="order-export__button"><?php echo esc_html__( 'PDF Invoice', 'learnpress' ); ?></button> | |
| 27 | - </div> | |
| 28 | -</div> | |
| 29 | - | |
| 30 | -<!-- The Modal --> | |
| 31 | -<div id="myModal" class="modal export-modal" style="display:none;"> | |
| 32 | - | |
| 33 | - <!-- Modal content --> | |
| 34 | - <div class="modal-content"> | |
| 35 | - <span class="close">×</span> | |
| 36 | - | |
| 37 | - <!-- Tab links --> | |
| 38 | - <div class="tabs" id="order-export__tabs"> | |
| 39 | - <div class="preview-tab tab active" data-target="pdf-preview"><?php echo esc_html__( 'PDF Preview', 'learnpress' ); ?></div> | |
| 40 | - <div class="options-tab tab" data-target="export-options"><?php echo esc_html__( 'Export Options', 'learnpress' ); ?></div> | |
| 41 | - </div> | |
| 42 | - <div id="panels"> | |
| 43 | - <div class="pdf-preview panel active"> | |
| 44 | - <!--Start print invoice--> | |
| 45 | - <div id="lp-invoice"> | |
| 46 | - <div id="lp-invoice__content"> | |
| 47 | - <?php | |
| 48 | - learn_press_admin_view( | |
| 49 | - 'meta-boxes/order/content-tab-preview-exports-invoice.php', | |
| 50 | - array( | |
| 51 | - 'order' => $order, | |
| 52 | - 'currency_symbol' => $currency_symbol, | |
| 53 | - ) | |
| 54 | - ); | |
| 55 | - ?> | |
| 56 | - </div> | |
| 57 | - <div id="lp-invoice__actions"> | |
| 58 | - <button type="button" | |
| 59 | - id="lp-invoice__export"><?php echo esc_html__( 'Export to pdf', 'learnpress' ); ?></button> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - <!--End print invoice--> | |
| 63 | - </div> | |
| 64 | - <div class="export-options panel"> | |
| 65 | - <div class="export-options__content"> | |
| 66 | - <h4>Please select the fields you want to display</h4> | |
| 67 | - <div class="export-options__select"> | |
| 68 | - <input type="checkbox" name="invoice-title" value="" checked="checked"> | |
| 69 | - <label for="order_date"> <?php echo esc_html__( 'Site Title', 'learnpress' ); ?></label><br> | |
| 70 | - <input type="checkbox" name="invoice-date" value="" checked="checked"> | |
| 71 | - <label for="order_date"> <?php echo esc_html__( 'Order Date', 'learnpress' ); ?></label><br> | |
| 72 | - <input type="checkbox" name="invoice-no" value="" checked="checked"> | |
| 73 | - <label for="order_date"> <?php echo esc_html__( 'Invoice No.', 'learnpress' ); ?></label><br> | |
| 74 | - <input type="checkbox" name="invoice-customer" value="" checked="checked"> | |
| 75 | - <label for="order_date"> <?php echo esc_html__( 'Customer', 'learnpress' ); ?></label><br> | |
| 76 | - <input type="checkbox" name="invoice-email" value="" checked="checked"> | |
| 77 | - <label for="order_date"> <?php echo esc_html__( 'Email', 'learnpress' ); ?></label><br> | |
| 78 | - <input type="checkbox" name="invoice-method" value="" checked="checked"> | |
| 79 | - <label for="order_payment"> <?php echo esc_html__( 'Payment Medthod', 'learnpress' ); ?></label> | |
| 80 | - </div> | |
| 81 | - <div class="export-options__loading"> | |
| 82 | - <div class="spinner"></div> | |
| 83 | - </div> | |
| 84 | - </div> | |
| 85 | - <div class="export-options__actions"> | |
| 86 | - <button type="button" data-id="<?php echo esc_attr( $order->get_id() ); ?>" | |
| 87 | - id="lp-invoice__update"><?php echo esc_html__( 'Update', 'learnpress' ); ?></button> | |
| 88 | - </div> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - | |
| 92 | - <!--End print invoice--> | |
| 93 | - </div> | |
| 94 | - | |
| 95 | -</div> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Admin View: Order invoice export pdf Meta box | |
| 4 | + * | |
| 5 | + * @author hungkv | |
| 6 | + * @since 3.2.7.8 | |
| 7 | + * @version 1.0.1 | |
| 8 | + */ | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * Prevent loading this file directly | |
| 12 | + */ | |
| 13 | +defined( 'ABSPATH' ) || exit(); | |
| 14 | +if ( ! isset( $order ) ) { | |
| 15 | + return; | |
| 16 | +} | |
| 17 | + | |
| 18 | +$currency_symbol = learn_press_get_currency_symbol( $order->get_currency() ); | |
| 19 | +?> | |
| 20 | + | |
| 21 | +<?php global $post; ?> | |
| 22 | + | |
| 23 | +<div class="submitbox" id="order-export"> | |
| 24 | + <div id="order-export__section"> | |
| 25 | + <div id="editor"></div> | |
| 26 | + <button data-id="<?php echo esc_attr( $order->get_id() ); ?>" type="button" class="button" id="order-export__button"><?php echo esc_html__( 'PDF Invoice', 'learnpress' ); ?></button> | |
| 27 | + </div> | |
| 28 | +</div> | |
| 29 | + | |
| 30 | +<!-- The Modal --> | |
| 31 | +<div id="myModal" class="modal export-modal" style="display:none;"> | |
| 32 | + | |
| 33 | + <!-- Modal content --> | |
| 34 | + <div class="modal-content"> | |
| 35 | + <span class="close">×</span> | |
| 36 | + | |
| 37 | + <!-- Tab links --> | |
| 38 | + <div class="tabs" id="order-export__tabs"> | |
| 39 | + <div class="preview-tab tab active" data-target="pdf-preview"><?php echo esc_html__( 'PDF Preview', 'learnpress' ); ?></div> | |
| 40 | + <div class="options-tab tab" data-target="export-options"><?php echo esc_html__( 'Export Options', 'learnpress' ); ?></div> | |
| 41 | + </div> | |
| 42 | + <div id="panels"> | |
| 43 | + <div class="pdf-preview panel active"> | |
| 44 | + <!--Start print invoice--> | |
| 45 | + <div id="lp-invoice"> | |
| 46 | + <div id="lp-invoice__content"> | |
| 47 | + <?php | |
| 48 | + learn_press_admin_view( | |
| 49 | + 'meta-boxes/order/content-tab-preview-exports-invoice.php', | |
| 50 | + array( | |
| 51 | + 'order' => $order, | |
| 52 | + 'currency_symbol' => $currency_symbol, | |
| 53 | + ) | |
| 54 | + ); | |
| 55 | + ?> | |
| 56 | + </div> | |
| 57 | + <div id="lp-invoice__actions"> | |
| 58 | + <button type="button" | |
| 59 | + id="lp-invoice__export"><?php echo esc_html__( 'Export to pdf', 'learnpress' ); ?></button> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + <!--End print invoice--> | |
| 63 | + </div> | |
| 64 | + <div class="export-options panel"> | |
| 65 | + <div class="export-options__content"> | |
| 66 | + <h4>Please select the fields you want to display</h4> | |
| 67 | + <div class="export-options__select"> | |
| 68 | + <input type="checkbox" name="invoice-title" value="" checked="checked"> | |
| 69 | + <label for="order_date"> <?php echo esc_html__( 'Site Title', 'learnpress' ); ?></label><br> | |
| 70 | + <input type="checkbox" name="invoice-date" value="" checked="checked"> | |
| 71 | + <label for="order_date"> <?php echo esc_html__( 'Order Date', 'learnpress' ); ?></label><br> | |
| 72 | + <input type="checkbox" name="invoice-no" value="" checked="checked"> | |
| 73 | + <label for="order_date"> <?php echo esc_html__( 'Invoice No.', 'learnpress' ); ?></label><br> | |
| 74 | + <input type="checkbox" name="invoice-customer" value="" checked="checked"> | |
| 75 | + <label for="order_date"> <?php echo esc_html__( 'Customer', 'learnpress' ); ?></label><br> | |
| 76 | + <input type="checkbox" name="invoice-email" value="" checked="checked"> | |
| 77 | + <label for="order_date"> <?php echo esc_html__( 'Email', 'learnpress' ); ?></label><br> | |
| 78 | + <input type="checkbox" name="invoice-method" value="" checked="checked"> | |
| 79 | + <label for="order_payment"> <?php echo esc_html__( 'Payment Medthod', 'learnpress' ); ?></label> | |
| 80 | + </div> | |
| 81 | + <div class="export-options__loading"> | |
| 82 | + <div class="spinner"></div> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + <div class="export-options__actions"> | |
| 86 | + <button type="button" data-id="<?php echo esc_attr( $order->get_id() ); ?>" | |
| 87 | + id="lp-invoice__update"><?php echo esc_html__( 'Update', 'learnpress' ); ?></button> | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + | |
| 92 | + <!--End print invoice--> | |
| 93 | + </div> | |
| 94 | + | |
| 95 | +</div> | |