mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-25 06:40:29 +00:00
16 lines
598 B
HTML
16 lines
598 B
HTML
|
<form
|
||
|
hx-encoding='multipart/form-data'
|
||
|
hx-post='{% url "compose_image_upload" %}'
|
||
|
hx-target="this"
|
||
|
hx-swap="outerHTML"
|
||
|
_="on htmx:xhr:progress(loaded, total)
|
||
|
set #attachmentProgress.value to (loaded/total)*100">
|
||
|
{% csrf_token %}
|
||
|
{% include "forms/_field.html" with field=form.image %}
|
||
|
{% include "forms/_field.html" with field=form.description %}
|
||
|
<div class="buttons">
|
||
|
<button _="on click show #attachmentProgress with display:block then hide me">Upload</button>
|
||
|
<progress id="attachmentProgress" value="0" max="100"></progress>
|
||
|
</div>
|
||
|
</form>
|