Skip to content

Commit

Permalink
Add editable fields for Proforma and Credit Note
Browse files Browse the repository at this point in the history
  • Loading branch information
Terminator Barbapapa authored and Terminator Barbapapa committed Jul 25, 2017
1 parent 47203f1 commit 32580c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
14 changes: 5 additions & 9 deletions assets/css/order-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@
display:none;
}

#set-invoice-date-number {
margin:15px 0px!important;
}
/* Edit buttons Invoice, Proforma and Credit */

#edit-invoice-date-number {
.wpo-wcpdf-edit-date-number {
margin-left:20px!important;
}

#edit-invoice-date-number {
opacity:0.5;
}
#edit-invoice-date-number:hover {

.wpo-wcpdf-edit-date-number:hover {
opacity:1;
cursor:pointer;
}
}
2 changes: 1 addition & 1 deletion assets/js/order-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jQuery(document).ready(function($) {
$('#wpo_wcpdf-data-input-box').insertAfter('#woocommerce-order-data');

// enable invoice number edit if user initiated
$( "#set-invoice-date-number, #edit-invoice-date-number" ).click(function() {
$( ".wpo-wcpdf-edit-date-number" ).click(function() {
$form = $(this).closest('.wcpdf-data-fields');
$form.find(".read-only").hide();
$form.find(".editable").show();
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wcpdf-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function data_input_box_content ( $post ) {
$invoice_date = $invoice->get_date();
?>
<div class="wcpdf-data-fields">
<h4><?php _e( 'Invoice', 'woocommerce-pdf-invoices-packing-slips' ) ?><?php if ($invoice->exists()) : ?><span id="edit-invoice-date-number" class="dashicons dashicons-edit"></span><?php endif; ?></h4>
<h4><?php _e( 'Invoice', 'woocommerce-pdf-invoices-packing-slips' ) ?><?php if ($invoice->exists()) : ?><span id="" class="wpo-wcpdf-edit-date-number dashicons dashicons-edit"></span><?php endif; ?></h4>

<!-- Read only -->
<div class="read-only">
Expand Down

0 comments on commit 32580c6

Please sign in to comment.