nineskeletor/templates/Config/logo.html.twig

36 lines
898 B
Twig
Raw Normal View History

2022-07-21 16:15:47 +02:00
{% 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('logo') }}"
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.$("#config_value").val(response["file"]);
2022-08-31 11:20:22 +02:00
parent.$("#config_value_img").attr("src","{{ path("app_minio_image",{file:"logo/"}) }}"+response["file"]);
2022-07-21 16:15:47 +02:00
closeModal();
}
function closeModal() {
window.parent.$("#mymodallarge").modal('hide');
}
</script>
{% endblock %}