Fix login -> move to bootstrap5

This commit is contained in:
Nico Schottelius 2021-05-25 20:22:18 +02:00
parent 485f08e25c
commit d872357dd1
3 changed files with 21 additions and 13 deletions

View file

@ -1,14 +1,19 @@
{% extends 'uncloud/base.html' %} {% extends 'uncloud/base.html' %}
{% load bootstrap4 %} {% load bootstrap5 %}
{% block body %}
<h1>Login to uncloud</h1> {% block bootstrap5_content %}
<form method="post" class="form"> <div class="container">
{% csrf_token %} <div id="content">
{% bootstrap_form form %} <h1>Login to uncloud</h1>
{% buttons %} <form method="post" class="form">
<button type="submit" class="btn btn-primary">Submit</button> {% csrf_token %}
{% endbuttons %} {% bootstrap_form form %}
</form> {% buttons %}
<button type="submit" class="btn btn-primary">Submit</button>
{% endbuttons %}
</form>
</div>
</div>
{% endblock %} {% endblock %}

View file

@ -13,12 +13,15 @@
By submitting I authorise to send instructions to By submitting I authorise to send instructions to
the financial institution that issued my card to take the financial institution that issued my card to take
payments from my card account in accordance with the payments from my card account in accordance with the
terms of my agreement with you. terms of my agreement with you.
</p> </p>
<span id="message"></span> <span id="message"></span>
<div id="card-element"></div> <div id="card-element"></div>
<div id="card-errors" role="alert"></div>
<button type='button' id="card-button">Save</button> <button type='button' id="card-button">Save</button>
<div id="ungleichmessage">The card will be registered with stripe.</div> <div id="ungleichmessage">The card will be registered with stripe.</div>
<div id="goback" style="display: none;"> <div id="goback" style="display: none;">
@ -30,8 +33,8 @@
<!-- Enable Stripe from UI elements - standard code --> <!-- Enable Stripe from UI elements - standard code -->
<script> <script>
var stripe = Stripe('{{ stripe_pk }}'); var stripe = Stripe('{{ stripe_pk }}');
var elements = stripe.elements(); var elements = stripe.elements();
var cardElement = elements.create('card'); var cardElement = elements.create('card');
cardElement.mount('#card-element'); cardElement.mount('#card-element');

View file

@ -2,4 +2,4 @@ from django.apps import AppConfig
class UngleichServiceConfig(AppConfig): class UngleichServiceConfig(AppConfig):
name = 'ungleich_service' name = 'uncloud_service'