Skip to content

Commit

Permalink
commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
zarakkhan209 committed Dec 29, 2023
1 parent 4c79358 commit e4aa186
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 20 deletions.
31 changes: 16 additions & 15 deletions websiteFunctions/static/websiteFunctions/websiteFunctionsV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3770,25 +3770,26 @@ newapp.controller('WPAddNewPluginV2', function ($scope, $http, $timeout, $window
}

});
function openModal() {
const modal = document.getElementById("myModal");
modal.classList.remove("hidden");
}

function closeModal() {
const modal = document.getElementById("myModal");
modal.classList.add("hidden");
}

document.addEventListener("DOMContentLoaded", function () {
const openModalButton = document.getElementById("openModalButton");
const closeModalButton = document.getElementById("closeModalButton");
function DeleteWPNowV2(url) {
const modal = document.getElementById("deleteWpModel");
$('#deleteWpModel').modal('show');
// modal.classList.remove("hidden");
}

openModalButton.addEventListener("click", openModal);
closeModalButton.addEventListener("click", closeModal);
});
function closeModal() {
const modal = document.getElementById("myModal");
$('#myModal').modal('hide');
// modal.classList.add("hidden");
}

document.addEventListener("DOMContentLoaded", function () {
const openModalButton = document.getElementById("openModalButton");
const closeModalButton = document.getElementById("closeModalButton");

openModalButton.addEventListener("click", openModal);
closeModalButton.addEventListener("click", closeModal);
});


// function openModalDelete() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
<th class="w-52 pt-2 font-semibold text-sm">
<div class="flex items-center justify-center">
<button id="openModalButton"
onclick="DeleteWPNow('{% url 'ListWPSites' %}?DeleteID={{ sub.id }}')"
onclick="DeleteWPNowV2('{% url 'ListWPSites' %}?DeleteID={{ sub.id }}')"
class="bg-orange-500 hover:bg-orange-700 text-white font-bold py-2 px-4 rounded">
Delete
</button>

<div id="myModal" class="fixed inset-0 bg-black bg-opacity-50 hidden">
<div id="deleteWpModel" class="fixed inset-0 bg-black bg-opacity-50 hidden">
<div class="flex items-center justify-center h-full">
<div class="bg-white p-8 rounded max-w-md">
<h2 class="text-lg font-bold mb-4">Delete WordPress
Expand Down
41 changes: 38 additions & 3 deletions websiteFunctions/templates/websiteFunctions/createWebsiteV2.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<p class="text-xl font-bold">Website Details</p>
</div>
<hr>
<div>
<div ng-hide="installationDetailsForm">
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-48">Select Package</p>
Expand Down Expand Up @@ -134,8 +134,43 @@
</div>
</div>
</div>
<div class="flex justify-center">
<button ng-click="goBack()" class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">Create Website</button>
<div ng-hide="installationDetailsForm" class="flex justify-center">
<button ng-disabled="websiteCreationForm.dom.$error.required || websiteCreationForm.email.$invalid"
ng-click="createWebsite()"
class="bg-orange-500 px-3 py-4 rounded-lg text-xl font-semibold text-white">
Create Website
</button>
</div>
<div ng-hide="installationProgress" class="form-group">

<div class="flex justify-center font-bold text-xl">
<h2>{$ currentStatus $}</h2>
</div>
<div class="w-full bg-gray-100 rounded-full mt-3">
<div id="installProgress"
class="bg-green-600 text-xs font-medium text-white text-center p-2 leading-none rounded-full"
style="width:0%">
</div>
</div>
<div ng-hide="errorMessageBox" class="flex justify-center font-bold text-xl mt-3">
<h2>{$ errorMessage $}</h2>
</div>
<div ng-hide="success" class="flex justify-center font-bold text-xl mt-3">
<h2>Website succesfully created.</h2>
</div>
<div ng-hide="couldNotConnect" class="flex justify-center font-bold text-xl mt-3">
<h2>Could not connect to server. Please refresh this page.</h2>
</div>


</div>

<div ng-hide="installationProgress" class="flex justify-center mt-3">
<button ng-disabled="goBackDisable"
ng-click="goBack()"
class="bg-blue-500 px-3 py-2 rounded-lg text-xl font-semibold text-white">
Go Back
</button>
</div>
</div>
{% endblock %}

0 comments on commit e4aa186

Please sign in to comment.