Fixed avatar update with htmx

This commit is contained in:
Éloi Rivard 2023-04-07 18:05:06 +02:00
parent a615a52887
commit 01e0e3d3f5
2 changed files with 7 additions and 3 deletions

View file

@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.
Fixed
*****
- Fixed avatar update. :pr:`121`
[0.0.23] - 2023-04-05
=====================

View file

@ -14,7 +14,7 @@ display=true
{%- if field.errors %} error{% endif -%}
{%- if field.render_kw and "disabled" in field.render_kw %} disabled{% endif -%}"
{% if not display %}style="display: none"{% endif %}
{% if field.validators %}hx-target="this" hx-swap="outerHTML"{% endif %}
{% if field.validators and field.type not in ("FileField", "MultipleFileField") %}hx-target="this" hx-swap="outerHTML"{% endif %}
>
{% endif %}
@ -22,11 +22,10 @@ display=true
{{ field.label() }}
{% endif %}
{% set lock_indicator = field.render_kw and ("readonly" in field.render_kw or "disabled" in field.render_kw) %}
{% set required_indicator = "required" in field.flags %}
{% set corner_indicator = not noindicator and (indicator_icon or lock_indicator or required_indicator) %}
{% if field.validators %}
{% if field.validators and field.type not in ("FileField", "MultipleFileField") %}
{% set ignore_me = kwargs.update({"hx-post": ""}) %}
{% set ignore_me = kwargs.update({"hx-indicator": "closest .input"}) %}
{% endif %}