{% trans_default_domain 'users' %}
<div {{ attributes }}>
   {% if this.renderLoginForm %}
      <twig:UserLogin:Form disableReloadEmitInstead="true" />
   {% else %}
      {% if this.renderReviewForm %}
         <twig:Product:Reviews:Forms:WriteForm id_product="{{ this.id_product }}"/>
      {% else %}
         <div class="review-form">
            <div>
               {% if not this.isUserLoggedIn %}
                  <p class="title-default">{{ 'log.in.alert'|trans }}</p>
                  <button
                        class="btn btn-primary btn-block"
                        data-action="live#action"
                        data-live-action-param="handleOpenLogin">
                     Přihlásit se
                  </button>
               {% else %}
                  <span>{{ 'no.product.order.account'|trans }}</span>
               {% endif %}
               <div class="no-registration-form">
                  <p class="title-default">{{ 'loggedOut.order.question'|trans }}</p>
                  {{ form_start(form, {
                     attr: {
                        'data-action': 'live#action',
                        'data-live-action-param': 'handleCheckForm',
                     },
                  }) }}
                     <div class="form-group">
                        {{ form_row(form.email, {attr: {class: 'form-control'}, label: false}) }}
                     </div>
                     <div class="form-group">
                        {{ form_row(form.orderNo, {attr: {class: 'form-control'}, label: false}) }}
                     </div>
                     <button type="submit" class="btn btn-primary btn-block">{{ 'info.order.load'|trans }}</button>
                  {{ form_end(form, {render_rest: false}) }}
               </div>
            </div>
         </div>
      {% endif %}
   {% endif %}
</div>
