<commit_before>{% for attribute in releasedAttributes %}
    {% if attribute.attributeDefinition.hasUrnMace %}
        {% set attributeUrn = attribute.attributeDefinition.urnMace %}
    {% else %}
        {% set attributeUrn = attribute.attributeDefinition.urnOid %}
    {% endif %}
    {% set hasMotivation = specifiedConsent.hasMotivations %}
    {% set translatedAttributeName = ('profile.saml.attributes.' ~ attribute.attributeDefinition.name)|trans({}, 'saml') %}
    {% set nameFormat = sp.nameIdFormat %}
    {% if translatedAttributeName == 'profile.saml.attributes.' ~ attribute.attributeDefinition.name %}
        {% set attributeName = attributeUrn %}
    {% else %}
        {% set attributeName = translatedAttributeName %}
    {% endif %}
    {% set tooltipId = '%id%%index%'|replace({ '%id%': id, '%index%': loop.index })|trim %}
    <li class="attribute__row{% if not hasMotivation %} attribute__noTooltip{% endif %}">
        <div class="attribute__name">
            {{ attributeName }}
            {% if hasMotivation %}
                {% include '@OpenConextProfile/helpers/label.html.twig' with
                    {
                        class: 'tooltip',
                        hideText: true,
                        ariaExpandable: true,
                        id: tooltipId,
                        text: 'accessibility.consent_tooltip_screenreader'|trans({ '%attr_name%': attributeName|lower }),
                    }
                %}
            {% endif %}
        </div>
        <div class="attribute__value">
            {% if attribute.attributeDefinition.name == 'eduPersonTargetedID' and (
                nameFormat.isTransient or
                nameFormat.isPersistent)
            %}
                {% if nameFormat.isTransient %}
                    {{ 'profile.saml.attributes.eduPersonTargetedId.transient'|trans }}
                {%  else %}
                    {{ 'profile.saml.attributes.eduPersonTargetedId.persistent'|trans }}
                {%  endif %}
            {% else %} {# todo: see if this is ok for layout #}
                {% if attribute.value|length > 1 %}
                    <ul class="attribute__values">
                        {% for attributeValue in attribute.value  %}
                            <li class="attribute__value-multiple">{{ attributeValue.value }}</li>
                        {% endfor %}
                    </ul>
                {% else %}
                    {{ attribute.value[0].value }}
                {% endif %}
            {% endif %}
        </div>
        {% if hasMotivation %}
            {% set tooltipValue = specifiedConsent.motivation(attribute) %}
            <input type="checkbox" tabindex="-1" class="tooltip visually-hidden" aria-expanded="false" role="button" aria-pressed="false" id="{{ tooltipId }}" name="{{ tooltipId }}" />
            {% include '@OpenConextProfile/helpers/tooltip.html.twig' with { tooltipValue: tooltipValue } %}
        {% endif %}
    </li>
{% endfor %}
<li class="idpRow">
    {% set consentProvidedBy %}
        <span class="idpRow__providedBy-content">{{ 'profile.my_services.idpRow.consent_provided_by'|trans }} <strong>{{ displayName }}</strong></span>
    {% endset %}

    {% if logo.hasLogo %}
        <img class="logo-small" src="{{ asset(logo.url) }}"
         alt="" />
    {% endif %}
    {% if sourceName != 'idp' %}
        {# note: the div is here only for IE11, as soon as IE11 support is scrapped, this can be removed along with the CSS/JS for it  #}
        <p>{{ consentProvidedBy|raw }}</p>
        <div class="ie11__link">
            <a class="idpRow__supportUrl" href="{{ 'profile.my_services.idpRow.support_url'|trans }}" target="_blank" rel="noreferrer noopener">{{ 'profile.my_services.idpRow.support_link'|trans }}</a>
        </div>
    {% else %}
        {% set sanitizedId = orgId|trim|escape('html_attr') %}
        <input type="checkbox" tabindex="-1" aria-hidden="true" class="modal visually-hidden" id="{{ sanitizedId }}" name="{{ sanitizedId }}" />
        {# note: the empty label is for display on mobile #}
        <p>{{ consentProvidedBy|raw }}<label tabindex="0" for="{{ id|trim }}" class="modal"></label>
        </p>
        {# note: the div is here only for IE11, as soon as IE11 support is scrapped, this can be removed along with the CSS/JS for it  #}
        <div class="ie11__label">
            <label tabindex="0" for="{{ sanitizedId }}" class="modal">
                <span class="label-text">{{ 'profile.my_services.idpRow.attributes_correction_text'|trans }}</span>
            </label>
            <span class="visually-hidden">{{ 'accessibility.button_screenreader'|trans }}</span>
        </div>
        {% include '@OpenConextProfile/helpers/correction.html.twig' %}
    {% endif %}
</li><commit_msg>Fix IdP logo display in My Services overview<commit_after>{% for attribute in releasedAttributes %}
    {% if attribute.attributeDefinition.hasUrnMace %}
        {% set attributeUrn = attribute.attributeDefinition.urnMace %}
    {% else %}
        {% set attributeUrn = attribute.attributeDefinition.urnOid %}
    {% endif %}
    {% set hasMotivation = specifiedConsent.hasMotivations %}
    {% set translatedAttributeName = ('profile.saml.attributes.' ~ attribute.attributeDefinition.name)|trans({}, 'saml') %}
    {% set nameFormat = sp.nameIdFormat %}
    {% if translatedAttributeName == 'profile.saml.attributes.' ~ attribute.attributeDefinition.name %}
        {% set attributeName = attributeUrn %}
    {% else %}
        {% set attributeName = translatedAttributeName %}
    {% endif %}
    {% set tooltipId = '%id%%index%'|replace({ '%id%': id, '%index%': loop.index })|trim %}
    <li class="attribute__row{% if not hasMotivation %} attribute__noTooltip{% endif %}">
        <div class="attribute__name">
            {{ attributeName }}
            {% if hasMotivation %}
                {% include '@OpenConextProfile/helpers/label.html.twig' with
                    {
                        class: 'tooltip',
                        hideText: true,
                        ariaExpandable: true,
                        id: tooltipId,
                        text: 'accessibility.consent_tooltip_screenreader'|trans({ '%attr_name%': attributeName|lower }),
                    }
                %}
            {% endif %}
        </div>
        <div class="attribute__value">
            {% if attribute.attributeDefinition.name == 'eduPersonTargetedID' and (
                nameFormat.isTransient or
                nameFormat.isPersistent)
            %}
                {% if nameFormat.isTransient %}
                    {{ 'profile.saml.attributes.eduPersonTargetedId.transient'|trans }}
                {%  else %}
                    {{ 'profile.saml.attributes.eduPersonTargetedId.persistent'|trans }}
                {%  endif %}
            {% else %} {# todo: see if this is ok for layout #}
                {% if attribute.value|length > 1 %}
                    <ul class="attribute__values">
                        {% for attributeValue in attribute.value  %}
                            <li class="attribute__value-multiple">{{ attributeValue.value }}</li>
                        {% endfor %}
                    </ul>
                {% else %}
                    {{ attribute.value[0].value }}
                {% endif %}
            {% endif %}
        </div>
        {% if hasMotivation %}
            {% set tooltipValue = specifiedConsent.motivation(attribute) %}
            <input type="checkbox" tabindex="-1" class="tooltip visually-hidden" aria-expanded="false" role="button" aria-pressed="false" id="{{ tooltipId }}" name="{{ tooltipId }}" />
            {% include '@OpenConextProfile/helpers/tooltip.html.twig' with { tooltipValue: tooltipValue } %}
        {% endif %}
    </li>
{% endfor %}
<li class="idpRow">
    {% set consentProvidedBy %}
        <span class="idpRow__providedBy-content">{{ 'profile.my_services.idpRow.consent_provided_by'|trans }} <strong>{{ displayName }}</strong></span>
    {% endset %}

    {% if logo.hasUrl %}
        <img class="logo-small" src="{{ asset(logo.url) }}"
         alt="" />
    {% endif %}
    {% if sourceName != 'idp' %}
        {# note: the div is here only for IE11, as soon as IE11 support is scrapped, this can be removed along with the CSS/JS for it  #}
        <p>{{ consentProvidedBy|raw }}</p>
        <div class="ie11__link">
            <a class="idpRow__supportUrl" href="{{ 'profile.my_services.idpRow.support_url'|trans }}" target="_blank" rel="noreferrer noopener">{{ 'profile.my_services.idpRow.support_link'|trans }}</a>
        </div>
    {% else %}
        {% set sanitizedId = orgId|trim|escape('html_attr') %}
        <input type="checkbox" tabindex="-1" aria-hidden="true" class="modal visually-hidden" id="{{ sanitizedId }}" name="{{ sanitizedId }}" />
        {# note: the empty label is for display on mobile #}
        <p>{{ consentProvidedBy|raw }}<label tabindex="0" for="{{ id|trim }}" class="modal"></label>
        </p>
        {# note: the div is here only for IE11, as soon as IE11 support is scrapped, this can be removed along with the CSS/JS for it  #}
        <div class="ie11__label">
            <label tabindex="0" for="{{ sanitizedId }}" class="modal">
                <span class="label-text">{{ 'profile.my_services.idpRow.attributes_correction_text'|trans }}</span>
            </label>
            <span class="visually-hidden">{{ 'accessibility.button_screenreader'|trans }}</span>
        </div>
        {% include '@OpenConextProfile/helpers/correction.html.twig' %}
    {% endif %}
</li>
{'fraction_non_alphanumeric': 0.1481404529399543, 'fraction_numerical': 0.003739871182214835, 'mean_word_length': 2.2218875502008033, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3527038', 'n_tokens_mistral': 2899, 'n_tokens_neox': 2600, 'n_words': 572}