From 4cb15e4c9f75b8dcc8d53b12e55ab646395ee01f Mon Sep 17 00:00:00 2001 From: Zarak Khan Date: Thu, 1 Feb 2024 12:56:20 +0500 Subject: [PATCH] Error in File Manager --- dns/static/dns/dnsV2.js | 21 +- .../dns/addDeleteDNSRecordsCloudFlareV2.html | 517 ++++++++++++++++-- .../templates/filemanager/indexv2.html | 387 +++++++++++-- 3 files changed, 840 insertions(+), 85 deletions(-) diff --git a/dns/static/dns/dnsV2.js b/dns/static/dns/dnsV2.js index e281cdcfe..db8b6abb0 100644 --- a/dns/static/dns/dnsV2.js +++ b/dns/static/dns/dnsV2.js @@ -1274,4 +1274,23 @@ newapp.controller('addModifyDNSRecordsV2', function ($scope, $http) { } -); \ No newline at end of file +); +var dnsTabButton = document.getElementById("dns_tab_button"); +var apiTabButton = document.getElementById("api_tab_button"); +function changeBackgroundColor(button) { + var allButtons = document.querySelectorAll('.flex li'); + allButtons.forEach(function (btn) { + btn.classList.remove('bg-orange-400','text-white', 'show'); + btn.classList.add('bg-white'); + }); + + button.classList.add('bg-orange-400','text-white', 'show'); +} + +dnsTabButton.addEventListener("click", function () { + changeBackgroundColor(dnsTabButton); +}); + +apiTabButton.addEventListener("click", function () { + changeBackgroundColor(apiTabButton); +}); diff --git a/dns/templates/dns/addDeleteDNSRecordsCloudFlareV2.html b/dns/templates/dns/addDeleteDNSRecordsCloudFlareV2.html index f636d8242..e6f2ed385 100644 --- a/dns/templates/dns/addDeleteDNSRecordsCloudFlareV2.html +++ b/dns/templates/dns/addDeleteDNSRecordsCloudFlareV2.html @@ -26,54 +26,501 @@

{% trans "PowerDNS is disabled." %} {% else %} -
-
-

Add Records

- + {% if not CloudFlare %} +
+
+

CloudFlare Email

+
+
+ +
+
+
+
+

API Token

+
+
+ +
+
+
+
+

Sync local Records to CloudFlare

+
+
+ +
+
+ +
+ +
-
+ {% else %}
-
+
+

Add Records

+ +
+ +
+
-

CloudFlare Email

+
+
+
+

Select Domain

+
+
+ +
+
+ +
+
+
-
- +
+
+ +
+
+
+
+
+

Name

+ +
+
+

TTL

+ +
+
+

IP Address

+ +
+
+
+ +
+
+ + + + + + + + +
-
-
-
-

API Token

+
+
+
+

CloudFlare Email

+
+
+ +
-
- +
+
+

API Token

+
+
+ +
-
-
-
-

Sync local Records to CloudFlare

+
+
+

Sync local Records to CloudFlare

+
+
+ +
-
- + +
+
- -
- +
+
+
+

{% trans "Cannot fetch records. Error message:" %}{$ errorMessage $}

+
+
+

{% trans "Cannot add record. Error message: " %}{$ errorMessage $}

+
+
+

{% trans "Records successfully fetched for" %} {$ domainFeteched + $}

+
+
+

{% trans "Record Successfully Deleted" %}

+
+
+

{% trans "Cannot delete record. Error message:" %} {$ errorMessage $}

+
+
+

{% trans "Record Successfully Added." %}

+
+
+

{% trans "Could not connect to server. Please refresh this page." %}

-
+ {% endif %} {% endif %}
{% endblock %} diff --git a/filemanager/templates/filemanager/indexv2.html b/filemanager/templates/filemanager/indexv2.html index d990f9077..1fc2ad5d7 100644 --- a/filemanager/templates/filemanager/indexv2.html +++ b/filemanager/templates/filemanager/indexv2.html @@ -3,31 +3,31 @@ {% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %} {% block newContent %} -{# #} -{# {% trans "File Manager - CyberPanel" %}#} -{# #} -{# #} -{# #} -{##} -{# {% load static %}#} -{# #} -{##} -{# #} -{##} -{##} -{# #} -{# #} -{# #} -{# #} -{# #} -{##} -{# #} -{# #} -{##} -{##} -{# #} -{##} -{# #} + {# #} + {# {% trans "File Manager - CyberPanel" %}#} + {# #} + {# #} + {# #} + {##} + {# {% load static %}#} + {# #} + {##} + {# #} + {##} + {##} + {# #} + {# #} + {# #} + {# #} + {# #} + {##} + {# #} + {# #} + {##} + {##} + {# #} + {##} + {# #}
@@ -66,8 +66,7 @@
  • {% trans "Upload" %} + data-modal-toggle="upload"> {% trans "Upload" %}
  • {% trans "Delete" %} +
  • - {% trans "Copy" %} +
  • - {% trans "Move" %} +
  • {% trans "Rename" %} +
  • {% trans "Edit" %} + href="#" data-modal-target="edit" data-modal-toggle="edit"> {% trans "Edit" %} +
  • {% trans "Compress" %} +
  • {% trans "Extract" %} + href="#" data-modal-target="extract" data-modal-toggle="extract"> {% trans "Extract" %} + +