{{ header }}
{% if journal3.get('pageTitlePosition') == 'top' %}
  <h1 class="title page-title {{ journal3.get('title_color_scheme') }}"><span class="page-title-text">{{ heading_title }}</span></h1>
{% endif %}
<div class="breadcrumbs {{ journal3.get('breadcrumbs_color_scheme') }}">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
      <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
</div>
{{ journal3_top }}
<div id="account-return" class="container">
  {% if error_warning %}
  <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}</div>
  {% endif %}
  <div class="row"> {{ column_left }}
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">
      {% if journal3.get('pageTitlePosition') == 'default' %}
      <h1 class="title page-title {{ journal3.get('title_color_scheme') }}">{{ heading_title }}</h1>
      {% endif %}
      {{ content_top }}
      <p>{{ text_description }}</p>
      <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-horizontal">
        <fieldset>
          <legend>{{ text_order }}</legend>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-firstname">{{ entry_firstname }}</label>
            <div class="col-sm-10">
              <input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control" />
              {% if error_firstname %}
              <div class="text-danger">{{ error_firstname }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-lastname">{{ entry_lastname }}</label>
            <div class="col-sm-10">
              <input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control" />
              {% if error_lastname %}
              <div class="text-danger">{{ error_lastname }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-email">{{ entry_email }}</label>
            <div class="col-sm-10">
              <input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control" />
              {% if error_email %}
              <div class="text-danger">{{ error_email }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-telephone">{{ entry_telephone }}</label>
            <div class="col-sm-10">
              <input type="text" name="telephone" value="{{ telephone }}" placeholder="{{ entry_telephone }}" id="input-telephone" class="form-control" />
              {% if error_telephone %}
              <div class="text-danger">{{ error_telephone }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-order-id">{{ entry_order_id }}</label>
            <div class="col-sm-10">
              <input type="text" name="order_id" value="{{ order_id }}" placeholder="{{ entry_order_id }}" id="input-order-id" class="form-control" />
              {% if error_order_id %}
              <div class="text-danger">{{ error_order_id }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-date-ordered">{{ entry_date_ordered }}</label>
            <div class="col-sm-3">
              <div class="input-group date">
                <input type="text" name="date_ordered" value="{{ date_ordered }}" placeholder="{{ entry_date_ordered }}" data-date-format="YYYY-MM-DD" id="input-date-ordered" class="form-control" />
                <span class="input-group-btn">
                <button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
                </span></div>
            </div>
          </div>
        </fieldset>
        <fieldset>
          <legend>{{ text_product }}</legend>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-product">{{ entry_product }}</label>
            <div class="col-sm-10">
              <input type="text" name="product" value="{{ product }}" placeholder="{{ entry_product }}" id="input-product" class="form-control" />
              <input type="hidden" name="product_id" value="{{ product_id }}" />
              {% if error_product %}
              <div class="text-danger">{{ error_product }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label" for="input-model">{{ entry_model }}</label>
            <div class="col-sm-10">
              <input type="text" name="model" value="{{ model }}" placeholder="{{ entry_model }}" id="input-model" class="form-control" />
              {% if error_model %}
              <div class="text-danger">{{ error_model }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-quantity">{{ entry_quantity }}</label>
            <div class="col-sm-10">
              <input type="text" name="quantity" value="{{ quantity }}" placeholder="{{ entry_quantity }}" id="input-quantity" class="form-control" />
            </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label">{{ entry_reason }}</label>
            <div class="col-sm-10"> {% for return_reason in return_reasons %}
              {% if return_reason.return_reason_id == return_reason_id %}
              <div class="radio">
                <label>
                  <input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" checked="checked" />
                  {{ return_reason.name }}</label>
              </div>
              {% else %}
              <div class="radio">
                <label>
                  <input type="radio" name="return_reason_id" value="{{ return_reason.return_reason_id }}" />
                  {{ return_reason.name }}</label>
              </div>
              {% endif %}
              {% endfor %}
              {% if error_reason %}
              <div class="text-danger">{{ error_reason }}</div>
              {% endif %} </div>
          </div>
          <div class="form-group required">
            <label class="col-sm-2 control-label">{{ entry_opened }}</label>
            <div class="col-sm-10">
              <label class="radio-inline"> {% if opened %}
                <input type="radio" name="opened" value="1" checked="checked" />
                {% else %}
                <input type="radio" name="opened" value="1" />
                {% endif %}
                {{ text_yes }}</label>
              <label class="radio-inline"> {% if not opened %}
                <input type="radio" name="opened" value="0" checked="checked" />
                {% else %}
                <input type="radio" name="opened" value="0" />
                {% endif %}
                {{ text_no }}</label>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="input-comment">{{ entry_fault_detail }}</label>
            <div class="col-sm-10">
              <textarea name="comment" rows="10" placeholder="{{ entry_fault_detail }}" id="input-comment" class="form-control">{{ comment }}</textarea>
            </div>
          </div>
          {{ captcha }}
        </fieldset>
        {% if text_agree %}
        <div class="buttons clearfix">
          <div class="pull-left"><a href="{{ back }}" class="btn btn-danger">{{ button_back }}</a></div>
          <div class="pull-right">{{ text_agree }}
            {% if agree %}
            <input type="checkbox" name="agree" value="1" checked="checked" />
            {% else %}
            <input type="checkbox" name="agree" value="1" />
            {% endif %}
            <button type="submit" class="btn btn-primary"><span>{{ button_continue }}</span></button>
          </div>
        </div>
        {% else %}
        <div class="buttons clearfix">
          <div class="pull-left"><a href="{{ back }}" class="btn btn-default">{{ button_back }}</a></div>
          <div class="pull-right">
            <button type="submit" class="btn btn-primary"><span>{{ button_continue }}</span></button>
          </div>
        </div>
        {% endif %}
      </form>
      {{ content_bottom }}</div>
    {{ column_right }}</div>
</div>
<script type="text/javascript"><!--
$('.date').datetimepicker({
	language: '{{ datepicker }}',
	pickTime: false
});
//--></script> 
{{ footer }}
