Skip to content

Commit a044c18

Browse files
committed
update cancel subscription page
1 parent 8c7f62d commit a044c18

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

layouts/page/cancel-subscription.html

+19-3
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,27 @@ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
4444

4545
function onFormSubmit() {
4646
if (cancel_subscription_form_submitted) {
47-
window.location = "https://octabyte.io";
47+
const message = document.getElementById("message");
48+
const submitBtn = document.getElementById("submit-btn");
49+
50+
submitBtn.style.display = "none";
51+
message.style.display = "block";
52+
53+
setTimeout(() => {
54+
window.location = "https://octabyte.io";
55+
}, 3000);
4856
}
4957
}
5058

5159
function submitForm(e) {
5260
const errorMessage = document.getElementById("error-message");
5361
const serviceInput = document.getElementById("service-name");
5462

55-
if (serviceInput.value.trim() != serviceName) {
63+
errorMessage.style.display = "none";
64+
65+
if (
66+
serviceInput.value.trim().toLowerCase() != serviceName.toLowerCase()
67+
) {
5668
errorMessage.style.display = "block";
5769
e.preventDefault();
5870
}
@@ -99,7 +111,11 @@ <h2 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
99111

100112
<div class="mt-10">
101113
<p id="error-message" class="mt-2 text-sm text-red-500 hidden">
102-
Please enter a valid service name.
114+
Please enter a same service name to confirm.
115+
</p>
116+
<p id="message" class="mt-2 text-sm text-green-700">
117+
Your request to cancel the subscription has been successfully sent.
118+
Redirecting to octabyte.io...
103119
</p>
104120
<button
105121
onclick="submitForm(event)"

0 commit comments

Comments
 (0)