backuprestore0.3

This commit is contained in:
Hassan Hashmi
2022-06-14 12:10:34 +05:00
parent a59e02fb30
commit 6f488052fc
5 changed files with 392 additions and 28 deletions

View File

@@ -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) {