Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions app/code/Magento/Sales/Block/Adminhtml/Order/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ protected function _construct()

parent::_construct();

$this->buttonList->remove('delete');
$this->buttonList->remove('reset');
$this->buttonList->remove('save');
$this->removeButton('delete');
$this->removeButton('reset');
$this->removeButton('save');
$this->setId('sales_order_view');
$order = $this->getOrder();

Expand All @@ -92,7 +92,7 @@ protected function _construct()
. $this->getEditMessage($order) . '\', url: \'' . $this->getEditUrl()
. '\'}).orderEditDialog(\'showDialog\');';

$this->buttonList->add(
$this->addButton(
'order_edit',
[
'label' => __('Edit'),
Expand All @@ -106,7 +106,7 @@ protected function _construct()
}

if ($this->_isAllowedAction('Magento_Sales::cancel') && $order->canCancel()) {
$this->buttonList->add(
$this->addButton(
'order_cancel',
[
'label' => __('Cancel'),
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function _construct()
if ($order->getPayment()->getMethodInstance()->isGateway()) {
$onClick = "confirmSetLocation('{$message}', '{$this->getCreditmemoUrl()}')";
}
$this->buttonList->add(
$this->addButton(
'order_creditmemo',
['label' => __('Credit Memo'), 'onclick' => $onClick, 'class' => 'credit-memo']
);
Expand All @@ -159,7 +159,7 @@ protected function _construct()
}

if ($this->_isAllowedAction('Magento_Sales::hold') && $order->canHold()) {
$this->buttonList->add(
$this->addButton(
'order_hold',
[
'label' => __('Hold'),
Expand All @@ -173,7 +173,7 @@ protected function _construct()
}

if ($this->_isAllowedAction('Magento_Sales::unhold') && $order->canUnhold()) {
$this->buttonList->add(
$this->addButton(
'order_unhold',
[
'label' => __('Unhold'),
Expand All @@ -189,15 +189,15 @@ protected function _construct()
if ($this->_isAllowedAction('Magento_Sales::review_payment')) {
if ($order->canReviewPayment()) {
$message = __('Are you sure you want to accept this payment?');
$this->buttonList->add(
$this->addButton(
'accept_payment',
[
'label' => __('Accept Payment'),
'onclick' => "confirmSetLocation('{$message}', '{$this->getReviewPaymentUrl('accept')}')"
]
);
$message = __('Are you sure you want to deny this payment?');
$this->buttonList->add(
$this->addButton(
'deny_payment',
[
'label' => __('Deny Payment'),
Expand All @@ -206,7 +206,7 @@ protected function _construct()
);
}
if ($order->canFetchPaymentReviewUpdate()) {
$this->buttonList->add(
$this->addButton(
'get_review_payment_update',
[
'label' => __('Get Payment Update'),
Expand All @@ -218,7 +218,7 @@ protected function _construct()

if ($this->_isAllowedAction('Magento_Sales::invoice') && $order->canInvoice()) {
$_label = $order->getForcedShipmentWithInvoice() ? __('Invoice and Ship') : __('Invoice');
$this->buttonList->add(
$this->addButton(
'order_invoice',
[
'label' => $_label,
Expand All @@ -232,7 +232,7 @@ protected function _construct()
'Magento_Sales::ship'
) && $order->canShip() && !$order->getForcedShipmentWithInvoice()
) {
$this->buttonList->add(
$this->addButton(
'order_ship',
[
'label' => __('Ship'),
Expand All @@ -248,7 +248,7 @@ protected function _construct()
$order->getStore()
) && $order->canReorderIgnoreSalable()
) {
$this->buttonList->add(
$this->addButton(
'order_reorder',
[
'label' => __('Reorder'),
Expand Down