templates/modules/search-widget/journey/preferences-form.html.twig line 1

Open in your IDE?
  1. {% if not (isWidget is defined and isWidget is same as(true)) and isTransitPassEnabled is defined and isTransitPassEnabled is same as(true) %}
  2. <div class="is-AdvancedSearch-Fieldset is-AdvancedSearch-SubscriptionsFieldset">
  3. <p class="is-AdvancedSearch-Label">{{ 'journey.traveller_profile.title'|trans }}</p>
  4. <p class="is-AdvancedSearch-SubscriptionsLabel">
  5. <span>{{ 'journey.traveller_profile.my_subscriptions'|trans }}</span>
  6. <a class="is-AdvancedSearch-ConfigureSubscriptionsInfosLink" data-toggle="modal" data-target="#is-SubscriptionsInfosModal">
  7. <i class="is-Icon is-Icon-com-info_outline" aria-hidden="true"></i>
  8. </a>
  9. </p>
  10. <div id="is-SubscriptionsInfosModal" class="is-Modal is-SubscriptionsInfosModal is-fade" tabindex="-1" role="dialog" aria-labelledby="is-SubscriptionsInfosModal-Label">
  11. <div class="is-Modal-Dialog" role="document">
  12. <div class="is-Modal-Content">
  13. <div class="is-Modal-Header">
  14. <button type="button" class="is-Close" data-dismiss="modal" aria-label="{{ 'close' | trans }}"><i class="is-Icon is-Icon-com-close-thin" aria-hidden="true"></i></button>
  15. <h1 class="is-Modal-Title" id="is-SubscriptionsInfosModal-Label">{{ 'journey.traveller_profile.my_subscriptions'|trans }}</h1>
  16. </div>
  17. <div class="is-Modal-Body">
  18. <p class="is-SubscriptionsInfosModal-Message">{{ 'journey.traveller_profile.subscriptions_infos_modal.description'|trans }}</p>
  19. <div class="is-ButtonArea">
  20. <button data-dismiss="modal" class="is-Button is-Button_Primary is-full-width">{{ 'journey.traveller_profile.subscriptions_infos_modal.i_understood'|trans }}</button>
  21. </div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="is-ActiveSubscriptions is-ActiveSubscriptions_Empty">
  27. <div class="is-ActiveSubscriptions-ListWrapper">
  28. <p class="is-ActiveSubscriptions-EmptyList">{{ 'journey.traveller_profile.no_subscriptions'|trans }}</p>
  29. </div>
  30. <a
  31. data-toggle="modal"
  32. class="is-AdvancedSearch-ConfigureSubscriptionsLink{{ not is_granted('IS_AUTHENTICATED_REMEMBERED') ? ' is-ShowLoginModalButton' : '' }}"
  33. data-target="{{ is_granted('IS_AUTHENTICATED_REMEMBERED') ? '#is-SubscriptionsModal' : '#is-LoginModal' }}">
  34. {{ 'journey.traveller_profile.configure'|trans }}
  35. </a>
  36. </div>
  37. <div id="is-SubscriptionsModal" class="is-Modal is-SubscriptionsModal is-fade" tabindex="-1" role="dialog" aria-labelledby="is-SubscriptionsModal-Label">
  38. <div class="is-Modal-Dialog" role="document">
  39. <div class="is-Modal-Content">
  40. <div class="is-Modal-Header">
  41. <button type="button" class="is-Close" data-dismiss="modal" aria-label="{{ 'close' | trans }}"><i class="is-Icon is-Icon-com-close-thin" aria-hidden="true"></i></button>
  42. <h1 class="is-Modal-Title" id="is-SubscriptionsModal-Label">{{ 'journey.traveller_profile.my_subscriptions'|trans }}</h1>
  43. </div>
  44. <div class="is-Modal-Body"></div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. {% endif %}
  50. {% if preferences.displayMode %}
  51. <div class="is-Field" role="group" aria-labelledby="is-user-preference-modes">
  52. <p class="is-AdvancedSearch-Label" id="is-user-preference-modes">{{ "user.preferences.modes" | trans }}</p>
  53. <div class="is-Modes-Lists_Wrapper">
  54. <ul class="is-Modes-List is-Modes-List_Left">
  55. {% if modes|length < 6 %}
  56. {% for mode in modes %}
  57. <li class="is-Modes-List-Item">
  58. <label class="is-CheckboxLabel" for="is-IncludedModes-{{ mode }}">
  59. <input class="is-includedMode is-Checkbox{% if mode not in preferences.tripPlanner.excludedModes %} is-Checkbox_Checked" checked="checked"{% else %}"{% endif %} type="checkbox" id="is-IncludedModes-{{ mode }}" name="includedModes[]" value="{{ mode }}" />
  60. <i class="is-Icon is-Icon-com-checkbox" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  61. {{ ('mode.'~(mode | lower)) | trans }}
  62. </label>
  63. </li>
  64. {% endfor %}
  65. {% else %}
  66. {% set halfModes = (modes|length / 2)|round(0, 'ceil') %}
  67. {% for mode in modes|slice(0, halfModes) %}
  68. <li class="is-Modes-List-Item">
  69. <label class="is-CheckboxLabel" for="is-IncludedModes-{{ mode }}">
  70. <input class="is-includedMode is-Checkbox{% if mode not in preferences.tripPlanner.excludedModes %} is-Checkbox_Checked" checked="checked"{% else %}"{% endif %} type="checkbox" id="is-IncludedModes-{{ mode }}" name="includedModes[]" value="{{ mode }}" />
  71. <i class="is-Icon is-Icon-com-checkbox" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  72. {{ ('mode.'~(mode | lower)) | trans }}
  73. </label>
  74. </li>
  75. {% endfor %}
  76. </ul>
  77. <ul class="is-Modes-List is-Modes-List_Right">
  78. {% for mode in modes|slice(halfModes, modes|length) %}
  79. <li class="is-Modes-List-Item">
  80. <label class="is-CheckboxLabel" for="is-IncludedModes-{{ mode }}">
  81. <input class="is-includedMode is-Checkbox{% if mode not in preferences.tripPlanner.excludedModes %} is-Checkbox_Checked" checked="checked"{% else %}"{% endif %} type="checkbox" id="is-IncludedModes-{{ mode }}" name="includedModes[]" value="{{ mode }}" />
  82. <i class="is-Icon is-Icon-com-checkbox" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  83. {{ ('mode.'~(mode | lower)) | trans }}
  84. </label>
  85. </li>
  86. {% endfor %}
  87. </ul>
  88. {% endif %}
  89. </div>
  90. </div>
  91. {% endif %}
  92. {% if enable_hurry_traveler is defined and enable_hurry_traveler == true %}
  93. <div class="is-Drawers-ItemToggle">
  94. <span class="is-Drawers-ItemToggleLabel is-AdvancedSearch-Label">
  95. {{ 'mode.hurryTraveler' | trans }}
  96. </span>
  97. <label class="is-Drawers-ItemToggleButton is-ToggleButton" id="is-toggle_Preferences">
  98. <input class="is-HurryTravellerToggleInput" type="checkbox">
  99. <span class="is-ToggleButton-Switcher"></span>
  100. </label>
  101. </div>
  102. {% endif %}
  103. <div class="is-Field" {% if enable_hurry_traveler is defined and enable_hurry_traveler == true %}id="is-group_Preferences"{% endif %}>
  104. {% if preferences.restrictScholar %}
  105. <div class="is-Field" id="is-ScholarLines" role="group" aria-labelledby="is-scholar-lines">
  106. <label class="is-AdvancedSearch-Label" for="is-ScholarLines" id="is-scholar-lines">{{ 'user.preferences.scholar_lines' | trans }}</label>
  107. <label class="is-CheckboxLabel" for="is-Scholar">
  108. <input class="is-ScholarLines is-Checkbox" type="checkbox" id="is-Scholar" name="scholarLines" value="{{ constant('App\\Model\\ResultCriterion::RESTRICT_SCHOLAR') }}" />
  109. <i class="is-Icon is-Icon-com-checkbox" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  110. {{ 'user.preferences.restrict_scholar_lines' | trans }}
  111. </label>
  112. </div>
  113. {% elseif preferences.displayScholar %}
  114. <div class="is-Field" id="is-ScholarLines" role="group" aria-labelledby="is-scholar-lines">
  115. <label class="is-AdvancedSearch-Label" for="is-ScholarLines" id="is-scholar-lines">{{ 'user.preferences.scholar_lines' | trans }}</label>
  116. <label class="is-CheckboxLabel" for="is-Scholar">
  117. <input class="is-ScholarLines is-Checkbox is-Checkbox_Checked" checked="checked" type="checkbox" id="is-Scholar" name="scholarLines" value="{{ constant('App\\Model\\ResultCriterion::INCLUDE_SCHOLAR') }}" />
  118. <i class="is-Icon is-Icon-com-checkbox" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  119. {{ 'user.preferences.use_scholar_lines' | trans }}
  120. </label>
  121. </div>
  122. {% endif %}
  123. {% if preferences.displayWalkSpeed %}
  124. <div class="is-Field" id="is-WalkProfile" role="group" aria-labelledby="is-walk-profile">
  125. <label class="is-AdvancedSearch-Label" for="is-WalkProfile" id="is-walk-profile">{{ 'user.preferences.walk_profile' | trans }}</label>
  126. <ul class="is-RadioBtn-List is-RadioBtn-List_Vertical">
  127. <li class="is-RadioBtn-Item">
  128. <label class="is-RadioLabel" for="is-WalkProfile_FAST">
  129. <input class="is-RadioBtn{% if preferences.tripPlanner.walkProfile == constant('App\\Model\\PreferenceProfiles::WALK_PROFILE_FAST') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-WalkProfile_FAST" name="walkProfile" value="2" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.walk_fast" | trans }}
  130. </label>
  131. </li>
  132. <li class="is-RadioBtn-Item">
  133. <label class="is-RadioLabel" for="is-WalkProfile_NORMAL">
  134. <input class="is-RadioBtn{% if preferences.tripPlanner.walkProfile == constant('App\\Model\\PreferenceProfiles::WALK_PROFILE_NORMAL') or preferences.tripPlanner.walkProfile is empty %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-WalkProfile_NORMAL" name="walkProfile" value="1" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.walk_normal" | trans }}
  135. </label>
  136. </li>
  137. <li class="is-RadioBtn-Item">
  138. <label class="is-RadioLabel" for="is-WalkProfile_SLOW">
  139. <input class="is-RadioBtn{% if preferences.tripPlanner.walkProfile == constant('App\\Model\\PreferenceProfiles::WALK_PROFILE_SLOW') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-WalkProfile_SLOW" name="walkProfile" value="0" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.walk_slow" | trans }}
  140. </label>
  141. </li>
  142. </ul>
  143. </div>
  144. {% endif %}
  145. {% if preferences.displayBikeLevel %}
  146. <div class="is-Field" id="is-BikeProfile" role="group" aria-labelledby="is-bike-profile">
  147. <label class="is-AdvancedSearch-Label" for="is-BikeProfile" id="is-bike-profile">{{ 'user.preferences.bike_profile_v2' | trans }}</label>
  148. <ul class="is-RadioBtn-List is-RadioBtn-List_Vertical">
  149. <li class="is-RadioBtn-Item">
  150. <label class="is-RadioLabel" for="is-BikeProfile_SLOW">
  151. <input class="is-RadioBtn{% if preferences.tripPlanner.bikeProfile == constant('App\\Model\\PreferenceProfiles::BIKE_PROFILE_SLOW') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-BikeProfile_SLOW" name="bikeProfile" value="0" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.bike_slow_v2" | trans }} <span class="is-Bike-Speed-Label">({{ "user.preferences.bike_slow_v2_km" | trans }})</span>
  152. </label>
  153. </li>
  154. <li class="is-RadioBtn-Item">
  155. <label class="is-RadioLabel" for="is-BikeProfile_NORMAL">
  156. <input class="is-RadioBtn{% if preferences.tripPlanner.bikeProfile == constant('App\\Model\\PreferenceProfiles::BIKE_PROFILE_NORMAL') or preferences.tripPlanner.bikeProfile is empty %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-BikeProfile_NORMAL" name="bikeProfile" value="1" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.bike_normal_v2" | trans }} <span class="is-Bike-Speed-Label"> ({{ "user.preferences.bike_normal_v2_km" | trans }})</span>
  157. </label>
  158. </li>
  159. <li class="is-RadioBtn-Item">
  160. <label class="is-RadioLabel" for="is-BikeProfile_FAST">
  161. <input class="is-RadioBtn{% if preferences.tripPlanner.bikeProfile == constant('App\\Model\\PreferenceProfiles::BIKE_PROFILE_FAST') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-BikeProfile_FAST" name="bikeProfile" value="2" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.bike_fast_v2" | trans }} <span class="is-Bike-Speed-Label"> ({{ "user.preferences.bike_fast_v2_km" | trans }})</span>
  162. </label>
  163. </li>
  164. {% if preferences.displayVTT %}
  165. <li class="is-RadioBtn-Item">
  166. <label class="is-RadioLabel" for="is-BikeProfile_VTT">
  167. <input class="is-RadioBtn{% if preferences.tripPlanner.bikeProfile == constant('App\\Model\\PreferenceProfiles::BIKE_PROFILE_VTT') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-BikeProfile_VTT" name="bikeProfile" value="3" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.bike_vtt_v2" | trans }} <span class="is-Bike-Speed-Label"> ({{ "user.preferences.bike_vtt_v2_km" | trans }})</span>
  168. </label>
  169. </li>
  170. {% endif %}
  171. {% if preferences.displayVAE %}
  172. <li class="is-RadioBtn-Item">
  173. <label class="is-RadioLabel" for="is-BikeProfile_VAE">
  174. <input class="is-RadioBtn{% if preferences.tripPlanner.bikeProfile == constant('App\\Model\\PreferenceProfiles::BIKE_PROFILE_VAE') %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-BikeProfile_VAE" name="bikeProfile" value="4" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "user.preferences.bike_vae_v2" | trans }} <span class="is-Bike-Speed-Label"> ({{ "user.preferences.bike_vae_v2_km" | trans }})</span>
  175. </label>
  176. </li>
  177. {% endif %}
  178. </ul>
  179. </div>
  180. {% endif %}
  181. </div>
  182. {% if preferences.displayAccessibility %}
  183. <div class="is-Field">
  184. <label class="is-AdvancedSearch-Label" for="is-WheelchairAccessible">{{ 'user.preferences.wheelchair_accessible' | trans }}</label>
  185. <ul class="is-RadioBtn-List is-RadioBtn-List_Horizontal">
  186. <li class="is-RadioBtn-Item">
  187. <label class="is-RadioLabel" for="is-WheelchairAccessible_NO">
  188. <input class="is-RadioBtn{% if not preferences.tripPlanner.wheelchairAccessible %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-WheelchairAccessible_NO" name="wheelchairAccessible" value="false" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "widget.no" | trans }}
  189. </label>
  190. </li>
  191. <li class="is-RadioBtn-Item">
  192. <label class="is-RadioLabel" for="is-WheelchairAccessible_YES">
  193. <input class="is-RadioBtn{% if preferences.tripPlanner.wheelchairAccessible %} is-RadioBtn_Checked" checked="checked"{% else %}"{% endif %} type="radio" id="is-WheelchairAccessible_YES" name="wheelchairAccessible" value="true" /><i class="is-Icon is-Icon-com-radio-btn" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>{{ "widget.yes" | trans }}
  194. </label>
  195. </li>
  196. </ul>
  197. </div>
  198. {% endif %}