{% block component_form_select_birthday %} {% set birthday = false %} {% set birthmonth = false %} {% set birthyear = false %} {% if data.has('birthdayDay') === true and data.get('birthdayDay') is not empty %} {# Registration Form #} {% if data.get('birthdayDay') is not empty %} {% set birthday = data.get('birthdayDay') %} {% endif %} {% if data.get('birthdayMonth') is not empty %} {% set birthmonth = data.get('birthdayMonth') %} {% endif %} {% if data.get('birthdayYear') is not empty %} {% set birthyear = data.get('birthdayYear') %} {% endif %} {% elseif data.birthday %} {# Profile Page #} {% set birthday = data.birthday|date('d', false) %} {% set birthmonth = data.birthday|date('m', false) %} {% set birthyear = data.birthday|date('Y', false) %} {% endif %}
{% block component_form_select_birthday_label %} {% if label %} {% endif %} {% endblock %}
{% block component_form_select_birthday_day %}
{% block component_form_select_birthday_day_select %} {% endblock %} {% block component_form_select_birthday_day_feedback %}
{% block component_form_select_birthday_day_feedback_violations %} {% if formViolations.getViolations('/birthdayDay') is not empty %} {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with { violationPath: '/birthdayDay' } %} {% endif %} {% endblock %}
{% endblock %}
{% endblock %} {% block component_form_select_birthday_month %}
{% block component_form_select_birthday_month_select %} {% endblock %} {% block component_form_select_birthday_month_feedback %}
{% block component_form_select_birthday_month_feedback_violations %} {% if formViolations.getViolations('/birthdayMonth') is not empty %} {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with { violationPath: '/birthdayMonth' } %} {% endif %} {% endblock %}
{% endblock %}
{% endblock %} {% block component_form_select_birthday_year %}
{% block component_form_select_birthday_year_select %} {% set currentYear = 'now'|date('Y') %} {% set startYear = currentYear - 120 %} {% endblock %} {% block component_form_select_birthday_year_feedback %}
{% block component_form_select_birthday_year_feedback_violations %} {% if formViolations.getViolations('/birthdayYear') is not empty %} {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' with { violationPath: '/birthdayYear' } %} {% endif %} {% endblock %}
{% endblock %}
{% endblock %}
{% endblock %}