<form id='saleLeadForm' name='saleLeadForm' ng-submit="save()" class="form-horizontal form-edit" confirm-on-exit>
	@include('bookings::templates.bookings_projects_header')
	
	@include('bookings::templates.location')

	<h4 class="subheader">Sale Description</h4>
	<div class="control-group">
		<label for="assigned_to" class="control-label">Assigned to:</label>
		<div class="controls">
			<select name="assigned_to" ng-model="data.assigned_to">
				<option value="">Select User</option>
				@foreach(App\Models\User::getActiveList()->pluck('name', 'id') as $id => $name)
					<option value="{{ $id }}">{{ $name }}</option>
				@endforeach
			</select>
		</div>
	</div>
	<div class="control-group">
		<label for="title" class="control-label label-required">Interested in:</label>
		<div class="controls">
			<input type="text" name="title" ng-model="data.title" class="col-sm-12" required>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-5">
			<div class="control-group">
				<label for="labour" class="control-label">Budget:</label>
				<div class="controls">
					<input type="text" name="labour" ng-model="data.labour" class="col-sm-10" placeholder="0.00">
				</div>
			</div>
		</div>
		<div class="col-sm-7">
			<div class="control-group">
				<label for="onsite_end" class="control-label">Deadline:</label>
				<div class="controls input-append fix-margin">
					<input type="text" name="onsite_end" ng-model="data.onsite_end" class="col-sm-8" bs-datepicker data-format="dd-mm-yyyy" ng-init="data.onsite_end = '{{ date('d-m-Y', strtotime('+1 week')) }}'">
					<span class="add-on" data-toggle="datepicker">
						<i class="fa fa-calendar" data-date-icon="fa fa-calendar" data-time-icon="fa fa-clock-o"></i>
					</span>
				</div>
			</div>
		</div>
	</div>
	<div class="control-group">
		<label for="success_rate" class="control-label">Predicted success rate:</label>
		<div class="controls">
			<uib-rating ng-model="data.time_spent" max="5" on-hover="hoveringOver(value)" on-leave="overStar = null"></uib-rating>
			<span class="label" ng-class="{'label-warning': percentage <30, 'label-info': percentage >=30 && percentage <70, 'label-success': percentage >=70}" ng-show="overStar">{[{ percentage }]}%</span>
		</div>
	</div>
	<div class="control-group">
		<label for="problem" class="control-label label-required">Description:</label>
		<div class="controls">
			<textarea name="problem" ng-model="data.problem" class="col-sm-12" summernote summernote-height="200"></textarea>
		</div>
	</div>

	<div class="form-actions">
		<input type="hidden" name="client_id" ng-model="data.client_id" required>

		<button class="btn btn-primary" data-loading-text="Saving..." ng-disabled="!clientManager.isSelected()">
			Create
		</button>
	</div>

</form>