src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/cards/form-groups/salutation.html.twig line 1

Open in your IDE?
  1. {% set customerSalutation = customer is not null ? customer.getSalutationObject() : null %}
  2. {% set defaultSalutation = customerSalutation is not null ? customerSalutation : demi_core_configuration("getDefaultSalutation",[]) %}
  3. {% set defaultSalutationId = defaultSalutation is not empty ? defaultSalutation.getId() : null %}
  4. <div class="form-group">
  5.     <label class="form-box form-box--gray">
  6.         <span class="form-box__label">{{ 'demi.booking.checkout.salutation'|trans }} *</span>
  7.         <select name="salutation" class="form-box__content form-control" required
  8.                 autocomplete="honorific-prefix">
  9.             <option value="">{{ 'demi.booking.checkout.please-choose'|trans }}</option>
  10.             {% for salutation in demi_getSortedSalutations() %}
  11.                 {% if salutation["title"] is not empty %}
  12.                 <option {{ defaultSalutationId == salutation["oo_id"] ? 'selected' : '' }} value="{{ salutation["oo_id"] }}">{{ salutation["title"] }}</option>
  13.                 {% endif %}
  14.             {% endfor %}
  15.         </select>
  16.         <span class="demi-icon demi-icon-chevron-down form-box__select-icon" aria-hidden="true"></span>
  17.     </label>
  18.     <div class="form-errors"></div>
  19. </div>