Show refund boxes on click
This commit is contained in:
parent
0b231f2e03
commit
e38dcf79bb
|
@ -310,7 +310,7 @@ jQuery( function ( $ ) {
|
|||
$( 'div.wc-order-refund-items' ).slideDown();
|
||||
$( 'div.wc-order-bulk-actions' ).slideUp();
|
||||
$( 'div.wc-order-totals-items' ).slideUp();
|
||||
$( '.wc-order-item-refund-quantity' ).show();
|
||||
$( '#woocommerce-order-items .refund' ).show();
|
||||
$( '.wc-order-edit-line-item' ).hide();
|
||||
|
||||
return false;
|
||||
|
@ -319,7 +319,7 @@ jQuery( function ( $ ) {
|
|||
$( this ).closest( 'div.wc-order-data-row' ).slideUp();
|
||||
$( 'div.wc-order-bulk-actions' ).slideDown();
|
||||
$( 'div.wc-order-totals-items' ).slideDown();
|
||||
$( '.wc-order-item-refund-quantity' ).hide();
|
||||
$( '#woocommerce-order-items .refund' ).hide();
|
||||
$( '.wc-order-edit-line-item' ).show();
|
||||
|
||||
// Reload the items
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : ''; ?>" class="line_total wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
@ -52,7 +52,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -149,13 +149,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
<td class="quantity" width="1%">
|
||||
<div class="view">
|
||||
<?php echo ( isset( $item['qty'] ) ) ? esc_html( $item['qty'] ) : ''; ?> (X refunded)
|
||||
<?php echo ( isset( $item['qty'] ) ) ? esc_html( $item['qty'] ) : ''; ?>
|
||||
</div>
|
||||
<div class="edit" style="display: none;">
|
||||
<?php $item_qty = esc_attr( $item['qty'] ); ?>
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" autocomplete="off" name="order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" value="<?php echo $item_qty; ?>" data-qty="<?php echo $item_qty; ?>" size="4" class="quantity" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" max="<?php echo $item['qty']; ?>" autocomplete="off" name="refund_order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund_order_item_qty" />
|
||||
</div>
|
||||
</td>
|
||||
|
@ -181,7 +181,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<input type="text" name="line_subtotal[<?php echo absint( $item_id ); ?>]" value="<?php echo $item_subtotal; ?>" class="line_subtotal wc_input_price tips" data-tip="<?php _e( 'Before pre-tax discounts.', 'woocommerce' ); ?>" data-subtotal="<?php echo $item_subtotal; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
@ -221,7 +221,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<input type="text" name="line_subtotal_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" value="<?php echo $item_subtotal_tax; ?>" class="line_subtotal_tax wc_input_price tips" data-tip="<?php _e( 'Before pre-tax discounts.', 'woocommerce' ); ?>"data-subtotal_tax="<?php echo $item_subtotal_tax; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -55,7 +55,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="shipping_cost[<?php echo $item_id; ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $item['cost'] ) ) ? esc_attr( wc_format_localized_price( $item['cost'] ) ) : ''; ?>" class="line_total wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
@ -78,7 +78,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="shipping_taxes[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<div class="refund" style="display: none;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue