Compare commits
2 commits
2baa3fd5ec
...
7682dc94c7
Author | SHA1 | Date | |
---|---|---|---|
7682dc94c7 | |||
e06b472d62 |
5 changed files with 94 additions and 87 deletions
|
@ -6,48 +6,40 @@
|
|||
{% translate "Sign In" %}
|
||||
{% endblock page_title %}
|
||||
{% endblock html_title %}
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
{% if SOCIALACCOUNT_ENABLED %}
|
||||
{% get_providers as socialaccount_providers %}
|
||||
{% if socialaccount_providers %}
|
||||
{% for provider in socialaccount_providers %}
|
||||
{% provider_login_url provider process=process scope=scope auth_params=auth_params as href %}
|
||||
<form method="post" action="{{ href }}">
|
||||
{% csrf_token %}
|
||||
<button href="{{ href }}"
|
||||
class="btn btn-warning btn-lg icon icon-left"
|
||||
title="{{ provider.name }}">
|
||||
<img src="{% static 'img/keycloak.svg' %}" style="height: 30px">
|
||||
<span class="mx-1">{% translate "Sign in with your" %} {{ provider.name }}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="mt-2">
|
||||
<a data-bs-toggle="collapse"
|
||||
href="#login-form"
|
||||
role="button"
|
||||
aria-controls="login-form"
|
||||
class="d-flex align-items-center">
|
||||
<i class="bi bi-chevron-right me-2 ms-1 mb-2 collapse-icon"></i>
|
||||
{% translate "Log in with email and password instead" %}
|
||||
</a>
|
||||
<div class="collapse mt-3 ms-3"
|
||||
id="login-form"
|
||||
class="form form-vertical"
|
||||
style="max-width: 400px">
|
||||
{% url 'account_login' as form_action %}
|
||||
{% translate "Sign In" as form_submit_label %}
|
||||
{% include "includes/form.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block card_content %}
|
||||
{% if SOCIALACCOUNT_ENABLED %}
|
||||
{% get_providers as socialaccount_providers %}
|
||||
{% if socialaccount_providers %}
|
||||
{% for provider in socialaccount_providers %}
|
||||
{% provider_login_url provider process=process scope=scope auth_params=auth_params as href %}
|
||||
<form method="post" action="{{ href }}">
|
||||
{% csrf_token %}
|
||||
<button href="{{ href }}"
|
||||
class="btn btn-warning btn-lg icon icon-left"
|
||||
title="{{ provider.name }}">
|
||||
<img src="{% static 'img/keycloak.svg' %}" style="height: 30px">
|
||||
<span class="mx-1">{% translate "Sign in with your" %} {{ provider.name }}</span>
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="mt-2">
|
||||
<a data-bs-toggle="collapse"
|
||||
href="#login-form"
|
||||
role="button"
|
||||
aria-controls="login-form"
|
||||
class="d-flex align-items-center">
|
||||
<i class="bi bi-chevron-right me-2 ms-1 mb-2 collapse-icon"></i>
|
||||
{% translate "Log in with email and password instead" %}
|
||||
</a>
|
||||
<div class="collapse mt-3 ms-3"
|
||||
id="login-form"
|
||||
class="form form-vertical"
|
||||
style="max-width: 400px">
|
||||
{% url 'account_login' as form_action %}
|
||||
{% translate "Sign In" as form_submit_label %}
|
||||
{% include "includes/form.html" %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
|
@ -32,6 +32,17 @@
|
|||
{% include "includes/message.html" %}
|
||||
{% endfor %}
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
{% block card_header %}{% endblock %}
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
{% block card_content %}
|
||||
{% endblock card_content %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
</div>
|
||||
<footer>
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
{% translate "Create a new organization" %}
|
||||
{% endblock page_title %}
|
||||
{% endblock html_title %}
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="card-body">{% include "includes/form.html" %}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
||||
{% block card_content %}
|
||||
{% include "includes/form.html" %}
|
||||
{% endblock card_content %}
|
||||
|
|
|
@ -5,39 +5,33 @@
|
|||
{% translate "Profile" %}
|
||||
{% endblock page_title %}
|
||||
{% endblock html_title %}
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">{% translate "Account" %}</h4>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
{% blocktranslate trimmed %}
|
||||
You are logged in with your VSHN user account. You will be able to change your password and other settings here in the future.
|
||||
{% endblocktranslate %}
|
||||
</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-lg">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{% translate "E-mail" %}</th>
|
||||
<td>{{ request.user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% translate "First name" %}</th>
|
||||
<td>{{ request.user.first_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% translate "Last name" %}</th>
|
||||
<td>{{ request.user.last_name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% block card_header %}
|
||||
<div class="card-header">
|
||||
<h4 class="card-title">{% translate "Account" %}</h4>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block card_content %}
|
||||
<p>
|
||||
{% blocktranslate trimmed %}
|
||||
You are logged in with your VSHN user account. You will be able to change your password and other settings here in the future.
|
||||
{% endblocktranslate %}
|
||||
</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-lg">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{% translate "E-mail" %}</th>
|
||||
<td>{{ request.user.email }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% translate "First name" %}</th>
|
||||
<td>{{ request.user.first_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{% translate "Last name" %}</th>
|
||||
<td>{{ request.user.last_name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
16
src/servala/frontend/templates/socialaccount/signup.html
Normal file
16
src/servala/frontend/templates/socialaccount/signup.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "frontend/base.html" %}
|
||||
{% load i18n %}
|
||||
{% block html_title %}
|
||||
{% block page_title %}
|
||||
{% translate "Sign Up" %}
|
||||
{% endblock page_title %}
|
||||
{% endblock html_title %}
|
||||
{% block card_content %}
|
||||
<p>
|
||||
{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to
|
||||
{{site_name}}. As a final step, please complete the following form:{% endblocktrans %}
|
||||
</p>
|
||||
{% url 'socialaccount_signup' as form_action %}
|
||||
{% translate "Sign Up" as form_submit_label %}
|
||||
<div style="max-width: 300px">{% include "includes/form.html" %}</div>
|
||||
{% endblock card_content %}
|
Loading…
Add table
Add a link
Reference in a new issue