mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 07:46:10 +01:00
backuprestore0.3
This commit is contained in:
@@ -1550,16 +1550,26 @@ app.controller('RestoreWPBackup', function ($scope, $http, $timeout, $window) {
|
||||
$scope.goBackDisable = true;
|
||||
$scope.currentStatus = "Start Restoring WordPress..";
|
||||
|
||||
var backuptype = $('#backuptype').html();
|
||||
var data;
|
||||
if (backuptype == "DataBase Backup") {
|
||||
data = {
|
||||
backupid: $('#backupid').html(),
|
||||
DesSite: $('#DesSite').children("option:selected").val(),
|
||||
Domain: ''
|
||||
}
|
||||
} else {
|
||||
data = {
|
||||
backupid: $('#backupid').html(),
|
||||
DesSite: $('#DesSite').children("option:selected").val(),
|
||||
Domain: $("input[name=Newdomain]").val()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var url = "/websites/RestoreWPbackupNow";
|
||||
|
||||
|
||||
|
||||
var data = {
|
||||
backupid: $('#backupid').html(),
|
||||
DesSite: $('#DesSite').children("option:selected").val(),
|
||||
Domain: $("input[name=Newdomain]").val()
|
||||
}
|
||||
|
||||
var config = {
|
||||
headers: {
|
||||
'X-CSRFToken': getCookie('csrftoken')
|
||||
@@ -1570,16 +1580,11 @@ app.controller('RestoreWPBackup', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
var d = $('#DesSite').children("option:selected").val();
|
||||
var c = $("input[name=Newdomain]").val();
|
||||
if( d == -1 && c == "")
|
||||
{
|
||||
alert("Please Select Method of Backup Restore");
|
||||
}
|
||||
else {
|
||||
// if (d == -1 || c == "") {
|
||||
// alert("Please Select Method of Backup Restore");
|
||||
// } else {
|
||||
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// }
|
||||
|
||||
|
||||
function ListInitialDatas(response) {
|
||||
|
||||
Reference in New Issue
Block a user