diff --git a/Website/main.py b/Website/main.py index b969286..2fb912e 100644 --- a/Website/main.py +++ b/Website/main.py @@ -3406,6 +3406,26 @@ def logout(): flash('Logged out successfully', 'info') return redirect(url_for('login')) +@app.route('/booking_payment_async', methods=['POST']) +def booking_payment_async(): + # ... Speichere Daten in DB ... + # ... Starte das manage-tenants.sh Skript ASYNCHRON (z.B. Celery) ... + return jsonify({"success": True, "tenant_slug": request.form['tenant_slug']}), 200 + + +@app.route('/instance_request/status') +def tenant_status(): + slug = request.args.get('slug') + # Prüfe in der Datenbank, ob das Skript für diesen Slug schon fertig ist + if ist_fertig(slug): + return jsonify({ + "status": "ready", + "url": f"https://{slug}.invario-software.de", + "username": "admin", + "password": generiertes_passwort + }) + else: + return jsonify({"status": "pending"}) def main(): app.run(host="0.0.0.0", port=4999, debug=False) diff --git a/Website/templates/schnell_buchung.html b/Website/templates/schnell_buchung.html index 8e723c3..c375a43 100644 --- a/Website/templates/schnell_buchung.html +++ b/Website/templates/schnell_buchung.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Buchung prüfen{% endblock %} +{% block title %}Buchung prüfen & abschließen{% endblock %} {% block head %} {{ super() }} @@ -17,6 +17,8 @@ border-radius: 26px; padding: clamp(1.4rem, 2.6vw, 2.2rem); box-shadow: 0 18px 44px rgba(18, 49, 54, 0.08); + position: relative; + overflow: hidden; } .booking-review__eyebrow { @@ -31,11 +33,6 @@ margin-bottom: 1rem; } - .booking-review__lead { - margin-top: 0.75rem; - max-width: 66ch; - } - .booking-review__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); @@ -54,7 +51,6 @@ display: block; font-size: 0.88rem; font-weight: 700; - letter-spacing: 0.03em; text-transform: uppercase; color: #5e757d; margin-bottom: 0.45rem; @@ -75,12 +71,24 @@ line-height: 1.65; } + /* Formular Styles */ .booking-review__form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1.25rem; } + + .booking-review__section-title { + grid-column: 1 / -1; + font-size: 1.15rem; + color: #166271; + margin-top: 1.5rem; + margin-bottom: 0.2rem; + border-bottom: 2px solid #e8f4f4; + padding-bottom: 0.5rem; + font-weight: 700; + } .booking-review__field { display: flex; @@ -98,18 +106,34 @@ font-size: 0.93rem; } - .booking-review__field input, - .booking-review__field textarea { + .booking-review__field input { border: 1px solid #cedbdd; border-radius: 12px; background: #ffffff; color: #173a42; padding: 0.75rem 0.82rem; } - - .booking-review__field textarea { - min-height: 110px; - resize: vertical; + + .input-group--subdomain { + display: flex; + align-items: center; + } + + .input-group--subdomain input { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: none; + flex-grow: 1; + } + + .input-group--subdomain .domain-suffix { + background: #e8f4f4; + border: 1px solid #cedbdd; + padding: 0.75rem 0.82rem; + border-top-right-radius: 12px; + border-bottom-right-radius: 12px; + color: #5e757d; + font-weight: 600; } .booking-review__consent { @@ -130,13 +154,6 @@ .booking-review__consent input { margin-top: 0.2rem; - width: auto; - flex: 0 0 auto; - } - - .booking-review__consent a { - color: #0a4c74; - text-decoration: underline; } .booking-review__actions { @@ -146,26 +163,78 @@ margin-top: 1.5rem; } - .booking-review__actions .btn, - .booking-review__actions a { - width: auto; - min-width: 190px; + /* NEU: Loading State UI */ + #setup-loading-state, + #setup-success-state { + display: none; + text-align: center; + padding: 3rem 1rem; + } + + .spinner { + width: 60px; + height: 60px; + border: 5px solid #e8f4f4; + border-top-color: #166271; + border-radius: 50%; + animation: spin 1s linear infinite; + margin: 0 auto 2rem; + } + + @keyframes spin { 100% { transform: rotate(360deg); } } + + .status-messages { + font-size: 1.1rem; + color: #49626b; + font-weight: 600; + height: 2rem; + } + + /* NEU: Success State UI */ + .success-icon { + width: 70px; + height: 70px; + background: #1b8a3e; + color: white; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 2rem; + margin: 0 auto 1.5rem; + } + + .credentials-box { + background: #173a42; + color: white; + border-radius: 12px; + padding: 1.5rem; + margin: 1.5rem auto; + max-width: 400px; + text-align: left; + } + + .credentials-box code { + display: block; + background: rgba(255,255,255,0.1); + padding: 0.5rem; + border-radius: 6px; + margin-top: 0.3rem; + font-size: 1.1rem; + user-select: all; + } + + .warning-text { + color: #b02a37; + font-weight: 700; + background: #f8d7da; + padding: 1rem; + border-radius: 8px; + margin-bottom: 1.5rem; } @media (max-width: 720px) { - .booking-review__grid { - grid-template-columns: 1fr; - } - - .booking-review__form-grid { - grid-template-columns: 1fr; - } - - .booking-review__actions .btn, - .booking-review__actions a { - width: 100%; - min-width: 0; - } + .booking-review__grid, .booking-review__form-grid { grid-template-columns: 1fr; } } {% endblock %} @@ -173,123 +242,278 @@ {% block content %}
- Buchung prüfen -

{{ title }}

-

{{ intro }}

+ + + + +
+ Buchung prüfen & abschließen +

{{ title }}

+ +
+
+ Paket +
{{ package }}
+
+
+ Preis +
{{ package_price }} €
Kauf auf Rechnung (30 Tage)
+
+
-
-
- Paket -
{{ package }}
-
-
- Preis -
{{ package_price }} €
-
-
- Angemeldet als -
{{ display_name }}
+
+ Die Software-Instanz wird nach dem Absenden sofort für 30 Tage freigeschaltet. Die finale Laufzeit aktiviert sich automatisch nach Zahlungseingang durch Ihren Schulträger.
+ + +
+ + +
+
1. Angaben zur Schule & Ansprechpartner
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
2. Rechnungsadresse (Schulträger)
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
3. Technische Einrichtung
+
+ +
+ + .euresoftware.de +
+
+
+ + +
+ + + + +
+ +
+
-
- Bitte prüfen Sie die Angaben noch einmal. Wenn alles korrekt ist, senden sie ihre Informationen mit dem folgenden Button an uns, wir senden ihnen frühstmöglich eine Rechnung per Email. + + + +
+

Instanz wird bereitgestellt

+

Ihre Bestellung war erfolgreich. Die Rechnung wird gerade verschickt.

+
+
Validierung der Daten...
+

Bitte schließen Sie dieses Fenster nicht. Dies dauert in der Regel 15-30 Sekunden.

-
- - - -
-
- - -
-
- - -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- + + + +
+
✓
+

Ihre Schule ist online!

+

Das Setup wurde erfolgreich abgeschlossen. Sie können sich nun einloggen.

+ +
+ Aus Datenschutzgründen (AVV) müssen Sie das generierte Passwort nach dem ersten Login zwingend ändern!
-
- - Zurück zu den Preisen +
+

Login-URL:
-

+

Benutzername (Admin): -

+

Initial-Passwort: -

- + + Jetzt zur Schulplattform wechseln +
+
+