ninesurvey/src/ninesurvey-1.0/templates/Crop/crop01.html.twig

37 lines
1.0 KiB
Twig
Raw Normal View History

2020-11-12 11:58:50 +01:00
{% 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>
2020-11-13 17:53:40 +01:00
<form action="{{ oneup_uploader_endpoint(type) }}" class="dropzone" id="MyDropZone" style="margin-top:10px">
2020-11-12 11:58:50 +01:00
{% 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,
2020-11-15 17:49:27 +01:00
acceptedMimeTypes: 'image/jpeg,image/png',
2020-11-12 11:58:50 +01:00
//renameFilename: false,
success: function(file, response){
2020-11-13 17:53:40 +01:00
$(location).attr('href',"{{ path('app_crop02', {"type": type, "reportinput": reportinput }) }}?file="+response["file"]);
2020-11-12 11:58:50 +01:00
}
}
function closeModal() {
2020-11-13 17:53:40 +01:00
window.parent.$("#mymodallarge").modal('hide');
2020-11-12 11:58:50 +01:00
}
{% endblock %}