{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
{% block bodymed_product_detail_mywerb %}
{% if page.extensions.myWerb %}
{% if page.extensions.Download %}
<div class="product-configuration-title h4">{{ "myWerb.detail.configuratorTitle"|trans }}</div>
<div data-my-werb="true" class="my-werb-container">
<h2></h2>
<div class="my-werb-download-box">
<div class="row">
<div class="col-4 col-sm-2 my-werb-download-box-icon">
{% sw_icon "pdf" style{'pack':'bodymed'} %}
</div>
<div class="col-8 col-sm-5 my-werb-download-box-info">
<div class="info-title">{{ "myWerb.detail.download.infoTitle"|trans }}</div>
<div class="info-text">{{ "myWerb.detail.download.infoText"|trans }}</div>
</div>
<div class="col-sm-5 my-werb-download-box-button">
{% if page.extensions.Download %}
<a class="btn btn-primary" target="_blank" href="/mywerb/download/?number={{ page.product.productNumber }}&name={{ page.product.translated.name }}">{{ "myWerb.detail.download.btnText"|trans }}</a>
{% else %}
<a class="btn btn-primary" href="#">{{ "myWerb.detail.download.btnText"|trans }}</a>
{% endif %}
</div>
</div>
</div>
<div class="my-werb-container-divider"></div>
<div class="my-werb-upload-box">
<form data-form-csrf-handler="true" id="uploadform" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-sm-7">
<div id="drop-area">
<div class="row">
<div class="col-3 drop-area-icon is-info">
{% sw_icon "upload" style{'pack':'bodymed'} %}
</div>
<div class="col-3 drop-area-icon is-success">
{% sw_icon "checkmark" style{'pack':'bodymed'} %}
</div>
<div class="col-9">
<div class="drop-area-info">
<div class="info-title">{{ "myWerb.detail.upload.infoTitle"|trans }}</div>
<div class="info-text is-info">{{ "myWerb.detail.upload.infoText"|trans|raw }}</div>
<div class="info-text is-success">{{ "myWerb.detail.upload.successText"|trans }}</div>
</div>
</div>
</div>
<input type="file" id="files" name="files"/>
<input type="hidden" id="articlenumber" name="articlenumber" value="{{ page.product.productNumber }}"/>
<!-- label class="button" for="fileElem">Select some files</label -->
</div>
<!-- input id="files" type="file" name="mywerb" placeholder="Upload" -->
</div>
<div class="col-sm-5">
<input type="submit" value="{{ "myWerb.detail.upload.btnText"|trans }}" name="submit" class="btn btn-secondary">
{{ sw_csrf('frontend.mywerb.upload') }}
</div>
</div>
</form>
<div class="filelist"></div>
<div id="result"></div>
</div>
</div>
{% else %}
<div data-my-werb="true" class="my-werb-container">
{{ "myWerb.detail.upload.noService"|trans }}
</div>
{% endif %}
{% endif %}
{% endblock %}