{% extends '@CadolesCore/base.html.twig' %}

{% block pagewrapper %}
    <h3 class="page-header">ETAPE 1 - Téléchargez votre image</h3>
    <a class="btn btn-default" onClick="closeModal();">Annuler</a>

    <form action="{{ oneup_uploader_endpoint('avatar') }}" class="dropzone" id="MyDropZone" style="margin-top:10px">
    </form>
{% endblock %}



{% block localjavascript %}
    Dropzone.options.MyDropZone = {
	    maxFiles: 1,
	    acceptedMimeTypes: 'image/*',
	    renameFilename: false,
	    success: function(file, response){
            $(location).attr('href',"{{ path('cadoles_core_crop02') }}");
	    }
    }

    function closeModal() {
        window.parent.$("#mymodal").modal('hide');
    }
{% endblock %}
