feat: always show all available ski passes but readonly if age doesn't match
This commit is contained in:
@@ -68,17 +68,22 @@
|
||||
{% if choiceData %}
|
||||
<td class="border border-primary-bg p-2 align-top w-24 text-right whitespace-nowrap">
|
||||
{% if choiceData.price is defined %}
|
||||
{{ choiceData.price | format_service_price }}
|
||||
{% set isPkw = choiceData.subType is defined and choiceData.subType in ['PKW', 'CAR'] %}
|
||||
{{ choiceData.price | format_service_price(not isPkw) }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="border border-primary-bg p-2 align-top w-12 text-center">
|
||||
{% set childTooltip = child.vars.attr['data-tooltip']|default(null) %}
|
||||
<div class="{{ html_classes({ 'cursor-not-allowed': isReadonly }) }}"{% if childTooltip is not null %} {{ stimulus_controller('tooltip', { 'content': childTooltip }) }}{% endif %}>
|
||||
<div class="{{ isReadonly ? 'pointer-events-none' : '' }}">
|
||||
{{- form_widget(child, { 'attr': child_attr }) -}}
|
||||
{% if isReadonly or childTooltip is not null %}
|
||||
<div{% if isReadonly %} class="cursor-not-allowed"{% endif %}{% if childTooltip is not null %} {{ stimulus_controller('tooltip', { 'content': childTooltip }) }}{% endif %}>
|
||||
<div{% if isReadonly %} class="pointer-events-none"{% endif %}>
|
||||
{{- form_widget(child, { 'attr': child_attr }) -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{- form_widget(child, { 'attr': child_attr }) -}}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor -%}
|
||||
|
||||
Reference in New Issue
Block a user