{{ header }}
<div class="login-bg-wrapper" style="background-image:url(catalog/view/theme/default/image/login-bg.png)">
  <div class="container">
    {{ include(helper.template('_partial/breadcrumb')) }}
    <div class="row">
      <div id="content" class="col-sm-12">{{ content_top }}
        {% if false %}
        <div class="col-sm-6">
          <div class="well">
            <h2>{{ text_new_customer }}</h2>
            <p><strong>{{ text_register }}</strong></p>
            <p>{{ text_register_account }}</p>
            <a href="{{ register }}" class="btn btn-primary">{{ button_continue }}</a></div>
        </div>
        {% endif %}
        <div class="well login-wrapper">
          <!-- <h2>{{ text_returning_customer }}</h2> -->
          <div class="title-link">
            <a href="javascript:;" class="active">{{ text_returning_customer }}</a>
            <a href="{{ helper.url.link('account/register') }}">{{ text_new_customer }}</a>
          </div>
          {% if success %}
          <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}</div>
          {% endif %}
          {% if error_warning %}
          <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
          {% endif %}
          <form action="{{ action }}" method="post" enctype="multipart/form-data">
            <ul class="nav nav-tabs mb-1">
              <li id="tab-mobile-li" class="{{ type == 'mobile' ? 'active' : '' }}"><a href="#tab-mobile" data-toggle="tab">{{ text_login_mobile }}</a></li>
              <li id="tab-email-li" class="{{ type == 'email' ? 'active' : '' }}"><a href="#tab-email" data-toggle="tab">{{ text_login_email }}</a></li>
            </ul>
            <div class="tab-content form-group">
              <div class="tab-pane {{ type == 'mobile' ? 'active' : '' }}" id="tab-mobile">
                {% if helper.is_ft() %}
                  <div class="row">
                    <div class="col-xs-4">
                      <select id="input-pre-telephone" name="calling_code" class="form-control" data-toggle="tooltip" style="height: 48px;">
                        {% for country in helper.get_calling_codes() %}
                          {% if calling_code == country.code %}
                            <option value="{{ country.code }}" selected="selected">{{ country.name }}(+{{ country.code }})</option>
                          {% else %}
                            <option value="{{ country.code }}">{{ country.name }}(+{{ country.code }})</option>
                          {% endif %}
                        {% endfor %}
                      </select>
                    </div>
                    <div class="col-xs-8">
                      <input name="telephone" value="{{ telephone }}" id="input-telephone"
                             class="form-control" placeholder="{{ entry_telephone }}" />
                    </div>
                  </div>
                {% else %}
                  <input type="tel" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
                {% endif %}
              </div>
              <div class="tab-pane {{ type == 'email' ? 'active' : '' }}" id="tab-email">
                <input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
              </div>
              <input type="hidden" name="type" value="{{ type }}" id="input-type"/>
            </div>
            <div class="form-group">
              <input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" />
            </div>
            <div class="form-group register-box">
              <a class="pull-left" href="{{ forgotten }}">{{ text_forgotten }}</a>
              <a class="pull-right" href="{{ register }}">{{ text_new_customer }}</a>
            </div>
            <input type="submit" value="{{ button_login }}" class="btn btn-primary" />
            {% if redirect %}
            <input type="hidden" name="redirect" value="{{ redirect }}" />
            {% endif %}
            {{ include(helper.template('_partial/omni_auth_section')) }}
          </form>
        </div>
        {{ content_bottom }}</div>
      </div>
  </div>
</div>
<script type="text/javascript"><!--
  $('#tab-email-li').on('click', function () {
    $('#input-type').val('email');
  });
  $('#tab-mobile-li').on('click', function () {
    $('#input-type').val('mobile');
  });
  //--></script>
{{ footer }}
