feat: added user info form

This commit is contained in:
Pablo Moreno
2025-01-18 13:55:33 +01:00
parent 3995fa9c5a
commit 249521aa4a
10 changed files with 186 additions and 53 deletions
+28
View File
@@ -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>