2024-09-05 05:15:16 +00:00
|
|
|
<form method="post" enctype="multipart/form-data" >
|
2024-09-06 23:24:22 +00:00
|
|
|
<progress id="progress" hidden="true"></progress>
|
2025-03-08 21:29:24 +00:00
|
|
|
{% if form %}
|
2024-08-17 19:05:28 +00:00
|
|
|
{{ form.hidden_tag() }}
|
2024-08-21 19:38:01 +00:00
|
|
|
<!--<p>
|
2024-08-17 19:05:28 +00:00
|
|
|
{{ form.description.label }}<br>
|
|
|
|
|
{{ form.description(size=32) }}
|
2024-08-21 19:38:01 +00:00
|
|
|
</p>-->
|
2024-09-06 23:24:22 +00:00
|
|
|
|
2024-09-05 03:22:51 +00:00
|
|
|
{{ form.description.label }}
|
|
|
|
|
{{ form.description }}
|
|
|
|
|
{{ form.photo.label }}
|
2024-08-17 19:05:28 +00:00
|
|
|
{{ form.photo() }}
|
2024-09-06 02:32:27 +00:00
|
|
|
{{ form.typeofpin }}
|
|
|
|
|
<label>Coordenadas</label>
|
|
|
|
|
<div role="group">
|
|
|
|
|
|
|
|
|
|
<input type="text" id="lat" name="lat" readonly>
|
|
|
|
|
<input type="text" id="lng" name="lng" readonly>
|
|
|
|
|
</div>
|
2024-09-05 05:15:16 +00:00
|
|
|
<table style="background-color: rgba(0,0,0,0);">
|
|
|
|
|
<tr style="background-color: transparent;">
|
|
|
|
|
<td style="background-color:transparent">{{ form.submit() }}</td>
|
|
|
|
|
<td style="background-color:transparent"><button style="background-color: red; color:white" id="cancel-add" type="button">Cancelar</button></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
2025-03-08 21:29:24 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
2024-08-17 19:05:28 +00:00
|
|
|
</form>
|
2024-09-06 23:24:22 +00:00
|
|
|
<script>
|
2025-04-14 23:24:31 +00:00
|
|
|
submitButton = document.getElementById('submit');
|
|
|
|
|
if (submitButton) {
|
|
|
|
|
submitButton.addEventListener('click', function() {
|
|
|
|
|
// Disable the button after submission
|
|
|
|
|
submitButton.disabled = true;
|
|
|
|
|
});
|
|
|
|
|
}
|
2024-09-06 23:24:22 +00:00
|
|
|
document.getElementById('submit').onclick=function(e){
|
2025-04-14 23:24:31 +00:00
|
|
|
document.getElementById('progress').hidden='false'
|
2024-09-06 23:24:22 +00:00
|
|
|
}
|
|
|
|
|
</script>
|