<table class="window">
	<tr>
		<td>
			<div class="frame_center settings_form">
				<h1>{{@page_data.title}}</h1>
				<form name="settings_cd_form" action="/settings/scales" method="POST">
					<input type="hidden" name="device" value="scale">
					<table width="100%">
						<tr>
							<td>
								Использовать весы
							</td>
							<td align="right">
								<select name="active">
									<option value="0">Нет</option>
									<option value="1" {{@data.active==1?'selected="selected"':""}}>Да</option>
								</select>
							</td>
						</tr>
						<tr class="active" {{!@data.active?'style="display:none;"':''}}>
							<td>
								Драйвер весов
							</td>
							<td align="right">
								<select name="driver">
									<option value="">Нет</option>
									<repeat group="{{@drivers}}" value="{{@d}}">
									<option value="{{@d['path']}}" {{@data.driver==@d['path']?'selected="selected"':""}} data-url="{{@d['url']}}">{{@d['title']}}</option>
									</repeat>
								</select>
							</td>
						</tr>
						<tr class="active" {{!@data.active?'style="display:none;"':''}}>
							<td colspan="2" align="center">
								<a href="/settings/drivers?path={{@data.driver}}&device=scale" id="driver_settings" class="show_window {{@data.driver==''?'hide':''}}"><small>(настройка драйвера)</small></a>
							</td>
						</tr>
						<tr class="active" {{!@data.active?'style="display:none;"':''}}>
							<td>
								Адрес весов
							</td>
							<td align="right">
								<input type="text" name="url" value="{{@data.url}}">
							</td>
						</tr>
						<tr>
							<td colspan="2" align="center">
								<input type="submit" value="Сохранить">
							</td>
						</tr>
					</table>
				</form>
			</div>
		</td>
	</tr>
</table>
