feat: admin panel enrichment
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Sign-in failed{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-hero" aria-labelledby="auth-error-heading">
|
||||
<div class="container">
|
||||
<div class="page-hero-content">
|
||||
<h1 class="page-hero-title" id="auth-error-heading">Sign-in failed</h1>
|
||||
<p class="page-hero-subtitle">We could not complete third-party authentication.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container container--narrow">
|
||||
<div class="glass-card portal-card fade-in">
|
||||
<div class="form-errors">
|
||||
{% trans "An error occurred while attempting to sign in with your third-party account." %}
|
||||
</div>
|
||||
<p class="portal-intro">
|
||||
{% trans "Please try again, or sign in with your email and password." %}
|
||||
</p>
|
||||
<div class="portal-actions">
|
||||
<a href="{% url 'accounts:login' %}" class="btn-primary">Back to login</a>
|
||||
<a href="{% url 'pages:contact' %}" class="btn-ghost">Contact support</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,80 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% if process == "connect" %}Connect {{ provider.name }}{% else %}Continue with {{ provider.name }}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block meta_description %}Secure sign-in with {{ provider.name }} for your Tecvico client portal.{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-hero" aria-labelledby="social-login-heading">
|
||||
<div class="page-hero-blobs" aria-hidden="true">
|
||||
<div class="blob blob--1"></div>
|
||||
<div class="blob blob--2"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="page-hero-content">
|
||||
<div class="section-badge">Client Portal</div>
|
||||
<h1 class="page-hero-title" id="social-login-heading">
|
||||
{% if process == "connect" %}
|
||||
Connect {{ provider.name }}
|
||||
{% else %}
|
||||
Sign in with {{ provider.name }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
<p class="page-hero-subtitle">
|
||||
{% if process == "connect" %}
|
||||
Link your {{ provider.name }} account to your Tecvico profile.
|
||||
{% else %}
|
||||
You will be redirected to {{ provider.name }} to verify your identity.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container container--narrow">
|
||||
<div class="glass-card portal-card fade-in social-oauth-card">
|
||||
<div class="social-oauth-provider social-oauth-provider--{{ provider.id }}">
|
||||
<span class="social-oauth-provider-icon" aria-hidden="true">
|
||||
{% if provider.id == "google" %}G{% else %}GH{% endif %}
|
||||
</span>
|
||||
<div>
|
||||
<h2 class="social-oauth-provider-title">{{ provider.name }}</h2>
|
||||
<p class="social-oauth-provider-copy">
|
||||
{% if process == "connect" %}
|
||||
{% blocktrans with provider_name=provider.name %}You are about to connect a {{ provider_name }} account to Tecvico.{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans with provider_name=provider.name %}Continue to authorize access with your {{ provider_name }} account.{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="social-oauth-steps">
|
||||
<li>Redirect to {{ provider.name }}</li>
|
||||
<li>Approve access</li>
|
||||
<li>Return to your project dashboard</li>
|
||||
</ul>
|
||||
|
||||
<form method="post" class="social-oauth-form">
|
||||
{% csrf_token %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<button type="submit" class="btn-primary btn-submit social-oauth-continue">
|
||||
Continue to {{ provider.name }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="portal-footer-text">
|
||||
<a href="{% url 'accounts:login' %}">Back to login</a>
|
||||
·
|
||||
<a href="{% url 'pages:home' %}">Home</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Login cancelled{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-hero" aria-labelledby="cancelled-heading">
|
||||
<div class="container">
|
||||
<div class="page-hero-content">
|
||||
<h1 class="page-hero-title" id="cancelled-heading">Login cancelled</h1>
|
||||
<p class="page-hero-subtitle">No changes were made to your account.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container container--narrow">
|
||||
<div class="glass-card portal-card fade-in">
|
||||
<p class="portal-intro">
|
||||
{% trans "You cancelled third-party sign-in. You can try again or use email login instead." %}
|
||||
</p>
|
||||
<div class="portal-actions">
|
||||
<a href="{% url 'accounts:login' %}" class="btn-primary">Back to login</a>
|
||||
<a href="{% url 'pages:home' %}" class="btn-ghost">Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Redirecting to {{ provider }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="container container--narrow">
|
||||
<div class="glass-card portal-card fade-in social-oauth-redirect">
|
||||
<div class="social-oauth-spinner" aria-hidden="true"></div>
|
||||
<h1 class="contact-form-title">Redirecting to {{ provider }}</h1>
|
||||
<p class="portal-intro">{% trans "Please wait while we connect you securely." %}</p>
|
||||
<p class="portal-footer-text">
|
||||
<a href="{{ redirect_to }}" class="portal-link">{% trans "Continue manually" %}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script>window.location.replace("{{ redirect_to|escapejs }}");</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,57 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Complete sign up{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="page-hero" aria-labelledby="social-signup-heading">
|
||||
<div class="page-hero-blobs" aria-hidden="true">
|
||||
<div class="blob blob--1"></div>
|
||||
<div class="blob blob--2"></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="page-hero-content">
|
||||
<div class="section-badge">Client Portal</div>
|
||||
<h1 class="page-hero-title" id="social-signup-heading">Complete your account</h1>
|
||||
<p class="page-hero-subtitle">
|
||||
{% blocktrans with provider_name=account.get_provider.name %}Finish setup after signing in with {{ provider_name }}.{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container container--narrow">
|
||||
<div class="glass-card portal-card fade-in">
|
||||
<form method="post" action="{% url 'socialaccount_signup' %}" novalidate>
|
||||
{% csrf_token %}
|
||||
{{ redirect_field }}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<div class="form-errors">{{ form.non_field_errors }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% for field in form %}
|
||||
<div class="form-group{% if field.errors %} has-error{% endif %}">
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}{% if field.field.required %} <span class="required-star">*</span>{% endif %}</label>
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<button type="submit" class="btn-primary btn-submit">Create account</button>
|
||||
</form>
|
||||
|
||||
<p class="portal-footer-text"><a href="{% url 'accounts:login' %}">Back to login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script>
|
||||
document.querySelectorAll(".portal-card input, .portal-card select, .portal-card textarea").forEach(function (el) {
|
||||
el.classList.add("form-control");
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user