{% extends "base.html.twig" %} {% block encorelinktags %} {{ encore_entry_link_tags('dropzone') }} {% endblock encorelinktags %} {% block body %}

Téléchargez vos Illustrations

Annuler
{% endblock %} {% block encorescripttags %} {{ encore_entry_script_tags('dropzone') }} {% endblock %} {% block localjavascript %} function dropzoneinit( elt ) { } function dropzonesuccess( file, response ) { parent.$("#illustration_illustration").val(response["file"]); parent.$("#illustration_width").val(response["width"]); parent.$("#illustration_height").val(response["height"]); parent.$("#illustration_name").val(response["originalname"]); parent.$("#illustration_illustration_img").attr("src","/{{ appAlias }}/uploads/illustration/"+response["file"]); console.log('here'); console.log(response["file"]); $.ajax({ method: "POST", url: "{{ path('app_illustration_submits03',{"by":by,"userid":userid,"categoryid":categoryid}) }}", data: { illustration:response["file"], width:response["width"], height:response["height"], name:response["originalname"] } }); } function dropzonequeuecomplete(file) { {% if by=="admin" %} url='{{ path('app_admin_illustration',{'by':by,'userid':-1}) }}'; {% elseif by=="update" %} url='{{ path('app_user_update',{id:userid}) }}'; {% elseif by=="profil" %} url='{{ path('app_user_profil') }}'; {% elseif by=="illustration" %} url='{{ path('app_illustration_view',{'by':"user","idcat":illustration.category.id,"id":illustration.id}) }}'; {% else %} url='{{ path('app_home_user',{'userpseudo':app.user.slug}) }}'; {% endif %} window.location.href=url; } {% endblock %}