Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
form.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <form id="edit_form" class="order-invoice-edit" method="post" action="<?= /* @escapeNotVerified */ $block->getSaveUrl() ?>">
11  <?= $block->getBlockHtml('formkey') ?>
12  <?php $_order = $block->getInvoice()->getOrder() ?>
13  <?= $block->getChildHtml('order_info') ?>
14 
15  <section class="admin__page-section">
16  <div class="admin__page-section-title">
17  <span class="title"><?= /* @escapeNotVerified */ __('Payment &amp; Shipping Method') ?></span>
18  </div>
19  <div class="admin__page-section-content">
20  <div class="admin__page-section-item order-payment-method<?php if ($_order->getIsVirtual()): ?> order-payment-method-virtual<?php endif; ?>">
21  <div class="admin__page-section-item-title">
22  <span class="title"><?= /* @escapeNotVerified */ __('Payment Information') ?></span>
23  </div>
24  <div class="admin__page-section-item-content">
25  <div class="order-payment-method-title"><?= $block->getChildHtml('order_payment') ?></div>
26  <div class="order-payment-currency"><?= /* @escapeNotVerified */ __('The order was placed using %1.', $_order->getOrderCurrencyCode()) ?></div>
27  <div class="order-payment-additional"><?= $block->getChildHtml('order_payment_additional') ?></div>
28  </div>
29  </div>
30  <?php if (!$_order->getIsVirtual()): ?>
31  <div class="admin__page-section-item order-shipping-address">
32  <?php /*Shipping Address */ ?>
33  <div class="admin__page-section-item-title">
34  <span class="title"><?= /* @escapeNotVerified */ __('Shipping Information') ?></span>
35  </div>
36  <div class="admin__page-section-item-content">
37  <div class="shipping-description-wrapper">
38  <div class="shipping-description-title"><?= $block->escapeHtml($_order->getShippingDescription()) ?></div>
39  <div class="shipping-description-content">
40  <?= /* @escapeNotVerified */ __('Total Shipping Charges') ?>:
41 
42  <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()): ?>
43  <?php $_excl = $block->displayShippingPriceInclTax($_order); ?>
44  <?php else: ?>
45  <?php $_excl = $block->displayPriceAttribute('shipping_amount', false, ' '); ?>
46  <?php endif; ?>
47  <?php $_incl = $block->displayShippingPriceInclTax($_order); ?>
48 
49  <?= /* @escapeNotVerified */ $_excl ?>
50  <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
51  (<?= /* @escapeNotVerified */ __('Incl. Tax') ?> <?= /* @escapeNotVerified */ $_incl ?>)
52  <?php endif; ?>
53  </div>
54  </div>
55  <?php if ($block->canCreateShipment() && $block->canShipPartiallyItem()): ?>
56  <div class="admin__field admin__field-option">
57  <input type="checkbox" name="invoice[do_shipment]" id="invoice_do_shipment" value="1"
58  class="admin__control-checkbox" <?= $block->hasInvoiceShipmentTypeMismatch() ? ' disabled="disabled"' : '' ?> />
59  <label for="invoice_do_shipment"
60  class="admin__field-label"><span><?= /* @escapeNotVerified */ __('Create Shipment') ?></span></label>
61  </div>
62  <?php if ($block->hasInvoiceShipmentTypeMismatch()): ?>
63  <small><?= /* @escapeNotVerified */ __('Invoice and shipment types do not match for some items on this order. You can create a shipment only after creating the invoice.') ?></small>
64  <?php endif; ?>
65  <?php endif; ?>
66  <div id="tracking" style="display:none;"><?= $block->getChildHtml('tracking', false) ?></div>
67  </div>
68  </div>
69  <?php endif; ?>
70  </div>
71  </section>
72 
73  <section id="invoice_item_container">
74  <?= $block->getChildHtml('order_items') ?>
75  </section>
76 </form>
77 <script>
78 require(['prototype'], function(){
79 
80 //<![CDATA[
81  var createShipment = $('invoice_do_shipment');
82  if (createShipment) {
83  createShipment.observe('click', function(e){
84  if (createShipment.checked) {
85  document.getElementById('tracking').style.display = 'block';
86  } else {
87  document.getElementById('tracking').style.display = 'none'
88  }
89  })
90  }
91 
92  /*forced creating of shipment*/
93  var forcedShipmentCreate = <?= /* @escapeNotVerified */ $block->getForcedShipmentCreate() ?>;
94  var shipmentElement = $('invoice_do_shipment');
95  if (forcedShipmentCreate && shipmentElement) {
96  shipmentElement.checked = true;
97  shipmentElement.disabled = true;
98  document.getElementById('tracking').style.display = 'block';
99  }
100 
101  window.createShipment = createShipment;
102  window.forcedShipmentCreate = forcedShipmentCreate;
103  window.shipmentElement = shipmentElement;
104 //]]>
105 
106 });
107 </script>
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
$_incl
Definition: form.phtml:38
endif
Definition: form.phtml:34
$parentItem $_order
Definition: default.phtml:12
__()
Definition: __.php:13
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$block
Definition: block.php:8
if( $_rate=$block->getActiveMethodRate())( $block->getCarrierName( $_rate->getCarrier())) ?></dt >< dd class $_excl
Definition: form.phtml:63