Files
goodtimes/templates/stripe_html/active_subscription.html
2024-08-12 15:08:55 +05:30

159 lines
4.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Active Subscription</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
body {
background-color: var(--black);
color: var(--white);
font-family: 'Poppins', sans-serif;
}
.container {
padding: 40px 15px;
}
.card {
background-color: var(--light-black);
border: 1px solid var(--main-yellow);
border-radius: 8px;
margin-top: 20px;
padding: 20px;
}
.card-header {
background-color: transparent;
border-bottom: 1px solid var(--main-yellow);
}
.card-title {
font-size: 1.5rem;
color: var(--main-yellow);
}
.card-body {
font-size: 1rem;
color: var(--white-mix);
}
.btn {
background: linear-gradient(90.02deg, #CDA34C 0.02%, #F1D6A0 52%, #D1A956 98.68%);
border: none;
padding: 10px 20px;
font-size: 1rem;
font-weight: 600;
color: var(--black);
border-radius: 5px;
margin-top: 20px;
}
.btn-cancel {
background-color: #dc3545;
color: var(--white);
}
.cancel-details {
background-color: #111;
color: #bbb;
padding: 15px;
margin-top: 20px;
border-radius: 8px;
}
@media (max-width: 768px) {
.card-title {
font-size: 1.25rem;
}
.btn {
width: 100%;
text-align: center;
}
}
.bg-dark {
background-color: #000 !important;
}
.text-light {
color: #f8f9fa !important;
}
.text-gold {
color: #d4af37 !important;
}
.border-gold {
border: 2px solid #d4af37 !important;
}
.border-bottom-gold {
border-bottom: 2px solid #d4af37 !important;
}
.btn-outline-gold {
color: #d4af37;
border-color: #d4af37;
}
.btn-outline-gold:hover {
background-color: #d4af37;
color: #000;
}
</style>
</head>
<body>
<header class="text-center py-3">
<h1 class="text-gold">Your Active Subscription</h1>
</header>
<div class="container">
<div class="card bg-dark text-light border-gold">
<div class="card-header border-bottom-gold">
<h2 class="card-title text-gold">{{ active_subscription.subscription.title }}</h2>
</div>
<div class="card-body">
<h5 class="text-gold">Principal:</h5>
<p>{{ active_subscription.principal.first_name }} {{ active_subscription.principal.last_name }}</p>
<p><strong>Status:</strong> {{ active_subscription.get_status_display }}</p>
<p><strong>Start Date:</strong> {{ active_subscription.start_date }}</p>
<p><strong>End Date:</strong> {{ active_subscription.end_date }}</p>
<p><strong>Auto Renew:</strong> {{ active_subscription.auto_renew|yesno:"Yes,No" }}</p>
{% if active_subscription.coupon_code %}
<p><strong>Coupon Code:</strong> {{ active_subscription.coupon_code }}</p>
{% endif %}
{% if active_subscription.cancelled %}
<div class="cancel-details mt-4">
<h3 class="text-gold">Cancellation Details</h3>
<p><strong>Cancelled:</strong> Yes</p>
<p><strong>Cancellation Date:</strong> {{ active_subscription.cancelled_date_time }}</p>
<p><strong>Grace Period Ends:</strong> {{ active_subscription.grace_period_end_date }}</p>
</div>
{% endif %}
{% if active_subscription.auto_renew and not active_subscription.cancelled %}
<div class="cancel-details mt-4">
<h3 class="text-gold">Cancel Subscription</h3>
<form method="POST" action="{% url 'manage_subscriptions:cancel_subscription' %}">
{% csrf_token %}
<input type="hidden" name="subscription_id" value="{{ active_subscription.stripe_subscription_id }}">
<button type="submit" class="btn btn-outline-gold">Cancel Subscription</button>
</form>
</div>
{% endif %}
</div>
</div>
</div>
</body>
</html>