feat: added user info form
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
<form hx-post="{% url 'web:user_info_component' %}" hx-swap="none">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
<div class="mb-4">
|
||||
|
||||
<label for="{{ field.id_for_label }}"
|
||||
class="inline-block text-sm font-medium text-gray-900 dark:text-white ml-2">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
{{ field }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for k, error in form.errors.items %}
|
||||
<span class="flex justify-center mb-2 text-sm font-medium text-red-900 dark:text-red-400">{{ error }}</span>
|
||||
{% endfor %}
|
||||
|
||||
<button class="w-full text-white bg-primary-600 hover:bg-primary-700 focus:ring-4 focus:outline-none
|
||||
focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-primary-600
|
||||
dark:hover:bg-primary-700 dark:focus:ring-primary-800"
|
||||
>
|
||||
{% translate 'Actualizar datos' %}
|
||||
</button>
|
||||
|
||||
|
||||
</form>
|
||||
@@ -17,7 +17,7 @@
|
||||
<h1 class="text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark:text-white">
|
||||
{% translate 'Inicia sesión en tu cuenta' %}
|
||||
</h1>
|
||||
<form action="{% url 'web:login' %}" method="post">
|
||||
<form action="{% url 'web:login' %}{% querystring %}" method="post">
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
{% if field.id_for_label != 'id_remember_me' %}
|
||||
|
||||
@@ -9,12 +9,11 @@
|
||||
>
|
||||
{% translate 'Mi cuenta' %}
|
||||
</h2>
|
||||
<div
|
||||
class="mt-4 p-6 border border-gray-100 rounded-md dark:border-gray-600"
|
||||
hx-get="{% url 'web:user_info_component' %}" hx-trigger="load"
|
||||
>
|
||||
|
||||
<div class="flex space-x-4">
|
||||
<div>
|
||||
<h2 class="flex items-center text-lg font-bold leading-none text-gray-900 dark:text-white sm:text-xl">
|
||||
{{ user.first_name }} {{ user.last_name }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 p-6 border border-gray-100 rounded-md dark:border-gray-600">
|
||||
|
||||
Reference in New Issue
Block a user