{% import '@FoxHabbitBasis/Macro/wrap.html.twig' as wrap_macro %}
{% set evalanche_user = app.request.getSession().get('evalanche_user')|default(null) %}
{% if editmode %}
{{ pimcore_select( 'form_url', { store: evalancheConnector.getFormsAsPimcoreSelectStore(), width: '100%' }) }}
{% else %}
{% set iframeUrl = pimcore_select( 'form_url').getValue() %}
{% if config.forceHttps|default(null) %}
{% set iframeUrl = iframeUrl|replace({'http:':'https:'}) %}
{% endif %}
{% if config.forceHttp|default(null) %}
{% set iframeUrl = iframeUrl|replace({'https:':'http:'}) %}
{% endif %}
{% if config.prefillUserData|default(null) and evalanche_user %}
{% set iframeUrl = iframeUrl ~ ',u=' ~ evalanche_user %}
{% endif %}
{% set uinique_id = 'iframe_sizetracker_'~random() %}
<iframe
class="iframe-resizer"
id="{{uinique_id}}"
scrolling="no"
src="{{ iframeUrl }}"
frameborder="0"
width="100%"
height="1280px">
<p>Ihr Browser unterstützt leider keine eingebetteten Frames (iframes)
<a href="{{ iframeUrl }}" target="_blank">weiter</a></p>
</iframe>
{% if config.text_below|default(null) %}
{{ wrap_macro.wrapperOpen( config.wrapper_text_below, _context) }}
{{ config.text_below|trans }}
{{ wrap_macro.wrapperClose( config.wrapper_text_below) }}
{% endif %}
{% endif %}