-
+
Emails
@@ -183,11 +183,342 @@
- Delete Edit
-
+ {% trans "Delete" %}
+
+ {# {% trans "EDIT" %}#}
+ {# #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
Edit Job
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# #}
+ {# #}
+ {# Close modal #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# Save Changes#}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# #}
+ {# #}
+ {# ID#}
+ {# #}
+ {# #}
+ {# Website#}
+ {# #}
+ {# #}
+ {# Actions#}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# {% trans "Delete" %}#}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
Select Site
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# {% for items in websiteList %}#}
+ {# {{ items }} #}
+ {# {% endfor %}#}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# Add#}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+
{% trans "EDIT" %}
+
+
+
+
+
+
Edit Job
+
+
+
+
+
+ Close modal
+
+
+
+
+
+
+ Save Changes
+
+
+
+
+
+
+
+
Select Site
+
+
+
+
+ {% for items in websiteList %}
+ {{ items }}
+ {% endfor %}
+
+
+
+
+
+ Add
+
+
+
+
+
+
+
+
{% endblock %}
diff --git a/IncBackups/templates/IncBackups/createBackupV2.html b/IncBackups/templates/IncBackups/createBackupV2.html
index af868d9ca..1ee1b98f0 100644
--- a/IncBackups/templates/IncBackups/createBackupV2.html
+++ b/IncBackups/templates/IncBackups/createBackupV2.html
@@ -127,7 +127,94 @@
- Restore
+ {# {% trans " Restore Points" %}#}
+ {# #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
Restore Points
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# #}
+ {# #}
+ {# Close modal #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# #}
+ {# #}
+ {# Job ID#}
+ {# #}
+ {# #}
+ {# Snapshot ID#}
+ {# #}
+ {# #}
+ {# Type#}
+ {# #}
+ {# #}
+ {# Destination#}
+ {# #}
+ {# #}
+ {# Action#}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# #}
+ {# Restore #}
+ {# #}
+ {# #}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {# #}
+ {# Close#}
+ {# #}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
+ {#
#}
@@ -137,4 +224,92 @@
+ {% trans " Restore Points" %}
+
+
+
+
+
+
Restore Points
+
+
+
+
+
+ Close modal
+
+
+
+
+
+
+
+
+ Job ID
+
+
+ Snapshot ID
+
+
+ Type
+
+
+ Destination
+
+
+ Action
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restore
+
+
+
+
+
+
+
+
+ Close
+
+
+
+
+
+
{% endblock %}
diff --git a/IncBackups/templates/IncBackups/restoreRemoteBackups.html b/IncBackups/templates/IncBackups/restoreRemoteBackups.html
index 46472111f..6ac901658 100755
--- a/IncBackups/templates/IncBackups/restoreRemoteBackups.html
+++ b/IncBackups/templates/IncBackups/restoreRemoteBackups.html
@@ -23,7 +23,7 @@
{% trans "Backup Website" %}
+ src="{% static 'images/loading.gif' %}">
@@ -109,7 +109,7 @@
Restore
diff --git a/backup/templates/backup/backupDestinationsV2.html b/backup/templates/backup/backupDestinationsV2.html
index 2b2ed29fc..fa391fd4d 100644
--- a/backup/templates/backup/backupDestinationsV2.html
+++ b/backup/templates/backup/backupDestinationsV2.html
@@ -18,7 +18,7 @@
On this page you can set up your Backup destinations. (SFTP)
-
+
Set up Backup Destinations.
diff --git a/backup/templates/backup/backupV2.html b/backup/templates/backup/backupV2.html
index a9b4309a3..6046e83ae 100644
--- a/backup/templates/backup/backupV2.html
+++ b/backup/templates/backup/backupV2.html
@@ -15,7 +15,7 @@
This page can be used to Backup your websites
-
+
Backup Website
diff --git a/backup/templates/backup/remoteBackupsV2.html b/backup/templates/backup/remoteBackupsV2.html
index ac9a5a50d..012643b4b 100644
--- a/backup/templates/backup/remoteBackupsV2.html
+++ b/backup/templates/backup/remoteBackupsV2.html
@@ -16,7 +16,7 @@
This feature can import website(s) from remote server
-
+
Remote Backups
diff --git a/backup/templates/backup/restoreV2.html b/backup/templates/backup/restoreV2.html
index 592a74c44..06dad572b 100644
--- a/backup/templates/backup/restoreV2.html
+++ b/backup/templates/backup/restoreV2.html
@@ -17,7 +17,7 @@
This page can be used to restore your websites, Backup
should be generated from CyberPanel Backup generation tool, it will detect all Backups under /home/backup .
-
+
Restore Website
diff --git a/emailMarketing/emailMarketingManager.py b/emailMarketing/emailMarketingManager.py
index dc4b63f87..07005bab2 100755
--- a/emailMarketing/emailMarketingManager.py
+++ b/emailMarketing/emailMarketingManager.py
@@ -197,6 +197,29 @@ class EmailMarketingManager:
except KeyError as msg:
return redirect(loadLoginPage)
+ def manageListsV2(self):
+ try:
+ userID = self.request.session['userID']
+ currentACL = ACLManager.loadedACL(userID)
+ admin = Administrator.objects.get(pk=userID)
+
+ if ACLManager.checkOwnership(self.domain, admin, currentACL) == 1:
+ pass
+ else:
+ return ACLManager.loadError()
+
+ if emACL.checkIfEMEnabled(admin.userName) == 0:
+ return ACLManager.loadError()
+
+ listNames = emACL.getEmailsLists(self.domain)
+
+ proc = httpProc(self.request, 'emailMarketing/manageListsV2.html',
+ {'listNames': listNames, 'domain': self.domain})
+ return proc.render()
+
+ except KeyError as msg:
+ return redirect(loadLoginPage)
+
def configureVerify(self):
try:
@@ -721,6 +744,20 @@ class EmailMarketingManager:
except KeyError as msg:
return redirect(loadLoginPage)
+ def composeEmailMessageV2(self):
+ try:
+ userID = self.request.session['userID']
+ admin = Administrator.objects.get(pk=userID)
+
+ if emACL.checkIfEMEnabled(admin.userName) == 0:
+ return ACLManager.loadErrorJson()
+
+ proc = httpProc(self.request, 'emailMarketing/composeMessagesV2.html',
+ None)
+ return proc.render()
+ except KeyError as msg:
+ return redirect(loadLoginPage)
+
def saveEmailTemplate(self):
try:
userID = self.request.session['userID']
@@ -780,6 +817,31 @@ class EmailMarketingManager:
except KeyError as msg:
return redirect(loadLoginPage)
+ def sendEmailsV2(self):
+ try:
+ userID = self.request.session['userID']
+ admin = Administrator.objects.get(pk=userID)
+
+ if emACL.checkIfEMEnabled(admin.userName) == 0:
+ return ACLManager.loadErrorJson()
+
+ currentACL = ACLManager.loadedACL(userID)
+ templateNames = emACL.allTemplates(currentACL, admin)
+ hostNames = emACL.allSMTPHosts(currentACL, admin)
+ listNames = emACL.allEmailsLists(currentACL, admin)
+
+ Data = {}
+ Data['templateNames'] = templateNames
+ Data['hostNames'] = hostNames
+ Data['listNames'] = listNames
+
+ proc = httpProc(self.request, 'emailMarketing/sendEmailsV2.html',
+ Data)
+ return proc.render()
+
+ except KeyError as msg:
+ return redirect(loadLoginPage)
+
def templatePreview(self):
try:
userID = self.request.session['userID']
diff --git a/emailMarketing/static/emailMarketing/emailMarketingV2.js b/emailMarketing/static/emailMarketing/emailMarketingV2.js
index 140be4b10..4d0046f89 100644
--- a/emailMarketing/static/emailMarketing/emailMarketingV2.js
+++ b/emailMarketing/static/emailMarketing/emailMarketingV2.js
@@ -2,6 +2,22 @@ var emailListURL = "/emailMarketing/" + $("#domainNamePageV2").text() + "/emailL
$("#emailListsV2").attr("href", emailListURL);
$("#emailListsChildV2").attr("href", emailListURL);
+var manageListsURL = "/emailMarketing/" + $("#domainNamePageV2").text() + "/manageListsV2";
+$("#manageListsV2").attr("href", manageListsURL);
+$("#manageListsChildV2").attr("href", manageListsURL);
+
+var sendEmailsURL = "/emailMarketing/sendEmailsV2";
+$("#sendEmailsPageV2").attr("href", sendEmailsURL);
+$("#sendEmailsPageChildV2").attr("href", sendEmailsURL);
+
+var composeEmailURL = "/emailMarketing/composeEmailMessageV2";
+$("#composeEmailsV2").attr("href", composeEmailURL);
+$("#composeEmailsChildV2").attr("href", composeEmailURL);
+
+var smtpHostsURL = "/emailMarketing/" + $("#domainNamePageV2").text() + "/manageSMTPV2";
+$("#manageSMTPHostsV2").attr("href", smtpHostsURL);
+$("#manageSMTPHostsChildV2").attr("href", smtpHostsURL);
+
newapp.controller('createEmailListV2', function ($scope, $http, $timeout) {
$scope.installationDetailsForm = false;
@@ -391,5 +407,876 @@ newapp.controller('manageSMTPHostsCTRLV2', function ($scope, $http) {
}
+ };
+});
+newapp.controller('manageEmailListsV2', function ($scope, $http, $timeout) {
+
+ $scope.installationDetailsForm = true;
+ $scope.installationProgress = true;
+ $scope.cyberPanelLoading = true;
+ $scope.goBackDisable = true;
+ $scope.verificationStatus = true;
+
+ var statusFile;
+ var path;
+
+
+ $scope.goBack = function () {
+ $scope.installationDetailsForm = false;
+ $scope.installationProgress = true;
+ $scope.cyberPanelLoading = true;
+ $scope.goBackDisable = true;
+ $("#installProgress").css("width", "0%");
+ };
+
+ $scope.createEmailList = function () {
+
+ $scope.installationDetailsForm = true;
+ $scope.installationProgress = false;
+ $scope.cyberPanelLoading = false;
+ $scope.goBackDisable = true;
+ $scope.currentStatus = "Starting to load email addresses..";
+
+
+ url = "/emailMarketing/submitEmailList";
+
+ var data = {
+ domain: $("#domainNamePage").text(),
+ path: $scope.path,
+ listName: $scope.listName
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+
+ if (response.data.status === 1) {
+ statusFile = response.data.tempStatusPath;
+ getInstallStatus();
+ } else {
+
+ $scope.installationDetailsForm = true;
+ $scope.cyberPanelLoading = true;
+ $scope.goBackDisable = false;
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+
+ function getInstallStatus() {
+
+ url = "/websites/installWordpressStatus";
+
+ var data = {
+ statusFile: statusFile,
+ domainName: $("#domainNamePage").text()
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+
+
+ if (response.data.abort === 1) {
+
+ if (response.data.installStatus === 1) {
+
+ $scope.installationDetailsForm = true;
+ $scope.installationProgress = false;
+ $scope.cyberPanelLoading = true;
+ $scope.goBackDisable = false;
+ $scope.currentStatus = 'Emails successfully loaded.';
+ $timeout.cancel();
+
+ } else {
+
+ $scope.installationDetailsForm = true;
+ $scope.installationProgress = false;
+ $scope.cyberPanelLoading = true;
+ $scope.goBackDisable = false;
+ $scope.currentStatus = response.data.error_message;
+
+
+ }
+
+ } else {
+ $scope.installPercentage = response.data.installationProgress;
+ $scope.currentStatus = response.data.currentStatus;
+
+ $timeout(getInstallStatus, 1000);
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+
+ }
+
+
+ }
+
+
+ ///
+
+ $scope.currentRecords = true;
+
+ $scope.recordstoShow = 50;
+ var globalPage;
+
+ $scope.fetchRecords = function () {
+ $scope.fetchEmails(globalPage);
+ };
+
+ $scope.fetchEmails = function (page) {
+ globalPage = page;
+ listVerificationStatus();
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/fetchEmails";
+
+ var data = {
+ 'listName': $scope.listName,
+ 'recordstoShow': $scope.recordstoShow,
+ 'page': page
+
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+
+ if (response.data.status === 1) {
+ $scope.currentRecords = false;
+ $scope.records = JSON.parse(response.data.data);
+ $scope.pagination = response.data.pagination;
+ $scope.verificationButton = false;
+ } else {
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+ }
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = false;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+
+ $scope.deleteList = function () {
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/deleteList";
+
+ var data = {
+ listName: $scope.listName
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ if (response.data.status === 1) {
+ new PNotify({
+ title: 'Success!',
+ text: 'Emails Successfully Deleted.',
+ type: 'success'
+ });
+ } else {
+
+ $scope.cyberPanelLoading = false;
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+
+ $scope.showAddEmails = function () {
+ $scope.installationDetailsForm = false;
+ $scope.verificationStatus = true;
+ };
+
+ // List Verification
+
+ $scope.startVerification = function () {
+
+ $scope.currentStatusVerification = 'Email verification job started..';
+ $scope.installationDetailsForm = true;
+ $scope.verificationStatus = false;
+ $scope.verificationButton = true;
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/emailVerificationJob";
+
+ var data = {
+ listName: $scope.listName
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+
+ if (response.data.status === 1) {
+ listVerificationStatus();
+ $scope.verificationButton = true;
+ } else {
+
+ $scope.cyberPanelLoading = true;
+ $scope.verificationButton = false;
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ $scope.verificationButton = false;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+
+ };
+
+ var globalCounter = 0;
+
+ function listVerificationStatus() {
+
+ $scope.verificationButton = true;
+ $scope.cyberPanelLoading = false;
+
+ url = "/websites/installWordpressStatus";
+
+ var data = {
+ domain: $("#domainNamePage").text(),
+ statusFile: "/home/cyberpanel/" + $("#domainNamePage").text() + "/" + $scope.listName
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+
+
+ if (response.data.abort === 1) {
+
+ if (response.data.installStatus === 1) {
+ $scope.cyberPanelLoading = true;
+ $scope.verificationButton = false;
+ $scope.currentStatusVerification = 'Emails successfully verified.';
+ $timeout.cancel();
+
+ } else {
+
+ if (response.data.error_message.search('No such file') > -1) {
+ $scope.verificationButton = false;
+ return;
+ }
+ $scope.verificationButton = true;
+ $scope.cyberPanelLoading = false;
+ $scope.verificationStatus = false;
+ $scope.currentStatusVerification = response.data.error_message;
+
+ }
+
+ } else {
+
+ if (response.data.currentStatus.search('No such file') > -1) {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = true;
+ $scope.goBackDisable = false;
+ $timeout.cancel();
+ return;
+ }
+
+ $scope.currentStatusVerification = response.data.currentStatus;
+ $timeout(listVerificationStatus, 1000);
+ $scope.verificationStatus = false;
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+
+ }
+
+
+ }
+
+ // Delete Email from list
+
+ $scope.deleteEmail = function (id) {
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/deleteEmail";
+
+ var data = {
+ id: id
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ $scope.fetchEmails(globalPage);
+
+ if (response.data.status === 1) {
+ $scope.fetchEmails(globalPage);
+ new PNotify({
+ title: 'Success.',
+ text: 'Email Successfully deleted.',
+ type: 'success'
+ });
+
+ } else {
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+
+
+ $scope.currentPageLogs = 1;
+ $scope.recordsToShowLogs = 10;
+
+ $scope.fetchLogs = function () {
+
+ $scope.cyberPanelLoading = false;
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ var data = {
+ listName: $scope.listName,
+ page: $scope.currentPageLogs,
+ recordsToShow: $scope.recordsToShowLogs
+ };
+
+ url = "/emailMarketing/fetchVerifyLogs";
+
+ $http.post(url, data, config).then(ListInitialData, cantLoadInitialData);
+
+ function ListInitialData(response) {
+ $scope.cyberPanelLoading = true;
+ if (response.data.status === 1) {
+ $scope.recordsLogs = JSON.parse(response.data.logs);
+ $scope.paginationLogs = response.data.pagination;
+ $scope.totalEmails = response.data.totalEmails;
+ $scope.verified = response.data.verified;
+ $scope.notVerified = response.data.notVerified;
+ } else {
+ new PNotify({
+ title: 'Error!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+ }
+ }
+
+ function cantLoadInitialData(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+ }
+
+
+ };
+
+
+});
+newapp.controller('sendEmailsCTRLV2', function ($scope, $http, $timeout) {
+
+ $scope.cyberPanelLoading = true;
+ $scope.availableFunctions = true;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = true;
+
+ // Button
+
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+
+ $scope.templateSelected = function () {
+ $scope.availableFunctions = false;
+ $scope.sendEmailsView = true;
+ $scope.previewLink = '/emailMarketing/preview/' + $scope.selectedTemplate;
+ $scope.jobStatus = true;
+ emailJobStatus();
+
+ };
+
+ $scope.sendEmails = function () {
+ $scope.sendEmailsView = false;
+ $scope.fetchJobs();
+ };
+
+ $scope.fetchJobs = function () {
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/fetchJobs";
+
+ var data = {
+ 'selectedTemplate': $scope.selectedTemplate
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+
+ if (response.data.status === 1) {
+ $scope.currentRecords = false;
+ $scope.records = JSON.parse(response.data.data);
+ } else {
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+ }
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = false;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+
+ $scope.startEmailJob = function () {
+ $scope.cyberPanelLoading = false;
+ $scope.deleteTemplateBTN = true;
+ $scope.sendEmailBTN = true;
+ $scope.sendEmailsView = true;
+ $scope.goBackDisable = true;
+
+ url = "/emailMarketing/startEmailJob";
+
+
+ var data = {
+ 'selectedTemplate': $scope.selectedTemplate,
+ 'listName': $scope.listName,
+ 'host': $scope.host,
+ 'verificationCheck': $scope.verificationCheck,
+ 'unsubscribeCheck': $scope.unsubscribeCheck
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+
+ if (response.data.status === 1) {
+ emailJobStatus();
+ } else {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = false;
+ $scope.jobStatus = true;
+ $scope.goBackDisable = false;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+ }
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = false;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+
+ };
+
+ function emailJobStatus() {
+
+ $scope.cyberPanelLoading = false;
+ $scope.deleteTemplateBTN = true;
+ $scope.sendEmailBTN = true;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = false;
+ $scope.goBackDisable = true;
+
+ url = "/websites/installWordpressStatus";
+
+ var data = {
+ domain: 'example.com',
+ statusFile: "/home/cyberpanel/" + $scope.selectedTemplate + "_pendingJob"
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+
+
+ if (response.data.abort === 1) {
+
+ if (response.data.installStatus === 1) {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = false;
+ $scope.goBackDisable = false;
+ $scope.currentStatus = 'Emails successfully sent.';
+ $scope.fetchJobs();
+ $timeout.cancel();
+
+ } else {
+
+ if (response.data.error_message.search('No such file') > -1) {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = true;
+ $scope.goBackDisable = false;
+ return;
+ }
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = false;
+ $scope.goBackDisable = false;
+ $scope.currentStatus = response.data.error_message;
+
+ }
+
+ } else {
+
+ if (response.data.currentStatus.search('No such file') > -1) {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = true;
+ $scope.goBackDisable = false;
+ $timeout.cancel();
+ return;
+ }
+
+ $scope.currentStatus = response.data.currentStatus;
+ $timeout(emailJobStatus, 1000);
+ $scope.cyberPanelLoading = false;
+ $scope.deleteTemplateBTN = true;
+ $scope.sendEmailBTN = true;
+ $scope.sendEmailsView = true;
+ $scope.jobStatus = false;
+ $scope.goBackDisable = true;
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page.',
+ type: 'error'
+ });
+
+
+ }
+
+
+ }
+
+ $scope.goBack = function () {
+ $scope.cyberPanelLoading = true;
+ $scope.deleteTemplateBTN = false;
+ $scope.sendEmailBTN = false;
+ $scope.sendEmailsView = false;
+ $scope.jobStatus = true;
+
+ };
+
+ $scope.deleteTemplate = function () {
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/deleteTemplate";
+
+ var data = {
+ selectedTemplate: $scope.selectedTemplate
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+
+ if (response.data.status === 1) {
+ new PNotify({
+ title: 'Success.',
+ text: 'Template Successfully deleted.',
+ type: 'success'
+ });
+
+ } else {
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
+ };
+ $scope.deleteJob = function (id) {
+
+ $scope.cyberPanelLoading = false;
+
+ url = "/emailMarketing/deleteJob";
+
+ var data = {
+ id: id
+ };
+
+ var config = {
+ headers: {
+ 'X-CSRFToken': getCookie('csrftoken')
+ }
+ };
+
+ $http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
+
+
+ function ListInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ $scope.fetchJobs();
+
+ if (response.data.status === 1) {
+ new PNotify({
+ title: 'Success.',
+ text: 'Template Successfully deleted.',
+ type: 'success'
+ });
+
+ } else {
+
+ new PNotify({
+ title: 'Operation Failed!',
+ text: response.data.error_message,
+ type: 'error'
+ });
+
+ }
+
+ }
+
+ function cantLoadInitialDatas(response) {
+ $scope.cyberPanelLoading = true;
+ new PNotify({
+ title: 'Operation Failed!',
+ text: 'Could not connect to server, please refresh this page',
+ type: 'error'
+ });
+
+ }
+
};
});
\ No newline at end of file
diff --git a/emailMarketing/templates/emailMarketing/composeMessagesV2.html b/emailMarketing/templates/emailMarketing/composeMessagesV2.html
index 39532fdab..1b0695627 100644
--- a/emailMarketing/templates/emailMarketing/composeMessagesV2.html
+++ b/emailMarketing/templates/emailMarketing/composeMessagesV2.html
@@ -11,7 +11,7 @@
On this page you can compose email message to be sent
out later.
-
+
Compose Email Message
@@ -60,17 +60,17 @@
-
+
+ ng-model="emailMessage" rows="15" class="border w-full">
-
+
+ class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
Save Template
diff --git a/emailMarketing/templates/emailMarketing/manageListsV2.html b/emailMarketing/templates/emailMarketing/manageListsV2.html
index 9b4a59e4b..7b7b8ab8f 100644
--- a/emailMarketing/templates/emailMarketing/manageListsV2.html
+++ b/emailMarketing/templates/emailMarketing/manageListsV2.html
@@ -5,7 +5,7 @@
{% load static %}
-
+
-
+
Manage Email Lists
diff --git a/emailMarketing/templates/emailMarketing/manageSMTPHostsV2.html b/emailMarketing/templates/emailMarketing/manageSMTPHostsV2.html
index b8750bb61..f9312e858 100644
--- a/emailMarketing/templates/emailMarketing/manageSMTPHostsV2.html
+++ b/emailMarketing/templates/emailMarketing/manageSMTPHostsV2.html
@@ -12,7 +12,7 @@
used to send emails.
-
+
Manage SMTP Hosts
@@ -53,9 +53,9 @@
-
+
+ class="bg-orange-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
Save Host
diff --git a/emailMarketing/templates/emailMarketing/sendEmailsV2.html b/emailMarketing/templates/emailMarketing/sendEmailsV2.html
new file mode 100644
index 000000000..2c85c2b45
--- /dev/null
+++ b/emailMarketing/templates/emailMarketing/sendEmailsV2.html
@@ -0,0 +1,220 @@
+{% extends "baseTemplate/newBase.html" %}
+{% load i18n %}
+{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
+{% block newContent %}
+
+ {% load static %}
+
+
+
+
+
+
+
Send Emails
+
On this page you can send emails to the
+ lists you created using SMTP Hosts.
+
+
+
+
+
+
+
Send Emails
+
+
+
+
+
+
+
+
+ {% for items in templateNames %}
+ {{ items }}
+ {% endfor %}
+
+
+
+{#
#}
+
+
+
+{% endblock %}
diff --git a/emailMarketing/urls.py b/emailMarketing/urls.py
index d72904447..53960fbff 100755
--- a/emailMarketing/urls.py
+++ b/emailMarketing/urls.py
@@ -11,8 +11,9 @@ urlpatterns = [
url(r'^(?P
(.*))/emailListsV2$', views.createEmailListV2, name='createEmailListV2'),
url(r'^submitEmailList$', views.submitEmailList, name='submitEmailList'),
url(r'^(?P(.*))/manageLists$', views.manageLists, name='manageLists'),
+ url(r'^(?P(.*))/manageListsV2$', views.manageListsV2, name='manageListsV2'),
url(r'^(?P(.*))/manageSMTP$', views.manageSMTP, name='manageSMTP'),
- url(r'^V2/(?P(.*))/manageSMTPV2$', views.manageSMTPV2, name='manageSMTPV2'),
+ url(r'^(?P(.*))/manageSMTPV2$', views.manageSMTPV2, name='manageSMTPV2'),
url(r'^(?P(.*))/configureVerify$', views.configureVerify, name='configureVerify'),
url(r'^fetchEmails$', views.fetchEmails, name='fetchEmails'),
url(r'^deleteList$', views.deleteList, name='deleteList'),
@@ -22,8 +23,10 @@ urlpatterns = [
url(r'^fetchSMTPHosts$', views.fetchSMTPHosts, name='fetchSMTPHosts'),
url(r'^smtpHostOperations$', views.smtpHostOperations, name='smtpHostOperations'),
url(r'^composeEmailMessage$', views.composeEmailMessage, name='composeEmailMessage'),
+ url(r'^composeEmailMessageV2$', views.composeEmailMessageV2, name='composeEmailMessageV2'),
url(r'^saveEmailTemplate$', views.saveEmailTemplate, name='saveEmailTemplate'),
url(r'^sendEmails$', views.sendEmails, name='sendEmails'),
+ url(r'^sendEmailsV2$', views.sendEmailsV2, name='sendEmailsV2'),
url(r'^preview/(?P[-\w]+)/$', views.templatePreview, name='templatePreview'),
url(r'^fetchJobs$', views.fetchJobs, name='fetchJobs'),
url(r'^startEmailJob$', views.startEmailJob, name='startEmailJob'),
diff --git a/emailMarketing/views.py b/emailMarketing/views.py
index 8384f5b99..4b55f8365 100755
--- a/emailMarketing/views.py
+++ b/emailMarketing/views.py
@@ -71,6 +71,15 @@ def manageLists(request, domain):
return redirect(loadLoginPage)
+def manageListsV2(request, domain):
+ try:
+ userID = request.session['userID']
+ emm = EmailMarketingManager(request, domain)
+ return emm.manageListsV2()
+ except KeyError:
+ return redirect(loadLoginPage)
+
+
def configureVerify(request, domain):
try:
userID = request.session['userID']
@@ -188,6 +197,15 @@ def composeEmailMessage(request):
return redirect(loadLoginPage)
+def composeEmailMessageV2(request):
+ try:
+ userID = request.session['userID']
+ emm = EmailMarketingManager(request)
+ return emm.composeEmailMessageV2()
+ except KeyError:
+ return redirect(loadLoginPage)
+
+
def saveEmailTemplate(request):
try:
userID = request.session['userID']
@@ -206,6 +224,15 @@ def sendEmails(request):
return redirect(loadLoginPage)
+def sendEmailsV2(request):
+ try:
+ userID = request.session['userID']
+ emm = EmailMarketingManager(request)
+ return emm.sendEmailsV2()
+ except KeyError:
+ return redirect(loadLoginPage)
+
+
def templatePreview(request, templateName):
try:
userID = request.session['userID']
diff --git a/emailPremium/static/emailPremium/emailPremiumV2.js b/emailPremium/static/emailPremium/emailPremiumV2.js
index e4e1666c6..771ba5d57 100644
--- a/emailPremium/static/emailPremium/emailPremiumV2.js
+++ b/emailPremium/static/emailPremium/emailPremiumV2.js
@@ -140,7 +140,7 @@ newapp.controller('EmailDebuugerV2', function ($scope, $http, $timeout, $window)
$scope.Port993 = report.Port993;
$scope.Port995 = report.Port995;
//document.getElementById('MailSSLURL').href = 'https://' + report.serverHostName + ":" + report.port + '/cloudAPI/access?token=' + report.token + "&serverUserName=" + report.userName + '&redirect=/manageSSL/sslForMailServer';
- document.getElementById('MailSSLURL').href = '/manageSSL/sslForMailServer';
+ document.getElementById('MailSSLURLV2').href = '/manageSSL/V2/sslForMailServerV2';
$scope.ReportStatus = false;
diff --git a/emailPremium/templates/emailPremium/EmailDebuggerV2.html b/emailPremium/templates/emailPremium/EmailDebuggerV2.html
index 79d76c85b..109477282 100644
--- a/emailPremium/templates/emailPremium/EmailDebuggerV2.html
+++ b/emailPremium/templates/emailPremium/EmailDebuggerV2.html
@@ -117,7 +117,7 @@
{$ MailSSL $}
-
+
Issue Now
diff --git a/ftp/templates/ftp/createFTPAccountV2.html b/ftp/templates/ftp/createFTPAccountV2.html
index a7457f1b8..b3fb4c6b3 100644
--- a/ftp/templates/ftp/createFTPAccountV2.html
+++ b/ftp/templates/ftp/createFTPAccountV2.html
@@ -12,7 +12,7 @@
will be set as the path to ftp account.
-
+
Create FTP Account
diff --git a/mailServer/templates/mailServer/changeEmailPasswordV2.html b/mailServer/templates/mailServer/changeEmailPasswordV2.html
index 9120dca6e..71ca4ffcc 100644
--- a/mailServer/templates/mailServer/changeEmailPasswordV2.html
+++ b/mailServer/templates/mailServer/changeEmailPasswordV2.html
@@ -12,7 +12,7 @@
password.
-
+
Change Email Password
diff --git a/mailServer/templates/mailServer/dkimManagerV2.html b/mailServer/templates/mailServer/dkimManagerV2.html
index 85fca5d47..78b50752f 100644
--- a/mailServer/templates/mailServer/dkimManagerV2.html
+++ b/mailServer/templates/mailServer/dkimManagerV2.html
@@ -13,10 +13,12 @@
class="bg-blue-400 px-2 py-1 text-white font-semibold ml-3"
title="">
{% trans "DKIM Docs" %}
+
This page can be used to generate and view DKIM keys for
+ Domains
{% if openDKIMInstalled == 0 %}
-
+
DKIM Manager
@@ -63,9 +65,10 @@
{% else %}
-
+
+
DKIM Manager
+
+