<fieldset>
    <legend>{% trans %}Site policies{% endtrans %}</legend>
    {% if activePolicies.termsOfUse and viewablePolicies.termsOfUse %}
        {% set policyUrl = getModVar(constant('Zikula\\LegalModule\\Constant::MODNAME'), constant('Zikula\\LegalModule\\Constant::MODVAR_TERMS_URL')) %}
        {% if policyUrl == '' %}
            {% set policyUrl = path('zikulalegalmodule_user_termsofuse') %}
        {% endif %}
        {% set policyName = 'Terms of use'|trans %}
        {% set policyLink = '<a class="legal_popup" href="' ~ policyUrl ~ '" target="_blank">' ~ policyName ~ '</a>' %}
        <div class="form-group row">
            <label class="col-md-3 col-form-label">{{ policyName ~ ':' }}</label>
            <div class="col-md-9">
                <span class="form-control-plaintext">{% if acceptedPolicies.termsOfUse %}{% trans with { '%s%': policyLink|raw } %}%s% accepted{% endtrans %}{% else %}{% trans with { '%s%': policyLink|raw } %}%s% not accepted.{% endtrans %}{% endif %}</span>
            </div>
        </div>
    {% endif %}
    {% if activePolicies.privacyPolicy and viewablePolicies.privacyPolicy %}
        {% set policyUrl = getModVar(constant('Zikula\\LegalModule\\Constant::MODNAME'), constant('Zikula\\LegalModule\\Constant::MODVAR_PRIVACY_URL')) %}
        {% if policyUrl == '' %}
            {% set policyUrl = path('zikulalegalmodule_user_privacypolicy') %}
        {% endif %}
        {% set policyName = 'Privacy policy'|trans %}
        {% set policyLink = '<a class="legal_popup" href="' ~ policyUrl ~ '" target="_blank">' ~ policyName ~ '</a>' %}
        <div class="form-group">
            <label class="col-md-3 col-form-label">{{ policyName ~ ':' }}</label>
            <div class="col-md-9">
                <span class="form-control-plaintext">{% if acceptedPolicies.privacyPolicy %}{% trans with { '%s%': policyLink|raw } %}'%s% accepted.{% endtrans %}{% else %}{% trans with { '%s%': policyLink|raw } %}%s% not accepted.{% endtrans %}{% endif %}</span>
            </div>
        </div>
    {% endif %}
    {% if activePolicies.agePolicy and viewablePolicies.agePolicy %}
        <div class="form-group">
            <label class="col-md-3 col-form-label">{% trans %}Minimum age{% endtrans %}</label>
            <div class="col-md-9">
                <span class="form-control-plaintext">{% if acceptedPolicies.agePolicy %}{% trans with { '%s%': getModVar(constant('Zikula\\LegalModule\\Constant::MODNAME'), constant('Zikula\\LegalModule\\Constant::MODVAR_MINIMUM_AGE'), 13) } %}Confirmed minimum age requirement (%s% years of age) met.{% endtrans %}{% else %}{% trans %}Minimum age requirement not confirmed.{% endtrans %}{% endif %}</span>
            </div>
        </div>
    {% endif %}
    {% if activePolicies.tradeConditions and viewablePolicies.tradeConditions %}
        {% set policyUrl = getModVar(constant('Zikula\\LegalModule\\Constant::MODNAME'), constant('Zikula\\LegalModule\\Constant::MODVAR_TRADECONDITIONS_URL')) %}
        {% if policyUrl == '' %}
            {% set policyUrl = path('zikulalegalmodule_user_tradeconditions') %}
        {% endif %}
        {% set policyName = 'General terms and conditions of trade'|trans %}
        {% set policyLink = '<a class="legal_popup" href="' ~ policyUrl ~ '" target="_blank">' ~ policyName ~ '</a>' %}
        <div class="form-group">
            <label class="col-md-3 col-form-label">{{ policyName ~ ':' }}</label>
            <div class="col-md-9">
                <span class="form-control-plaintext">{% if acceptedPolicies.tradeConditions %}{% trans with { '%s%': policyLink|raw } %}%s% accepted.{% endtrans %}{% else %}{% trans with { '%s%': policyLink|raw } %}%s% not accepted.{% endtrans %}{% endif %}</span>
            </div>
        </div>
    {% endif %}
    {% if activePolicies.cancellationRightPolicy and viewablePolicies.cancellationRightPolicy %}
        {% set policyUrl = getModVar(constant('Zikula\\LegalModule\\Constant::MODNAME'), constant('Zikula\\LegalModule\\Constant::MODVAR_CANCELLATIONRIGHTPOLICY_URL')) %}
        {% if policyUrl == '' %}
            {% set policyUrl = path('zikulalegalmodule_user_cancellationrightpolicy') %}
        {% endif %}
        {% set policyName = 'Cancellation right policy'|trans %}
        {% set policyLink = '<a class="legal_popup" href="' ~ policyUrl ~ '" target="_blank">' ~ policyName ~ '</a>' %}
        <div class="form-group">
            <label class="col-md-3 col-form-label">{{ policyName ~ ':' }}</label>
            <div class="col-md-9">
                <span class="form-control-plaintext">{% if acceptedPolicies.cancellationRightPolicy %}{% trans with { '%s%': policyLink|raw } %}%s% accepted.{% endtrans %}{% else %}{% trans with { '%s%': policyLink|raw } %}%s% not accepted.{% endtrans %}{% endif %}</span>
            </div>
        </div>
    {% endif %}
</fieldset>
