<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jsp"%>

<c:set var="inst" value="${frd.instance}"/>

<h3 class="mb1">${l.l('Добавить маппинг')} — ${inst.title}</h3>

<form method="POST" action="/admin/plugin/sync1c/instance.do">
	<input type="hidden" name="method" value="mappingUpdate"/>
	<input type="hidden" name="instanceId" value="${inst.id}"/>
	<input type="hidden" name="returnUrl" value="${form.param.returnUrl}"/>

	<table class="data">
		<tr>
			<td class="label">${l.l('Монтажник')} (user ID) *</td>
			<td><input type="number" name="userId" min="1" required value=""/></td>
		</tr>
		<tr>
			<td class="label">${l.l('ID склада (1С)')} *</td>
			<td><input type="text" name="warehouseId" class="w100p" required
				placeholder="d776ab8b-ca60-11ee-bba6-f8f082350659"
				value=""/></td>
		</tr>
		<tr>
			<td class="label">${l.l('Наименование склада (1С)')}</td>
			<td><input type="text" name="warehouseName" class="w100p"
				placeholder="Лопатин Владимир Владимирович"
				value=""/></td>
		</tr>
		<tr>
			<td class="label">${l.l('Локация (1С)')} *</td>
			<td><input type="text" name="locationName" class="w100p" required
				placeholder="ст-ца Брюховецкая - ОМИПЛАТ"
				value=""/></td>
		</tr>
	</table>

	<div class="mt1">
		<button type="submit" class="btn-green">${l.l('Добавить')}</button>
		<c:url var="cancelUrl" value="/admin/plugin/sync1c/instance.do">
			<c:param name="method" value="mappingList"/>
			<c:param name="instanceId" value="${inst.id}"/>
		</c:url>
		<button type="button" class="btn-white ml1"
			onclick="$$.ajax.loadContent('${cancelUrl}')">
			${l.l('Отмена')}
		</button>
	</div>
</form>
