Skip to content

Commit 30a9999

Browse files
committed
MAGETWO-32302: Create New Order
- Order total
1 parent eef3304 commit 30a9999

File tree

11 files changed

+98
-82
lines changed

11 files changed

+98
-82
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/** @var $block \Magento\Backend\Block\Widget\Form */
1010
?>
1111
<?php /* @todo replace .form-inline with better class name */?>
12+
<?php /* ToDo UI: check if we need this wrapper. Remobve or replace classes after admin__scope-old remove. Update /app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order-create.less */ ?>
1213
<div class="entry-edit form-inline">
1314
<?php echo $block->getFormHtml();?>
1415
</div>

app/code/Magento/ConfigurableProduct/view/adminhtml/web/product/product.css

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -241,25 +241,3 @@
241241
#allow_open_amount {
242242
margin-top: 8px;
243243
}
244-
245-
.mage-new-category-dialog .ui-dialog-content .fieldset {
246-
padding: 0;
247-
margin: 0;
248-
}
249-
250-
.mage-new-category-dialog .ui-dialog-content .label {
251-
width: 25%;
252-
}
253-
254-
.mage-new-category-dialog .ui-dialog-content .control {
255-
width: 75%;
256-
}
257-
258-
.mage-new-category-dialog .ui-dialog-buttonset {
259-
text-align: left;
260-
}
261-
262-
.mage-new-category-dialog .ui-dialog-buttonset .action-create {
263-
margin: 0 0 0 25%;
264-
vertical-align: middle;
265-
}

app/code/Magento/Sales/Block/Adminhtml/Order/Create/Giftmessage/Form.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,7 @@ protected function _prepareVisibleFields(Fieldset $fieldset)
256256
[
257257
'name' => $this->_getFieldName('message'),
258258
'label' => __('Message'),
259-
'class' => 'admin__control-textarea',
260-
'rows' => '5',
261-
'cols' => '20'
259+
'class' => 'admin__control-textarea'
262260
]
263261
);
264262
return $this;

app/code/Magento/Sales/view/adminhtml/templates/order/create/comment.phtml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<!--<h4 class="icon-head fieldset-legend <?php echo $block->getHeaderCssClass() ?>"><?php echo $block->getHeaderText() ?></h4>-->
11-
<label for="order-comment"><?php echo __('Order Comments') ?></label><br />
12-
<textarea style="width:98%; height:8em;" id="order-comment" name="order[comment][customer_note]" rows="2" cols="15"><?php echo $block->getCommentNote() ?></textarea>
10+
11+
<?php /* <h4 class="icon-head fieldset-legend <?php echo $block->getHeaderCssClass() ?>"><?php echo $block->getHeaderText() ?></h4> */ ?>
12+
<div class="admin__field field-comment">
13+
<label for="order-comment" class="admin__field-label"><span><?php echo __('Order Comments') ?></span></label>
14+
<div class="admin__field-control">
15+
<textarea id="order-comment" name="order[comment][customer_note]"
16+
class="admin__control-textarea"><?php echo $block->getCommentNote() ?></textarea>
17+
</div>
18+
</div>
1319
<script>
14-
require(["Magento_Sales/order/create/form"], function(){
15-
order.commentFieldsBind('order-comment')
16-
});
20+
require(["Magento_Sales/order/create/form"], function(){
21+
order.commentFieldsBind('order-comment')
22+
});
1723
</script>

app/code/Magento/Sales/view/adminhtml/templates/order/create/giftmessage.phtml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
<legend class="admin__legend"><span><?php echo __('Gift Message for the Entire Order') ?></span></legend>
1515
<br>
1616
<?php if ($this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())): ?>
17-
<div class="giftmessage-entire-order">
18-
<p><?php echo __('If you don\'t want to leave a gift message for the entire order, leave this box blank.') ?></p>
19-
<?php echo $block->getFormHtml($block->getQuote(), 'main') ?>
20-
</div>
17+
<p><?php echo __('If you don\'t want to leave a gift message for the entire order, leave this box blank.') ?></p>
18+
<?php echo $block->getFormHtml($block->getQuote(), 'main') ?>
2119
<?php endif; ?>
2220
</fieldset>
23-
<script>
21+
<script>
2422
require(['Magento_Sales/order/create/form'], function(){
2523

2624
order.giftmessageFieldsBind('order-giftmessage');

app/code/Magento/Sales/view/adminhtml/templates/order/create/totals.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</tbody>
1818
</table>
1919

20-
<div class="order-totals-bottom">
20+
<div class="order-totals-actions">
2121
<div class="admin__field admin__field-option field-append-comments">
2222
<input type="checkbox" id="notify_customer" name="order[comment][customer_note_notify]"
2323
value="1"<?php if ($block->getNoteNotify()): ?> checked="checked"<?php endif; ?>

app/code/Magento/Sales/view/adminhtml/templates/order/create/totals/subtotal.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<td style="<?php echo $block->getStyle() ?>" class="admin__total-mark" colspan="<?php echo $block->getColspan(); ?>">
2525
<?php echo __('Subtotal (Incl. Tax)') ?>
2626
</td>
27-
<td style="<?php echo $block->getStyle() ?>" class="amount">
27+
<td style="<?php echo $block->getStyle() ?>" class="admin__total-amount">
2828
<?php echo $block->formatPrice($block->getTotal()->getValueInclTax()) ?>
2929
</td>
3030
</tr>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
<div class="fieldset-wrapper">
8787
<div class="fieldset-wrapper-title"><span class="title"><?php echo __('Refund Totals') ?></span></div>
8888
<?php echo $block->getChildHtml('creditmemo_totals') ?>
89-
<div class="order-totals-bottom">
90-
<div class="field choice field-append-comments">
89+
<div class="order-totals-actions">
90+
<div class="field choice field-append-comments">
9191
<input id="notify_customer" name="creditmemo[comment_customer_notify]" value="1" type="checkbox" />
9292
<label for="notify_customer"><span><?php echo __('Append Comments') ?></span></label>
9393
</div>

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<div class="fieldset-wrapper-title">
7979
<span class="title"><?php echo __('Invoice Totals') ?></span>
8080
</div>
81-
<div class="order-totals-bottom">
81+
<div class="order-totals-actions">
8282
<?php echo $block->getChildHtml('invoice_totals') ?>
8383
<?php if ($block->isCaptureAllowed()): ?>
8484
<?php if ($block->canCapture()):?>

app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order-create.less

Lines changed: 76 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,24 @@
399399
font-weight: @font-weight__bold;
400400
}
401401
}
402+
403+
> .giftmessage-order-create {
404+
float: left;
405+
#mix-grid .width(6, 12);
406+
}
402407
}
403408

404409
.giftmessage-order-create {
405-
float: left;
406-
#mix-grid .width(6,12);
410+
.field-sender {
411+
margin-top: 1.4rem;
412+
}
413+
.admin__field { // ToDo UI: remove when /app/code/Magento/Backend/view/adminhtml/templates/widget/form.phtml refactored (the wrapping div removed)
414+
margin-bottom: 3rem;
415+
position: relative;
416+
+ .admin__field {
417+
margin-top: 1.5rem;
418+
}
419+
}
407420
}
408421

409422
//
@@ -526,39 +539,66 @@
526539
// Totals
527540
// ---------------------------------------------
528541

529-
// ToDo UI: review the collapsible block
530-
.summary-total {
531-
.summary-collapse {
532-
cursor: pointer;
533-
display: inline-block;
534-
&:before {
535-
@iconsize: 16px;
536-
537-
background: #f2ebde;
538-
border: 1px solid #ada89e;
539-
border-radius: 2px;
540-
color: #816063;
541-
content: '\e02d';
542-
display: inline-block;
543-
font-family: 'MUI-Icons';
544-
font-size: @iconsize;
545-
-webkit-font-smoothing: antialiased;
546-
font-style: normal;
547-
font-weight: normal;
548-
height: @iconsize;
549-
line-height: @iconsize;
550-
margin-right: 7px;
551-
overflow: hidden;
552-
speak: none;
553-
text-indent: 0;
554-
vertical-align: top;
555-
width: @iconsize;
556-
}
557-
&:hover:before {
558-
background: #cac3b4;
559-
}
560-
}
561-
&.show-details .summary-collapse:before {
562-
content: '\e03a';
542+
.admin__table-secondary {
543+
width: 100%;
544+
td {
545+
padding: .7rem @indent__s;
546+
}
547+
tr:nth-child(2n+1) td {
548+
background-color: @color-white-fog2;
549+
}
550+
.admin__total-amount {
551+
text-align: right;
552+
}
553+
tr:last-child td {
554+
border-bottom: 1px solid @color-gray80;
555+
padding-bottom: @indent__s;
556+
}
557+
}
558+
559+
.order-totals-actions {
560+
margin-top: @indent__s;
561+
.actions {
562+
margin-top: @indent__l;
563+
text-align: right;
564+
}
565+
.action-default {
566+
&:extend(.abs-action-l all);
563567
}
564568
}
569+
570+
// ToDo UI: review the collapsible block
571+
//.order-subtotal {
572+
// .summary-collapse {
573+
// cursor: pointer;
574+
// display: inline-block;
575+
// &:before {
576+
// @iconsize: 16px;
577+
//
578+
// background: #f2ebde;
579+
// border: 1px solid #ada89e;
580+
// border-radius: 2px;
581+
// color: #816063;
582+
// content: '+';
583+
// display: inline-block;
584+
// font-size: @iconsize;
585+
// -webkit-font-smoothing: antialiased;
586+
// font-style: normal;
587+
// font-weight: normal;
588+
// height: @iconsize;
589+
// line-height: @iconsize;
590+
// margin-right: 7px;
591+
// overflow: hidden;
592+
// speak: none;
593+
// text-indent: 0;
594+
// vertical-align: top;
595+
// width: @iconsize;
596+
// }
597+
// &:hover:before {
598+
// background: #cac3b4;
599+
// }
600+
// }
601+
// &.show-details .summary-collapse:before {
602+
// content: '\e03a';
603+
// }
604+
//}

0 commit comments

Comments
 (0)