Skip to content

Commit 03e2c46

Browse files
committed
MAGETWO-38780: It's unable to edit the Order from Admin panel
1 parent dcda524 commit 03e2c46

File tree

1 file changed

+19
-6
lines changed
  • app/code/Magento/Sales/view/adminhtml/web/order/edit

1 file changed

+19
-6
lines changed

app/code/Magento/Sales/view/adminhtml/web/order/edit/message.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
define([
88
"jquery",
99
"jquery/ui",
10-
'Magento_Ui/js/dialog/dialog',
10+
'Magento_Ui/js/modal/modal',
1111
"mage/translate"
1212
], function($){
1313
"use strict";
1414
$.widget('mage.orderEditDialog', {
1515
options: {
1616
url: null,
1717
message: null,
18-
dialog: null
18+
modal: null
1919
},
2020

2121
/**
@@ -26,10 +26,10 @@ define([
2626
},
2727

2828
/**
29-
* Show dialog
29+
* Show modal
3030
*/
3131
showDialog: function() {
32-
this.options.dialog.html(this.options.message).trigger('openDialog');
32+
this.options.dialog.html(this.options.message).modal('openModal');
3333
},
3434

3535
/**
@@ -40,11 +40,24 @@ define([
4040
},
4141

4242
/**
43-
* Prepare dialog
43+
* Prepare modal
4444
* @protected
4545
*/
4646
_prepareDialog: function() {
47-
this.options.dialog = $('<div class="ui-dialog-content ui-widget-content"></div>').dialog();
47+
var self = this;
48+
49+
this.options.dialog = $('<div class="ui-dialog-content ui-widget-content"></div>').modal({
50+
type: 'popup',
51+
modalClass: 'edit-order-popup',
52+
title: $.mage.__('Edit Order'),
53+
buttons: [{
54+
text: $.mage.__('Ok'),
55+
'class': 'action-primary',
56+
click: function(){
57+
self.redirect();
58+
}
59+
}]
60+
});
4861
}
4962
});
5063

0 commit comments

Comments
 (0)