<div class="content2">
<div class="online_order_search {{@receipts?'online_order_search_hide':''}}">
	<p class="false">{{@error|raw}}</p>
	<check if="{{@receipts}}">
	<div class="online_order_search_button_show">
		<a>Форма поиска</a>
	</div>
	<div class="online_order_search_button_hide">
		<a>Скрыть форму</a>
	</div>
	</check>
	<form name="online_order_form" action="/receipts/search_online_order" method="GET">
		<h1>
			{{@page_data['title']}}
			<select name="type_id">
				<repeat group="{{@receipt_search}}" key="{{@type_id}}" value="{{@title}}">
				<option value="{{@type_id}}" {{@COOKIE.online_order_type_id==@type_id?'selected="selected"':''}}>{{@title}}</option>
				</repeat>
			</select>
		</h1>
		<table>
			<tr>
				<td>
					<input type="text" name="dates" value="{{@GET.dates?@GET.dates:date('d.m.Y', strtotime('-1 months')).' - '.date('d.m.Y')}}" autocomplete="off" placeholder="Период">
				</td>
				<td>
					<input type="text" name="surname" class="mixed_pay mixed_pay_surname" pid="surname" value="{{isset(@GET.surname)?@GET.surname:''}}" placeholder="Фамилия" autocomplete="off">
				</td>
				<td>
					<input type="text" name="name" class="mixed_pay mixed_pay_name" pid="name" value="{{isset(@GET.name)?@GET.name:''}}" placeholder="Имя" autocomplete="off">
				</td>
			</tr>
			<tr>
				<td>
					<input type="text" name="number" class="mixed_pay mixed_pay_number" pid="number" value="{{isset(@GET.number)?@GET.number:''}}" placeholder="Номер заказа" autocomplete="off">
				</td>
				<td>
					<input type="text" name="email" class="mixed_pay mixed_pay_email" pid="email" value="{{isset(@GET.email)?@GET.email:''}}" placeholder="E-mail" autocomplete="off">
				</td>
				<td>
					<input type="text" name="phone" class="mixed_pay mixed_pay_phone" pid="phone" value="{{isset(@GET.phone)?@GET.phone:''}}" placeholder="Телефон" autocomplete="off">
				</td>
			</tr>
			<tr>
				<td colspan="3" valign="middle" align="center" id="online_order_keys">
					<check if="{{@base_settings.virtual_keyboard==1}}">
					<div class="virtual_keyboard full_keyboard">
						{~@keys='1234567890-+|QWERTYUIOP_|ASDFGHJKL@|ZXCVBNM'~}
						<div class="eng hide">
						<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
							<check if="{{@keys[@i]=='|'}}">
								<true>
							<br>
								</true>
								<false>
							<input type="button" class="virtual_key" value="{{@keys[@i]}}" for='mixed_pay_number'>
								</false>
							</check>
						</loop>
							<button type="button" class="virtual_key_bks" for='mixed_pay_number'>
								<i class="fas fa-long-arrow-alt-left"></i>
							</button>
							<input type="button" class="virtual_key_delete" for='mixed_pay_number' value="CE">
							<br>
							<input type="button" class="virtual_key_ru" value="RU">
							<input type="button" class="virtual_key virtual_key_space" for='mixed_pay_number' value=" ">
							<input type="button" class="virtual_key" for='mixed_pay_number' value=",">
							<input type="button" class="virtual_key" for='mixed_pay_number' value=".">
							<button type="submit">
								<i class="fas fa-search"></i>
								Искать
							</button>
						</div>
						{~@keys='1234567890-+|ЙЦУКЕНГШЩЗХЪ|ФЫВАПРОЛДЖЭ_|ЯЧСМИТЬБЮ'~}
						<div class="ru">
						<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
							{~@a=mb_substr(@keys, @i, 1)~}
							<check if="{{@a=='|'}}">
								<true>
							<br>
								</true>
								<false>
							<input type="button" class="virtual_key" value="{{@a}}" for='mixed_pay_number'>
								</false>
							</check>
						</loop>
							<button type="button" class="virtual_key_bks" for='mixed_pay_number'>
								<i class="fas fa-long-arrow-alt-left"></i>
							</button>
							<input type="button" class="virtual_key_delete" for='mixed_pay_number' value="CE">
							<br>
							<input type="button" class="virtual_key_eng" value="ENG">
							<input type="button" class="virtual_key virtual_key_space" for='mixed_pay_number' value=" ">
							<input type="button" class="virtual_key" for='mixed_pay_number' value="@">
							<input type="button" class="virtual_key" for='mixed_pay_number' value=",">
							<input type="button" class="virtual_key" for='mixed_pay_number' value=".">
							<button type="submit">
								<i class="fas fa-search"></i>
								Искать
							</button>
						</div>
					</div>
					</check>
				</td>
			</tr>
			<check if="{{@base_settings.virtual_keyboard!=1}}">
			<tr>
				<td colspan="3" align="center">
					<input type="submit" value="Искать">
				</td>
			</tr>
			</check>
		</table>
	</form>
</div>
<check if="{{@receipts}}">
	<true>
		<include href="receipts_online_order_result.htm" />
	</true>
	<false>
<p align="center">Документы не найдены</p>
	</false>
</check>
<script type="text/javascript" src="/ui/scripts/moment.min.js"></script>
<script type="text/javascript" src="/ui/scripts/daterangepicker.min.js"></script>
<script>
calendar($('input[name="dates"]'));
</script>
</div>