<?xml version="1.0" encoding="utf-8" ?>
<c:Screen xmlns:c="BitMobile.Controls" xmlns:s="BitMobile.ValueStack" StyleSheet="CreateOutlet.css">

	<s:Push Id="task" Value="$param1" />
	<s:Push Id="visitTask" Value="$param2" />
	<s:Push Id="target" Value="$param3"></s:Push>

	<c:DockLayout>

		<c:HorizontalLayout Id="btnDone" CssClass="bottom_btn" OnEvent="Back" OnClickAction="$DoBack()">
			<c:TextView Text="#ready#" />
		</c:HorizontalLayout>
		<c:HorizontalLine CssClass="b_line" />

		<c:ScrollView Id="grScrollView">
			<c:HorizontalLayout CssClass="empty_caption_grid" />
			<c:HorizontalLine />

			<c:HorizontalLayout CssClass="half_grid">
				<c:TextView Text="#turnaroundTime#" />
				<s:Push Id="date" Value="$GetDate($task.PlanDate, $task)"></s:Push>
				<c:TextView Text="$date" CssClass="hlf_value" />
			</c:HorizontalLayout>
			<c:HorizontalLine />

			<c:HorizontalLayout CssClass="grid">
				<c:VerticalLayout>
					<c:TextView Text="#target#" CssClass="description_row"></c:TextView>
					<c:TextView Text="$task.TextTask" CssClass="main_row" />
				</c:VerticalLayout>
			</c:HorizontalLayout>
			<c:HorizontalLine />

			<c:HorizontalLayout CssClass="end_of_block" />

			<c:HorizontalLayout CssClass="empty_caption_grid" />
			<c:HorizontalLine />

			<c:VerticalLayout CssClass="half_grid">
				<s:If Test="$visitTask != null">
					<c:Button Text="#noteAsNew#" CssClass="negative_decision" OnClickAction="$RetrieveTask($visitTask.Id)" />
				</s:If>
				<s:Else>
					<c:Button Text="#noteAsExecuted#" CssClass="positive_decision" OnClickAction="$CompleteTheTask($task.Id, $workflow.visit)" />
				</s:Else>
			</c:VerticalLayout>
			<c:HorizontalLine />

			<c:HorizontalLayout CssClass="end_of_block" />

		</c:ScrollView>



	</c:DockLayout>

</c:Screen>