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,7 +1,10 @@
{% extends 'uncloud/base.html' %} {% extends 'uncloud/base.html' %}
{% load bootstrap4 %} {% load bootstrap5 %}
{% block body %}
{% block bootstrap5_content %}
<div class="container">
<div id="content">
<h1>Login to uncloud</h1> <h1>Login to uncloud</h1>
<form method="post" class="form"> <form method="post" class="form">
{% csrf_token %} {% csrf_token %}
@ -10,5 +13,7 @@
<button type="submit" class="btn btn-primary">Submit</button> <button type="submit" class="btn btn-primary">Submit</button>
{% endbuttons %} {% endbuttons %}
</form> </form>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -17,8 +17,11 @@
</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'