|
1 | 1 | {% extends "socialaccount/base.html" %} |
2 | | -{% load i18n %} |
| 2 | +{% load widget_tweaks %} |
3 | 3 |
|
4 | | -{% block head_title %}{% trans "Signup" %}{% endblock %} |
| 4 | +{% block head_title %}Signup{% endblock %} |
5 | 5 |
|
6 | | -{% block content_header %}{% trans "Signup" %}{% endblock %} |
| 6 | +{% block header %}{% endblock %} |
7 | 7 |
|
8 | 8 | {% block content %} |
9 | | -<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 |
10 | | -{{ site_name }}. As a final step, please complete the following form:{% endblocktrans %}</p> |
| 9 | +<div class="w-[40rem] flex flex-col items-center justify-center mx-auto p-8 font-common shadow-sign-content rounded-lg"> |
| 10 | + <h3>Signup</h3> |
| 11 | + <p class="text-center py-2">You are about to use your {{ account.get_provider.name }} account to login to {{ site.name }}. As a final step, please complete the following form:</p> |
11 | 12 |
|
12 | | -<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}"> |
13 | | - {% csrf_token %} |
14 | | - {{ form.as_p }} |
15 | | - {% if redirect_field_value %} |
16 | | - <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> |
17 | | - {% endif %} |
18 | | - <button type="submit">{% trans "Sign Up" %} »</button> |
19 | | -</form> |
| 13 | + <form class="login flex flex-col items-center w-[80%]" method="POST" action="{% url 'socialaccount_signup' %}"> |
| 14 | + {% csrf_token %} |
| 15 | + {% if form.non_field_errors %} |
| 16 | + <ul class="m-0 border-2 rounded-md p-2 border-red-400 text-red-600 font-bold"> |
| 17 | + {% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %} |
| 18 | + </ul> |
| 19 | + {% endif %} |
| 20 | + {% for field in form %} |
| 21 | + <div class="w-full my-1"> |
| 22 | + <div class="flex w-full my-2"> |
| 23 | + <label class="text-base text-left">{{ field.label }}</label> |
| 24 | + <span aria-hidden="true" class="text-4xl text-red-400 h-2 ml-1">*</span> |
| 25 | + </div> |
| 26 | + {% if field.errors %} |
| 27 | + {{ field|add_class:"h-12 text-lg rounded-lg border-red-600 border-2 my-2" }} |
| 28 | + {% else %} |
| 29 | + {{ field|add_class:"h-12 text-lg rounded-lg border-base-green-400 border-2 my-2" }} |
| 30 | + {% endif %} |
| 31 | + {% if field.help_text %}<div class="w-full text-left ml-4 font-text">{{ field.help_text|safe }}</div>{% endif %} |
| 32 | + {% if field.errors %}<ul class="m-0 w-full ml-4 text-left text-red-600 font-text">{% for error in field.errors %}<li>{{ error }}</li>{% endfor %}</ul>{% endif %} |
| 33 | + </div> |
| 34 | + {% endfor %} |
| 35 | + <button type="submit" class="w-full my-4 h-12 text-lg bg-base-green-600 border-2 rounded-lg border-base-green-800 font-common hover:bg-base-white-400 hover:text-base-green-600">SignUp</button> |
| 36 | + </form> |
| 37 | +</div> |
20 | 38 | {% endblock %} |
| 39 | +{% block footer %}{% endblock %} |
0 commit comments