Properly indent all templates
parent
4bd2bb2f1a
commit
ef22f9165e
@ -1,60 +1,51 @@
|
||||
<head>
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
</head>
|
||||
<div class="product-container">
|
||||
<a href="order?product=drilldown">
|
||||
<div class="product">
|
||||
<img
|
||||
src="{{ url_for('static', filename='weekly.jpg') }}"
|
||||
alt="Data image"
|
||||
/>
|
||||
<div class="description">
|
||||
<h3>Drilldown</h3>
|
||||
<h5>200.00</h5>
|
||||
</div>
|
||||
<div class="product-container">
|
||||
<a href="order?product=drilldown">
|
||||
<div class="product">
|
||||
<img src="{{ url_for('static', filename='weekly.jpg') }}" alt="Data image"/>
|
||||
<div class="description">
|
||||
<h3>Drilldown</h3>
|
||||
<h5>200.00</h5>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="order?product=sentiment">
|
||||
<div class="product">
|
||||
<img
|
||||
src="{{ url_for('static', filename='weekly.jpg') }}"
|
||||
alt="Data image"
|
||||
/>
|
||||
<div class="description">
|
||||
<h3>Sentiment</h3>
|
||||
<h5>45.00</h5>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="order?product=sentiment">
|
||||
<div class="product">
|
||||
<img src="{{ url_for('static', filename='weekly.jpg') }}" alt="Data image"/>
|
||||
<div class="description">
|
||||
<h3>Sentiment</h3>
|
||||
<h5>45.00</h5>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Create an instance of the Stripe object with your publishable API key
|
||||
var stripe = Stripe("pk_test_51HbqYzAKLUD9ELc0KSyiQ9YohsfiUCeBpAfpflAIg2Uu2RFecx3sfWYXzM1xDtI5XlQihqHMnaPKd45JzDuqXdGP00pYWvRvRe");
|
||||
var setupButton = document.getElementById('setup-button');
|
||||
setupButton.addEventListener("click", function () {
|
||||
fetch("/setup-bacs", {
|
||||
method: "POST",
|
||||
<script type="text/javascript">
|
||||
// Create an instance of the Stripe object with your publishable API key
|
||||
var stripe = Stripe("pk_test_51HbqYzAKLUD9ELc0KSyiQ9YohsfiUCeBpAfpflAIg2Uu2RFecx3sfWYXzM1xDtI5XlQihqHMnaPKd45JzDuqXdGP00pYWvRvRe");
|
||||
var setupButton = document.getElementById('setup-button');
|
||||
setupButton.addEventListener("click", function () {
|
||||
fetch("/setup-bacs", {
|
||||
method: "POST",
|
||||
})
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (session) {
|
||||
return stripe.redirectToCheckout({ sessionId: session.id });
|
||||
})
|
||||
.then(function (result) {
|
||||
// If redirectToCheckout fails due to a browser or network
|
||||
// error, you should display the localized error message to your
|
||||
// customer using error.message.
|
||||
if (result.error) {
|
||||
alert(result.error.message);
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (session) {
|
||||
return stripe.redirectToCheckout({ sessionId: session.id });
|
||||
})
|
||||
.then(function (result) {
|
||||
// If redirectToCheckout fails due to a browser or network
|
||||
// error, you should display the localized error message to your
|
||||
// customer using error.message.
|
||||
if (result.error) {
|
||||
alert(result.error.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
.catch(function (error) {
|
||||
console.error("Error:", error);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -1,18 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
Access denied
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Sorry, you do not have the necessary permissions to view this page.
|
||||
</h2>
|
||||
<div class="col">
|
||||
<h1 class="title">Access denied</h1>
|
||||
<h2 class="subtitle">Sorry, you do not have the necessary permissions to view this page.</h2>
|
||||
<div class="col">
|
||||
{% if user.subscription_active %}
|
||||
{% include 'checkout.html' %}
|
||||
{% include 'checkout.html' %}
|
||||
{% else %}
|
||||
<h2> Please setup a payment mandate in the profile page to view products </h2>
|
||||
<h2> Please setup a payment mandate in the profile page to view products </h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,18 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
Pathogen Products Panel
|
||||
</h1>
|
||||
<h2 class="subtitle">
|
||||
Billing and subscription management
|
||||
</h2>
|
||||
<div class="col">
|
||||
<h1 class="title">Pathogen Products Panel</h1>
|
||||
<h2 class="subtitle">Billing and subscription management</h2>
|
||||
<div class="col">
|
||||
{% if user.subscription_active %}
|
||||
{% include 'checkout.html' %}
|
||||
{% include 'checkout.html' %}
|
||||
{% else %}
|
||||
<h2> Please setup a payment mandate in the profile page to view products </h2>
|
||||
<h2> Please setup a payment mandate in the profile page to view products </h2>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,31 +1,31 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<div class="row vertical-offset-100">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Please sign in</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<img class="logo" src="{% static 'logo.svg' %}">
|
||||
<form method="POST">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Please sign in</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<img class="logo" src="{% static 'logo.svg' %}">
|
||||
<form method="POST">
|
||||
<fieldset>
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
|
||||
<input class="btn btn-lg btn-dark btn-block" type="submit" value="Login">
|
||||
<div class="register">
|
||||
<p>Don't have an account? <a href="{% url 'signup' %}">Register here</a></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<input class="btn btn-lg btn-dark btn-block" type="submit" value="Login">
|
||||
<div class="register">
|
||||
<p>Don't have an account? <a href="{% url 'signup' %}">Register here</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,34 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h1 class="title">
|
||||
Welcome to search, {{ name }}!
|
||||
</h1>
|
||||
<h1 class="title">Welcome to search, {{ name }}!</h1>
|
||||
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="col">
|
||||
<div class="profile-info">
|
||||
<p>PROFILE INFO</p>
|
||||
|
||||
<p>PROFILE INFO</p>
|
||||
</div>
|
||||
|
||||
<div class="update-info">
|
||||
{% if user.seti %}
|
||||
{% if user.plan == None %}
|
||||
{% include 'checkout.html' %}
|
||||
{% else %}
|
||||
<form>
|
||||
<button id="button" formaction="/portal">Customer portal</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button id="setup-button">Setup payment mandate</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if user.seti %}
|
||||
{% if user.plan == None %}
|
||||
{% include 'checkout.html' %}
|
||||
{% else %}
|
||||
<form>
|
||||
<button id="button" formaction="/portal">Customer portal</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<button id="setup-button">Setup payment mandate</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
Reference in New Issue