{% if type == "version1" %}
<!-- Alte Version des Radio-Plugins. Bleibt erhalten, um alte Trainings weiterhin zu unterstützen-->

<div class="radio-show-hide-container {{wert}}">
    {% for value in values %}

    <label class="radio-label-horizontal">
        <input class="radio-input-horizontal show-hide-input radiohn-input" type="radio" name="option{{name}}" value="{{value}}{{wert}}">
        {{value}}
    </label>

    {% endfor %}
</div>

    <script>
        (function($)
        {
            $(document).ready(function ()
            {		
                $('.textfeld{{wert}}').addClass('d-none show-hide-content');
                $("input[type='radio']").click(function(){
                    {% for anz in values %}
                        if($(this).attr("value")=="{{anz}}{{wert}}")
                        {
                            $(".textfeld{{wert}}").not("#{{anz}}{{wert}}").addClass('d-none');
                            $("#{{anz}}{{wert}}").removeClass('d-none');
                        }
                    {% endfor %}
                });
            });
        })(jQuery);

    </script>

{% elseif type == "version2" %}

  
    {% if names != empty %}
        <div class="content-radios">
            {% for name in names %}
                <input id="{{name}}" class="radio-input-horizontal" type="radio" name="radio-input" value="{{value}}">
                <label class="radio-label-horizontal" for="{{name}}"> {{name}} </label>
                    <script>
                    jQuery(document).on('change', '.radio-input-horizontal', function (e) {
                            if(jQuery("#{{name}}").is(':checked')){
                                jQuery('#content-of-{{name}}').removeClass('d-none').addClass('d-block');
                            } else {
                                jQuery('#content-of-{{name}}').removeClass('d-block').addClass('d-none');
                            }
                    });
                    </script>
            {% endfor %}
        </div>
    {% endif %}

    {% if content != empty %}
        <div id="content-of-{{contentName}}" class="the-content d-none {{contentName}}">
            {{content|raw}}        
        </div>
    {% endif %}




    
{% endif %}
