37 lines
1.0 KiB
Twig
37 lines
1.0 KiB
Twig
|
{% extends 'base.html.twig' %}
|
||
|
|
||
|
{% block encorelinktags %}
|
||
|
{{ encore_entry_link_tags('dropzone') }}
|
||
|
{% endblock encorelinktags %}
|
||
|
|
||
|
|
||
|
{% block body %}
|
||
|
<h3 class="page-header"></h3>
|
||
|
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||
|
|
||
|
<form action="{{ oneup_uploader_endpoint(type) }}" class="dropzone" id="MyDropZone" style="margin-top:10px">
|
||
|
|
||
|
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block encorescripttags %}
|
||
|
{{ encore_entry_script_tags('dropzone') }}
|
||
|
{% endblock %}
|
||
|
|
||
|
{% block localjavascript %}
|
||
|
window.parent.$(".modal-title").html("ETAPE 1 - Téléchargez votre image");
|
||
|
|
||
|
Dropzone.options.MyDropZone = {
|
||
|
maxFiles: 1,
|
||
|
acceptedMimeTypes: 'image/jpeg,image/png',
|
||
|
//renameFilename: false,
|
||
|
success: function(file, response){
|
||
|
$(location).attr('href',"{{ path('app_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function closeModal() {
|
||
|
window.parent.$("#mymodallarge").modal('hide');
|
||
|
}
|
||
|
{% endblock %}
|