11 <section
class=
"admin__page-section">
12 <div
class=
"admin__page-section-title">
13 <span
class=
"title"><?=
__(
'Items to Ship') ?></span>
15 <div
class=
"admin__table-wrapper">
16 <table
class=
"data-table admin__table-primary order-shipment-table">
19 <th
class=
"col-product"><span><?=
__(
'Product') ?></span></th>
20 <th
class=
"col-ordered-qty"><span><?=
__(
'Qty') ?></span></th>
21 <th
class=
"col-qty<?php if ($block->isShipmentRegular()): ?> last<?php endif; ?>">
22 <span><?=
__(
'Qty to Ship') ?></span>
24 <?php
if (!
$block->canShipPartiallyItem()): ?>
25 <th
class=
"col-ship last"><span><?=
__(
'Ship') ?></span></th>
31 <tbody
class=
"<?= /* @escapeNotVerified */ $_i%2 ? 'odd' : 'even' ?>">
40 <section
class=
"admin__page-section">
41 <div
class=
"admin__page-section-title">
42 <span
class=
"title"><?=
__(
'Shipment Total') ?></span>
44 <div
class=
"admin__page-section-content order-comments-history">
45 <div
class=
"admin__page-section-item">
46 <div
class=
"admin__page-section-item-title">
47 <span
class=
"title"><?=
__(
'Shipment Comments') ?></span>
49 <div
class=
"admin__page-section-item-content">
50 <div
id=
"order-history_form" class=
"admin__field">
51 <label
class=
"admin__field-label" 52 for=
"shipment_comment_text">
53 <span><?=
__(
'Comment Text') ?></span></label>
54 <div
class=
"admin__field-control">
55 <textarea
id=
"shipment_comment_text" 56 class=
"admin__control-textarea" 57 name=
"shipment[comment_text]" 59 cols=
"5"><?=
$block->getShipment()->getCommentText() ?></textarea>
65 <div
class=
"admin__page-section-item order-totals order-totals-actions">
66 <div
class=
"admin__page-section-item-title">
67 <span
class=
"title"><?=
__(
'Shipment Options') ?></span>
69 <div
class=
"admin__page-section-item-content">
70 <?php
if (
$block->canCreateShippingLabel()): ?>
71 <div
class=
"field choice admin__field admin__field-option field-create">
72 <input
id=
"create_shipping_label" 73 class=
"admin__control-checkbox" 74 name=
"shipment[create_shipping_label]" 77 onclick=
"toggleCreateLabelCheckbox();"/>
78 <label
class=
"admin__field-label" 79 for=
"create_shipping_label">
80 <span><?=
__(
'Create Shipping Label') ?></span></label>
84 <div
class=
"field choice admin__field admin__field-option field-append">
85 <input
id=
"notify_customer" 86 class=
"admin__control-checkbox" 87 name=
"shipment[comment_customer_notify]" 90 <label
class=
"admin__field-label" 91 for=
"notify_customer">
92 <span><?=
__(
'Append Comments') ?></span></label>
95 <?php
if (
$block->canSendShipmentEmail()): ?>
96 <div
class=
"field choice admin__field admin__field-option field-email">
97 <input
id=
"send_email" 98 class=
"admin__control-checkbox" 99 name=
"shipment[send_email]" 102 <label
class=
"admin__field-label" 104 <span><?=
__(
'Email Copy of Shipment') ?></span></label>
107 <?=
$block->getChildHtml(
'submit_before') ?>
108 <div
class=
"order-history-comments-actions actions">
109 <?=
$block->getChildHtml(
'submit_button') ?>
110 <?=
$block->getChildHtml(
'submit_after') ?>
118 "Magento_Ui/js/modal/alert",
120 ],
function(
jQuery, alert){
123 var sendEmailCheckbox = $(
'send_email');
124 if (sendEmailCheckbox) {
125 var notifyCustomerCheckbox = $(
'notify_customer');
126 var shipmentCommentText = $(
'shipment_comment_text');
127 Event.observe(sendEmailCheckbox,
'change', bindSendEmail);
130 function bindSendEmail() {
131 if (sendEmailCheckbox.checked ==
true) {
132 notifyCustomerCheckbox.disabled =
false;
135 notifyCustomerCheckbox.disabled =
true;
138 window.toggleCreateLabelCheckbox =
function() {
139 var
checkbox = $(
'create_shipping_label');
140 var submitButton =
checkbox.up(
'.order-totals').select(
'.submit-button span')[0];
142 submitButton.innerText +=
'...';
144 submitButton.innerText = submitButton.innerText.replace(/\.\.\.$/,
'');
147 window.submitShipment =
function(btn) {
148 if (!validQtyItems()) {
150 content:
'<?= /* @escapeNotVerified */ __('Invalid
value(s)
for Qty to Ship
') ?>' 154 var
checkbox = $(btn).up(
'.order-totals').select(
'#create_shipping_label')[0];
156 packaging.showWindow();
158 disableElements(
'submit-button');
160 jQuery(
'#edit_form').on(
'invalid-form.validate',
function() {
161 enableElements(
'submit-button');
162 jQuery(
'#edit_form').off(
'invalid-form.validate');
164 jQuery(
'#edit_form').triggerHandler(
'save');
167 window.validQtyItems =
function() {
169 $$(
'.qty-item').each(
function(item) {
170 var val = parseFloat(item.value);
171 if (isNaN(val) || val < 0) {
178 window.bindSendEmail = bindSendEmail;
180 window.shipmentCommentText = shipmentCommentText;
181 window.notifyCustomerCheckbox = notifyCustomerCheckbox;
182 window.sendEmailCheckbox = sendEmailCheckbox;
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
if( $block->getQuote() ->hasVirtualItems())( 'Other items in your order') ?></strong >< a hrefforeach( $block->getVirtualQuoteItems() as $_item)(__( 'Product Name')) ?>"><? endforeach
if( $type=='related' &&$canItemsAddToCart)( 'Check items to add to the cart or') ?>< button type endif
jquery extjs ext tree checkbox
jQuery('.store-switcher .dropdown-menu li a').each(function()