<script type="text/ng-template" id="clients/site-user.html">
	<form name="siteUserForm" class="form-horizontal" ng-submit="submit()">
		<div class="modal-header">
			<button type="button" class="close" ng-click="cancel()">×</button>
			<h3 class="modal-title" ng-hide="data.id">Add new site user</h3>
			<h3 class="modal-title" ng-show="data.id">Edit site user</h3>
		</div>
		<div class="modal-body">

			<div class="form-group">
				<label class="col-sm-3 control-label label-required" for="siteUserFirstName">First Name:</label>
				<div class="col-sm-9">
					<input id="siteUserFirstName" class="form-control" type="text" name="first_name" ng-model="data.first_name" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label label-required" for="siteUserLastName">Last Name:</label>
				<div class="col-sm-9">
					<input id="siteUserLastName" class="form-control" type="text" name="last_name" ng-model="data.last_name" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label label-required" for="siteUserEmail">E-mail:</label>
				<div class="col-sm-9">
					<input id="siteUserEmail" class="form-control" type="text" name="email" ng-model="data.email" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label label-required" for="siteUserPhone">Phone:</label>
				<div class="col-sm-9">
					<input id="siteUserPhone" class="form-control" type="text" name="phone" ng-model="data.phone" ng-required="!data.mobile" numbers-only>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label" for="siteUserMobile">Mobile:</label>
				<div class="col-sm-9">
					<input id="siteUserMobile" class="form-control" type="text" name="mobile" ng-model="data.mobile" ng-required="!data.phone" numbers-only>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label" for="siteUserPosition">Position:</label>
				<div class="col-sm-9">
					<input id="siteUserPosition" class="form-control" type="text" name="position" ng-model="data.position">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label" for="siteUserAuthority">Authority:</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="authority" value="1" ng-model="data.authority"> Yes
					</label>
					<label class="radio-inline">
						<input type="radio" name="authority" value="0" ng-model="data.authority"> No
					</label>
				</div>
			</div>

		</div>
		<div class="modal-footer">
			<span class="btn btn-default" ng-click="cancel()">Close</span>
			<button class="btn btn-primary" ng-hide="data.id">Create</button>
			<button class="btn btn-warning" ng-show="data.id">Update</button>
		</div>
	</form>
</script>