<form action="" method="GET" class="style">
    <fieldset class="">
        <h1>
            <a class="show el">
                Search <i class="fa fa-caret-right"></i>
            </a>
        </h1>
        <div class="row">
            <label for="id">
                Consultation ID
            </label>
            <input type="text"
                   name="id"
                   id="id"
                   value="{{ request.id }}"
            />
        </div>
        <div class="row">
            <label for="status">
                Status
            </label>
            <select name="status"
                    id="status"
            >
                <option value="">-</option>
                {% for status in statuses %}
                    <option value="{{ status }}"
                            {{ status == request.status ? 'selected' : '' }}
                    >
                        {{ status }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="medium">
                Medium
            </label>
            <select name="medium"
                    id="medium"
            >
                <option value="">-</option>
                {% for medium, mediumName in mediums %}
                    <option value="{{ medium }}"
                            {{ medium == request.medium ? 'selected' : '' }}
                    >
                        {{ mediumName }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="rate_id">
                Type
            </label>
            <select name="rate_id"
                    id="rate_id"
            >
                <option value="">-</option>
                {% for rate in rates %}
                    <option value="{{ rate.id }}"
                            {{ rate.id == request.rate_id ? 'selected' : '' }}
                    >
                        {{ rate.name }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="user_id">
                Assigned To
            </label>
            <select name="user_id"
                    id="user_id"
            >
                <option value="">-</option>
                {% for user in users %}
                    <option value="{{ user.id }}"
                            {{ user.id == request.user_id ? 'selected' : '' }}
                    >
                        {{ user.name }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="price">
                Price
            </label>
            <select name="price"
                    id="price"
            >
                <option value="">
                    All
                </option>
                <option value="free"
                        {{ request.price == 'free' ? 'selected' : '' }}
                >
                    Free
                </option>
                <option value="costed"
                        {{ request.price == 'costed' ? 'selected' : '' }}
                >
                    Costed
                </option>
            </select>
        </div>
        <div class="row">
            <label for="member_id">
                Patient ID
            </label>
            <input type="text"
                   name="member_id"
                   id="member_id"
                   value="{{ request.member_id }}"
            />
        </div>
        <div class="row">
            <label for="firstname">
                First name
            </label>
            <input type="text"
                   name="firstname"
                   id="firstname"
                   value="{{ request.firstname }}"
            />
            <div class="defaultValue">
                <small>
                    Use complete value for search, partial search is not available
                </small>
            </div>
        </div>
        <div class="row">
            <label for="lastname">
                Last name
            </label>
            <input type="text"
                   name="lastname"
                   id="lastname"
                   value="{{ request.lastname }}"
            />
            <div class="defaultValue">
                <small>
                    Use complete value for search, partial search is not available
                </small>
            </div>
        </div>
        <div class="row">
            <label for="email">
                Email
            </label>
            <input type="text"
                   name="email"
                   id="email"
                   value="{{ request.email }}"
            />
            <div class="defaultValue">
                <small>
                    Use complete value for search, partial search is not available
                </small>
            </div>
        </div>
        <div class="row">
            <label for="date_from">
                Date From
            </label>
            <input type="text"
                   class="datepicker short"
                   name="date_from"
                   id="date_from"
                   value="{{ request.date_from }}"
                   placeholder="DD/MM/YYYY"
                   autocomplete="off"
            />
        </div>
        <div class="row">
            <label for="date_to">
                Date To
            </label>
            <input type="text"
                   class="datepicker short"
                   name="date_to"
                   id="date_to"
                   value="{{ request.date_to }}"
                   placeholder="DD/MM/YYYY"
                   autocomplete="off"
            />
        </div>
        <div class="row">
            <label for="booked_from">
                Booked From
            </label>
            <input type="text"
                   class="datepicker short"
                   name="booked_from"
                   id="booked_from"
                   value="{{ request.booked_from }}"
                   placeholder="DD/MM/YYYY"
                   autocomplete="off"
            />
        </div>
        <div class="row">
            <label for="booked_to">
                Booked To
            </label>
            <input type="text"
                   class="datepicker short"
                   name="booked_to"
                   id="booked_to"
                   value="{{ request.booked_to }}"
                   placeholder="DD/MM/YYYY"
                   autocomplete="off"
            />
        </div>

        <div class="search-button">
            <input type="hidden" name="action" value="search"/>
            <input type="submit" value="Search" class="BUTTON"/>
        </div>
    </fieldset>
</form>