<script type="text/ng-template" id="bookings/modals/new-customer-notification.html">
<form id="newCustomerNotificationForm" class="form-horizontal" ng-submit="submit()">
	<div class="modal-header">
		<button type="button" class="close" ng-click="cancel()" aria-hidden="true">×</button>
		<h3 class="modal-title">Send Notification to the Client</h3>
	</div>
	<div class="modal-body">

		<p class="lead">How would you like to contact the customer to let them know that the task has been completed?</p>


		<hr/>


		<!--Email textarea block-->
		<div class="form-group checkboxes">
			<label for="send_email" class="col-sm-3 control-label">Send an email?:</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="send_email" value="1" ng-model="email.selected" data-ng-init="email.selected = 1" required> Yes
				</label>
				<label class="radio-inline">
					<input type="radio" name="send_email" value="0" ng-model="email.selected" required> No
				</label>
			</div>
		</div>


		<div data-ng-if="email.selected == '1'" class="well">

			<div class="form-group">
				<label for="send_to" class="col-sm-3 control-label label-required">Send to:</label>
				<div class="col-sm-8">
					<input type="text" name="send_to" ng-model="email.send_to" class="form-control" ng-required="email.selected == '1'">
				</div>
			</div>

			<div class="form-group">
				<label for="subject" class="col-sm-3 control-label label-required">Subject:</label>
				<div class="col-sm-8">
					<input type="text" name="subject" ng-model="email.subject" class="form-control" ng-required="email.selected == '1'">
				</div>
			</div>

			<textarea id="emailTextarea" ng-required="email.selected == '1'" data-summernote="" data-summernote-height="150" class="form-control" rows="4" name="email" ng-model="email.text"></textarea>
		</div>




		<hr/>


		<!--SMS textarea block-->
		<div class="form-group checkboxes">
			<label for="send_sms" class="col-sm-3 control-label">Send text message?:</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="send_sms" value="1" ng-model="sms.selected" required> Yes
				</label>
				<label class="radio-inline">
					<input type="radio" name="send_sms" value="0" ng-model="sms.selected" data-ng-init="sms.selected = 0" required> No
				</label>
			</div>
		</div>

		<div data-ng-if="sms.selected == '1'" class="well">

			<div class="form-group">
				<label for="sms_to" class="col-sm-3 control-label label-required">Send to:</label>
				<div class="col-sm-8">
					<input type="text" name="sms_to" ng-model="sms.send_to" class="form-control" ng-required="sms.selected == '1'">
				</div>
			</div>

			<textarea name="sms" ng-model="sms.text" ng-required="sms.selected == '1'" class="form-control" rows="3" placeholder="Enter the to send by SMS here..."></textarea>

		</div>
	</div>
	<div class="modal-footer">
		<span class="btn btn-default" data-ng-click="cancel()">Close</span>
		<button class=" btn btn-primary" ng-disabled=" (email.selected == '0' && sms.selected == '0') || email.sending || sms.sending "><i class="fa fa-spinner fa-spin" data-ng-if="email.sending || sms.sending"></i>  Send to Client</button>
	</div>
</form>
</script>
