templates/backend/advanced_search/partials/_search.html.twig line 1

Open in your IDE?
  1. {{ form_start(advancedSearchForm, {attr: {'id': 'advancedSearchForm'}}) }}
  2.     <div
  3.             {{ stimulus_controller('search') }}
  4.             data-search-params-value="{{ searchParams|json_encode }}"
  5.             data-search-entity-value="{{ entity }}"
  6.     >
  7.         <div class="row mb-3">
  8.             <div class="col-12 text-start">
  9.                 <button
  10.                         type="button"
  11.                         class="btn btn-sm btn-success btn-add-criteria"
  12.                         data-prototype="{{ form_widget(advancedSearchForm.searchCriteria.vars.prototype)|e }}"
  13.                 >
  14.                     <i class="fas fa-plus"></i> Ajouter un critère
  15.                 </button>
  16.             </div>
  17.         </div>
  18.         <div class="mb-3" id="search-field">
  19.             {% for key, criteria in advancedSearchForm.searchCriteria %}
  20.                 {{ include('backend/advanced_search/partials/_criteria.html.twig', {'criteria': criteria, 'key': key}) }}
  21.             {% endfor %}
  22.         </div>
  23.         <div class="row mt-4">
  24.             <div class="col-10 pt-2">
  25.                 {% if entity in ['entreprise', 'contact', 'user_crm', 'user_member', 'cotisation', 'order'] %}
  26.                     <div class="form-check d-inline-block">
  27.                         <input name="for_not_display_achived" id="for_not_display_achived" class="form-check-input" type="checkbox"{{ forNotDisplayArchived == true ? ' checked' }}>
  28.                         <label class="form-check-label" for="for_not_display_achived">Afficher les enregistrements archivées</label>
  29.                     </div>
  30.                 {% endif %}
  31.                 {% if entity == 'contact' and is_granted('ROLE_DISPLAY_SEND_MAIL_AND_SMS') %}
  32.                     <div class="form-check d-inline-block">
  33.                         <input name="for_email" id="for_email" class="form-check-input" type="checkbox"{{ forEmailSending == true ? ' checked' }}>
  34.                         <label class="form-check-label" for="for_email">Pour envoi de Courriel</label>
  35.                     </div>
  36.                     <div class="form-check d-inline-block px-5">
  37.                         <input name="for_sms" id="for_sms" class="form-check-input" type="checkbox"{{ forSmsSending == true ? ' checked' }}>
  38.                         <label class="form-check-label" for="for_sms">Pour envoi de SMS</label>
  39.                     </div>
  40.                 {% endif %}
  41.             </div>
  42.             <div class="col-2 text-end">
  43.                 <button type="submit" class="btn btn-sm btn-primary" title="Lancer la recherche">
  44.                     <i class="fas fa-search"></i> Rechercher
  45.                 </button>
  46.                 <button type="reset" class="btn btn-sm btn-danger btn-icon" title="Réinitialiser la recherche">
  47.                     <i class="fas fa-ban"></i>
  48.                 </button>
  49.             </div>
  50.         </div>
  51.     </div>
  52. {{ form_end(advancedSearchForm) }}