Skip to content

Commit bf02b8a

Browse files
author
Denys Rul
committed
MAGETWO-44477: Rollback database backup is not functioning
1 parent 1b2cadf commit bf02b8a

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

lib/web/mage/adminhtml/backup.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ define([
1515
initialize : function(a, b){
1616
this.reset();
1717
this.rollbackUrl = this.backupUrl = '';
18-
this.rollbackForm = jQuery('#rollback-form').mage('validation', {
19-
submitHandler: jQuery.proxy(this.submitRollback, this)
20-
});
21-
this.backupForm = jQuery('#backup-form').mage('validation', {
22-
submitHandler: jQuery.proxy(this.submitBackup, this)
23-
});
2418
},
2519

2620
reset: function() {
@@ -49,14 +43,17 @@ define([
4943

5044
requestBackupOptions: function() {
5145
this.hidePopups();
46+
5247
var action = this.type != 'snapshot' ? 'hide' : 'show';
53-
$$('#exclude-media-checkbox-container').invoke(action);
48+
5449
this.showPopup('backup-options');
50+
51+
$$('#exclude-media-checkbox-container').invoke(action);
5552
},
5653

5754
requestPassword: function() {
5855
this.hidePopups();
59-
56+
6057
this.showPopup('rollback-request-password');
6158

6259
this.type != 'db' ?
@@ -89,12 +86,12 @@ define([
8986
method: 'post',
9087
parameters: data
9188
});
89+
90+
this.modal.modal('closeModal');
9291
},
9392

9493
submitRollback: function() {
9594
var data = this.getPostData();
96-
97-
this.hidePopups();
9895

9996
new Ajax.Request(this.rollbackUrl, {
10097
onSuccess: function(transport) {
@@ -103,6 +100,8 @@ define([
103100
method: 'post',
104101
parameters: data
105102
});
103+
104+
this.modal.modal('closeModal');
106105
},
107106

108107
processResponse: function(transport, popupId) {
@@ -150,10 +149,6 @@ define([
150149
submitHandler: jQuery.proxy(this.submitBackup, this)
151150
});
152151
this.modal.find('#backup-form').submit();
153-
this.modal.modal('closeModal');
154-
},
155-
opened: function () {
156-
this.modal.find(':hidden').show();
157152
}
158153
},
159154
'rollback-warning': {
@@ -176,10 +171,8 @@ define([
176171
submitHandler: jQuery.proxy(this.submitRollback, this)
177172
});
178173
this.modal.find('#rollback-form').submit();
179-
this.modal.modal('closeModal');
180174
},
181175
opened: function () {
182-
this.modal.find('*:hidden').show();
183176
this.toggleFtpCredentialsForm();
184177
}
185178
}

0 commit comments

Comments
 (0)