<table class="window">
  	<tr>
    	<td class="content2">
			<h1>{{@page_data.title}}</h1>
			<form name="settings_epays_form" action="/settings/epays" method="POST">
				<div class="epays_list" href="/settings/epays">
					<div class="reload">
						<table width="100%">
							<tr>
								<th width="240">
									Драйвер
								</th>
								<th>
									Название
								</th>
								<th width="100">
									Выбран по умолчанию
								</th>
								<td align="right" width="100">
									<input type="button" class="add_epay" value="Добавить метод оплаты">
								</td>
							</tr>
							<repeat group="{{@methods}}" value="{{@m}}">
							<tr>
								<td align="center">
									<input type="hidden" name="id[]" value="{{@m['id']}}">
									<textarea class="hide" name="driver_config[]">{{@m['driver_config']}}</textarea>
									<select name="driver[]">
										<option value="">Нет</option>
										<repeat group="{{@drivers}}" value="{{@d}}">
										<option value="{{@d['path']}}" title="{{@d['method_title']}}" {{@m['driver']==@d['path']?'selected="selected"':''}}>{{@d['title']}}</option>
										</repeat>
									</select>
									<div href="/settings/epay_drivers?path={{@m.driver}}&id={{@m['id']}}" class="driver_settings {{@m.driver==''?'hide':''}} a"><small>(настройка драйвера)</small></div>
								</td>
								<td>
									<input type="text" name="title[]" data-changed="1" value="{{@m['title']}}" style="width: 99%;">
								</td>
								<td align="right">
									<div class="switch right">
										<input type="checkbox" class="selected_epay" {{@m['selected']==1?'checked="checked"':''}}>
										<input type="hidden" name="selected[]" value="{{@m['selected']?1:0}}">
									</div>
								</td>
								<td>
									<span class="order_show">Метод оплаты по умолчанию</span>
									<select name="active[]">
										<option value="1" {{@m['active']==1?'selected="selected"':''}}>Активен</option>
										<option value="0" {{@m['active']==0?'selected="selected"':''}}>Неактивен</option>
									</select>
								</td>
							</tr>
							</repeat>
						</table>
					</div>
				</div>
				<p align="center"><input type="submit" value="Сохранить"></p>
			</form>
			<div id="epay_tmp" style="display: none;">
				<table>
					<tr>
						<td align="center">
							<input type="hidden" name="id[]" value="">
							<textarea class="hide" name="driver_config[]"></textarea>
							<select name="driver[]">
								<option value="">Нет</option>
								<repeat group="{{@drivers}}" value="{{@d}}">
								<option value="{{@d['path']}}" title="{{@d['method_title']}}">{{@d['title']}}</option>
								</repeat>
							</select>
							<div href="/settings/epay_drivers?path=" class="driver_settings hide a"><small>(настройка драйвера)</small></div>
						</td>
						<td>
							<input type="text" name="title[]" data-changed="0" value="" style="width: 99%;">
						</td>
						<td align="right">
							<span class="order_show">Метод оплаты по умолчанию</span>
							<div class="switch right">
								<input type="checkbox" class="selected_epay">
								<input type="hidden" name="selected[]" value="0">
							</div>
						</td>
						<td>
							<select name="active[]">
								<option value="1">Активен</option>
								<option value="0">Неактивен</option>
							</select>
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
