fix template with results

This commit is contained in:
Cayo Puigdefabregas 2022-01-17 14:18:16 +01:00
parent 11ca75fc8b
commit 7b357ec2fc
1 changed files with 16 additions and 3 deletions

View File

@ -30,15 +30,28 @@
{% endif %} {% endif %}
</div> </div>
<form method="post" class="row g-3 needs-validation" novalidate> <form method="post" enctype="multipart/form-data" class="row g-3 needs-validation" novalidate>
{{ form.csrf_token }} {{ form.csrf_token }}
<div class="col-12"> <div class="col-12">
<label for="name" class="form-label">Name</label> <label for="name" class="form-label">Select a Snapshot file</label>
<div class="input-group has-validation"> <div class="input-group has-validation">
<input type="text" name="name" class="form-control" required value="{{ form.name.data|default('', true) }}"> {{ form.snapshot }}
<div class="invalid-feedback">You can select multiple files Snapshots JSON.</div> <div class="invalid-feedback">You can select multiple files Snapshots JSON.</div>
</div> </div>
{% if form.result %}
{% for filename, result in form.result.items() %}
{% if result == 'Ok' %}
<p class="text-success">
{{ filename }}: {{ result }}<br/>
</p>
{% else %}
<p class="text-danger">
{{ filename }}: {{ result }}<br/>
</p>
{% endif %}
{% endfor %}
{% endif %}
</div> </div>
<div class="col-12"> <div class="col-12">