<?page title="${labels.TravelOrdersFormTitle}" contentType="text/html;charset=UTF-8"?>

<zk>
	<window
		id="editWin"
		closable="true"
		width="95%"
		height="95%"
		border="normal"
		position="center"
		apply="org.zkoss.bind.BindComposer"
		viewModel="@id('vm') @init('info.bukova.isspst.ui.tripbill.TripBillForm')">
		<zscript>
			boolean disabled = false;
		</zscript>
		<caption
			src="/img/pickup-032.png"
			zclass="form-caption"
			label="${labels.TravelOrdersFormTitle}" />
		<vlayout vflex="1">
			<include src="../tripBillInterior.zul" vflex="1"/>
			<vlayout
					vflex="min"
					hflex="max">
				<div
						hflex="max"
						align="right">
					<button
							image="~./zul/img/misc/drag-disallow.png"
							label="${labels.ButtonStorno}"
							onClick="editWin.detach()"
							sclass="nicebutton" />
					<button
							image="/img/save.png"
							label="Uložit a odeslat ke schválení"
							onClick="@command('saveForApproval', window=editWin) @global-command('refresh')"
							disabled="@load(not vm.canSave)"
							sclass="nicebutton" />
					<button
							image="/img/save.png"
							label="${labels.ButtonSave}"
							onClick="@command('save', window=editWin) @global-command('refresh')"
							disabled="@load(not vm.canSave)"
							sclass="nicebutton" />
				</div>
			</vlayout>
		</vlayout>
	</window>
</zk>