<?page title="${labels.SuppliersFormTitle}" contentType="text/html;charset=UTF-8"?>
<zk>
	<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
	<window id="editWin" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressForm')" closable="true" width="600px">
		<caption zclass="form-caption" label="${labels.SuppliersFormTitle}" />
		<grid form="@id('fx') @init(vm.dataForm) @load(vm.dataBean) @save(vm.dataBean, before='save') @validator(vm.validator)" width="580px">
			<columns>
				<column label="" hflex="min" />
				<column label="" hflex="min" />
				<column label="" />
			</columns>
			<rows>
				<row>
					<label value="${labels.SuppliersFormCompany}" />
					<textbox
						id="company"
						value="@bind(fx.company)"
						instant="true"
						maxlength="@load(vm.lengthText)"
						width="320px" />
					<button image="/img/search.png" label="${labels.SuppliersFormFindInARES}" onClick="@command('searchAres')" sclass="nicebutton" disabled="@load((fx.ic == 0) &amp;&amp; (empty fx.company))" />
				</row>
				<row>
					<label value="${labels.SuppliersFormIC}" />
					<textbox
						value="@bind(fx.ic)"
						maxlength="@load(vm.lengthText)"
						instant="true" />
				</row>
				<row>
					<label value="${labels.SuppliersFormDIC}" />
					<textbox
						value="@bind(fx.dic)"
						maxlength="@load(vm.lengthText)" />
				</row>
				<row>
					<label value="${labels.SuppliersFormDepartment}" />
					<textbox
						value="@bind(fx.department)"
						maxlength="@load(vm.lengthText)" />
				</row>
				<row>
					<label value="${labels.SuppliersFormContact}" />
					<textbox
						value="@bind(fx.contactName)"
						maxlength="@load(vm.lengthText)" />
				</row>
				<row>
					<label value="${labels.SuppliersFormStreet}" />
					<textbox
						value="@bind(fx.street)"
						maxlength="@load(vm.lengthText)"
						width="320px" />
				</row>
				<row>
					<label value="${labels.SuppliersFormNo}" />
					<textbox
						value="@bind(fx.houseNumber)"
						maxlength="@load(vm.lengthText)"
						width="80px" />
				</row>
				<row>
					<label value="${labels.SuppliersFormCity}" />
					<textbox id="city" value="@bind(fx.city)" width="320px" />
				</row>
				<row>
					<label value="${labels.SuppliersFormZIP}" />
					<textbox
						value="@bind(fx.zipCode)"
						maxlength="@load(vm.lengthText)" />
				</row>
				<row>
					<label value="${labels.SuppliersFormPhone}" />
					<textbox
						value="@bind(fx.phone)"
						maxlength="@load(vm.lengthText)" />
				</row>
				<row>
					<label value="${labels.SuppliersFormEmail}" />
					<textbox
						id="email"
						value="@bind(fx.email)"
						maxlength="@load(vm.lengthText)"
						width="320px" />
				</row>
				<row>
					<label value="${labels.SuppliersFormWWW}" />
					<textbox
						id="web"
						value="@bind(fx.web)"
						maxlength="@load(vm.lengthText)"
						width="320px" />
				</row>
			</rows>
		</grid>
		<hlayout>
			<panel>
				<panelchildren>
					<vlayout>
						<panel>
							<panelchildren>
								<label value="${labels.SuppliersFormNote}" />
							</panelchildren>
						</panel>
						<panel>
							<panelchildren>
								<ckeditor height="65px" width="100%" toolbar="Basic" value="@bind(fx.description)" />
							</panelchildren>
						</panel>
					</vlayout>
				</panelchildren>
			</panel>
		</hlayout>
		<include src="/app/formButtons.zul" />
	</window>
</zk>