<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">
                Review 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 key, status in statuses %}
                    <option value="{{ key }}"
                            {{ key == request.status ? 'selected' : '' }}
                    >
                        {{ status }}
                    </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="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="contact_no">
                Phone Number
            </label>
            <input type="text"
                   name="contact_no"
                   id="contact_no"
                   value="{{ request.contact_no }}"
            />
            <div class="defaultValue">
                <small>
                    Use complete value for search, partial search is not available
                </small>
            </div>
        </div>
        <div class="row">
            <label for="form_id">
                Assessment Form
            </label>
            <select name="form_id"
                    id="form_id"
            >
                <option value="">-</option>
                {% for form in forms %}
                    <option value="{{ form.id }}"
                            {{ form.id == request.form_id ? 'selected' : '' }}
                    >
                        {{ form.name }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="category_id">
                Category
            </label>
            <select name="category_id"
                    id="category_id"
            >
                <option value="">-</option>
                {% for category in categories %}
                    <option value="{{ category.id }}"
                            {{ category.id == request.category_id ? 'selected' : '' }}
                    >
                        {{ category.intended_name }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="type">
                Type
            </label>
            <select name="type"
                    id="type"
            >
                <option value="">-</option>
                {% for key, type in types %}
                    <option value="{{ key }}"
                            {{ key == request.type ? 'selected' : '' }}
                    >
                        {{ type }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="medium">
                Medium
            </label>
            <select name="medium"
                    id="medium"
            >
                <option value="">-</option>
                {% for key, medium in mediums %}
                    <option value="{{ key }}"
                            {{ key == request.medium ? 'selected' : '' }}
                    >
                        {{ medium }}
                    </option>
                {% endfor %}
            </select>
        </div>
        <div class="row">
            <label for="due_date_from">
                Due date from
            </label>
            <input type="text"
                   class="datepicker short"
                   name="due_date_from"
                   id="due_date_from"
                   value="{{ request.due_date_from }}"
                   placeholder="DD/MM/YYYY"
            />
        </div>
        <div class="row">
            <label for="due_date_to">
                Due date to
            </label>
            <input type="text"
                   class="datepicker short"
                   name="due_date_to"
                   id="due_date_to"
                   value="{{ request.due_date_to }}"
                   placeholder="DD/MM/YYYY"
            />
        </div>

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