Refactor image fragment to improve code readability and maintainability

This commit is contained in:
Yaro Kasear 2025-07-25 08:43:03 -05:00
parent d488324c50
commit 028cb84fed

View file

@ -10,7 +10,8 @@
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-body text-center">
<img src="{{ url_for('static', filename=image.filename) }}" alt="Image of ID {{ id }}" class="img-fluid">
<img src="{{ url_for('static', filename=image.filename) }}" alt="Image of ID {{ id }}"
class="img-fluid">
</div>
{% if enabled %}
<div class="modal-footer justify-content-between">
@ -36,7 +37,8 @@
</div>
{% else %}
{% if enabled %}
<a href="#" class="link-secondary" onclick="document.getElementById('image-upload-input-{{ id }}').click(); return false;">
<a href="#" class="link-secondary"
onclick="document.getElementById('image-upload-input-{{ id }}').click(); return false;">
{{ icons.render_icon('image', 256) }}
</a>
<form method="POST" enctype="multipart/form-data" id="image-upload-form-{{ id }}" class="d-none">