fix: huge refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% 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">
|
||||
class="inline-block text-sm font-medium ml-2">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
{{ field }}
|
||||
@@ -13,12 +13,12 @@
|
||||
{% 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>
|
||||
<span class="flex justify-center mb-2 text-sm font-medium text-red-900 ">{{ error }}</span>
|
||||
{% endfor %}
|
||||
|
||||
<button class="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 cursor-pointer"
|
||||
<button class="text-white hover: focus:ring-4 focus:outline-none
|
||||
focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
||||
: :ring-primary-800 cursor-pointer"
|
||||
>
|
||||
{% translate 'Guardar' %}
|
||||
</button>
|
||||
|
||||
@@ -12,71 +12,65 @@
|
||||
<div class="mb-4 grid gap-4 sm:grid-cols-2 sm:gap-8 lg:gap-16">
|
||||
<div class="space-y-4">
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address_full_name">
|
||||
{% translate 'Nombre completo' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address_full_name" name="full_name" type="text" value="{{ address.full_name }}">
|
||||
<dd class="flex items-center gap-1 ">
|
||||
<input class="input" id="address_full_name" name="full_name" type="text" value="{{ address.full_name }}">
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address">
|
||||
{% translate 'Dirección' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address" name="address" type="text" value="{{ address.address }}">
|
||||
<dd class="flex items-center gap-1 ">
|
||||
<input class="input" id="address" name="address" type="text" value="{{ address.address }}">
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address_zip">
|
||||
{% translate 'Código postal' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address_zip" name="address_zip" type="text" value="{{ address.address_zip }}">
|
||||
<dd class=" ">
|
||||
<input class="input" id="address_zip" name="address_zip" type="text" value="{{ address.address_zip }}">
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address_phone">
|
||||
{% translate 'Teléfono' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address_phone" name="address_phone" type="text" value="{{ address.address_phone }}">
|
||||
<dd class=" ">
|
||||
<input class="input" id="address_phone" name="address_phone" type="text" value="{{ address.address_phone }}">
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="space-y-4">
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address_town">
|
||||
{% translate 'Localidad' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address_town" name="address_town" type="text" value="{{ address.address_town }}">
|
||||
<dd class=" ">
|
||||
<input class="input" id="address_town" name="address_town" type="text" value="{{ address.address_town }}">
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">
|
||||
<dt class="font-semibold ">
|
||||
<label for="address_state">
|
||||
{% translate 'Provincia' %}
|
||||
</label>
|
||||
</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">
|
||||
<input class="input-text"
|
||||
id="address_state" name="address_state" type="text" value="{{ address.address_state }}">
|
||||
<dd class=" ">
|
||||
<input class="input" id="address_state" name="address_state" type="text" value="{{ address.address_state }}">
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -84,9 +78,9 @@
|
||||
|
||||
|
||||
<div class="flex justify-end">
|
||||
<button class="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 cursor-pointer"
|
||||
<button class="text-white hover: focus:ring-4 focus:outline-none
|
||||
focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center
|
||||
: :ring-primary-800 cursor-pointer"
|
||||
>
|
||||
{% translate 'Guardar' %}
|
||||
</button>
|
||||
@@ -98,34 +92,34 @@
|
||||
<div class="mb-4 grid gap-4 sm:grid-cols-2 sm:gap-8 lg:gap-16">
|
||||
<div class="space-y-4">
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Nombre completo' %}</dt>
|
||||
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
||||
<dt class="font-semibold ">{% translate 'Nombre completo' %}</dt>
|
||||
<dd class="flex items-center gap-1 ">
|
||||
{{ address.full_name }}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Dirección' %}</dt>
|
||||
<dd class="flex items-center gap-1 text-gray-500 dark:text-gray-400">
|
||||
<dt class="font-semibold ">{% translate 'Dirección' %}</dt>
|
||||
<dd class="flex items-center gap-1 ">
|
||||
{{ address.address }}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Código postal' %}</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_zip }}</dd>
|
||||
<dt class="font-semibold ">{% translate 'Código postal' %}</dt>
|
||||
<dd class=" ">{{ address.address_zip }}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Teléfono' %}</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_phone }}</dd>
|
||||
<dt class="font-semibold ">{% translate 'Teléfono' %}</dt>
|
||||
<dd class=" ">{{ address.address_phone }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="space-y-4">
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Localidad' %}</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_town }}</dd>
|
||||
<dt class="font-semibold ">{% translate 'Localidad' %}</dt>
|
||||
<dd class=" ">{{ address.address_town }}</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="font-semibold text-gray-900 dark:text-white">{% translate 'Provincia' %}</dt>
|
||||
<dd class="text-gray-500 dark:text-gray-400">{{ address.address_state }}</dd>
|
||||
<dt class="font-semibold ">{% translate 'Provincia' %}</dt>
|
||||
<dd class=" ">{{ address.address_state }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,9 +127,9 @@
|
||||
<button hx-on:click="htmx.toggleClass(htmx.find('#edit_address_{{ address.pk }}'), 'hidden'); htmx.toggleClass(htmx.find('#details_address_{{ address.pk }}'), 'hidden')"
|
||||
type="button"
|
||||
data-modal-target="accountInformationModal2" data-modal-toggle="accountInformationModal2"
|
||||
class="inline-flex w-full items-center justify-center rounded-lg bg-primary-700 px-5 py-2.5 text-sm
|
||||
font-medium text-white hover:bg-primary-800 focus:outline-none focus:ring-4 focus:ring-primary-300
|
||||
dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800 sm:w-auto cursor-pointer"
|
||||
class="inline-flex w-full items-center justify-center rounded-lg px-5 py-2.5 text-sm
|
||||
font-medium text-white hover: focus:outline-none focus:ring-4 focus:ring-primary-300
|
||||
: :ring-primary-800 sm:w-auto cursor-pointer"
|
||||
>
|
||||
{% include 'components/icons/edit.svg' %}
|
||||
{% translate 'Editar datos' %}
|
||||
@@ -143,6 +137,6 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if not forloop.last %}
|
||||
<hr class="h-px my-2 bg-gray-200 border-0 dark:bg-gray-700">
|
||||
<hr class="h-px my-2 ">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
{% load i18n %}
|
||||
<ul class="p-2 text-start text-sm font-medium text-gray-900 dark:text-white">
|
||||
<ul class="p-2 text-start text-sm font-medium ">
|
||||
<li>
|
||||
<a href="{% url 'web:my_account' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
<a href="{% url 'users:my_account' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover: :">
|
||||
{% translate 'Mi cuenta' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'web:orders' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover: :">
|
||||
{% translate 'Mis pedidos' %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'web:wishlist' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover: :">
|
||||
{% translate 'Lista de deseados' %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="p-2 text-sm font-medium text-gray-900 dark:text-white">
|
||||
<a href="{% url 'web:logout' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-600">
|
||||
<div class="p-2 text-sm font-medium ">
|
||||
<a href="{% url 'users:logout' %}" title=""
|
||||
class="inline-flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm hover: :">
|
||||
{% translate 'Cerrar sesión' %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user