nineskeletor/templates/Icon/upload.html.twig
afornerot 88cfeae266
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
v0 ninegate
2023-01-10 11:13:28 +01:00

38 lines
904 B
Twig
Executable File

{% extends 'base.html.twig' %}
{% block encoretags %}
{{ encore_entry_link_tags('dropzone') }}
{% endblock %}
{% block body %}
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
<form
action="{{ oneup_uploader_endpoint('icon') }}"
class="dropzone"
id="mydropzone"
data-acceptedMimeTypes="image/*"
data-maxFiles=1
style="margin-top:10px">
</form>
{% endblock %}
{% block localscript %}
{{ encore_entry_script_tags('dropzone') }}
<script>
function dropzonesuccess( file, response ) {
parent.$("#icon_label").val("icon/"+response["file"]);
parent.$("#icon_label_img").attr("src","{{ path("app_minio_image",{file:"icon/"}) }}"+response["file"]);
closeModal();
}
function closeModal() {
window.parent.$("#mymodallarge").modal('hide');
}
</script>
{% endblock %}