<div class="form-group">
	<label for="client_id" class="col-sm-3 control-label label-required">Client:</label>
	<div class="col-sm-9">
		<select name="client_id" class="form-control" required>
			<option value="">Select a client</option>
			@foreach($clients as $client)
				<option value="{{ $client->id }}" {{ old('client_id', $contract->client_id ?? '') == $client->id ? 'selected' : '' }}>
					{{ $client->name }}
				</option>
			@endforeach
		</select>
	</div>
</div>

<div class="form-group">
	<label for="name" class="col-sm-3 control-label label-required">Contract Name:</label>
	<div class="col-sm-9">
		<input type="text" name="name" value="{{ old('name', $contract->name ?? '') }}" class="form-control" required>
	</div>
</div>

<div class="form-group">
	<label for="description" class="col-sm-3 control-label">Description:</label>
	<div class="col-sm-9">
		<textarea name="description" class="form-control" rows="3">{{ old('description', $contract->description ?? '') }}</textarea>
	</div>
</div>

<div class="form-group">
	<label for="start_date" class="col-sm-3 control-label label-required">Start Date:</label>
	<div class="col-sm-9">
		<input type="date" name="start_date" value="{{ old('start_date', $contract->start_date ?? '') }}" class="form-control" required>
	</div>
</div>

<div class="form-group">
	<label for="end_date" class="col-sm-3 control-label">End Date:</label>
	<div class="col-sm-9">
		<input type="date" name="end_date" value="{{ old('end_date', $contract->end_date ?? '') }}" class="form-control">
	</div>
</div>

<div class="form-group">
	<label for="value" class="col-sm-3 control-label">Contract Value:</label>
	<div class="col-sm-9">
		<div class="input-group">
			<span class="input-group-addon">$</span>
			<input type="number" name="value" value="{{ old('value', $contract->value ?? 0) }}" class="form-control" step="0.01" min="0">
		</div>
	</div>
</div>

<div class="form-group">
	<label for="status" class="col-sm-3 control-label label-required">Status:</label>
	<div class="col-sm-9">
		<select name="status" class="form-control" required>
			<option value="active" {{ old('status', $contract->status ?? 'active') == 'active' ? 'selected' : '' }}>Active</option>
			<option value="inactive" {{ old('status', $contract->status ?? 'active') == 'inactive' ? 'selected' : '' }}>Inactive</option>
			<option value="expired" {{ old('status', $contract->status ?? 'active') == 'expired' ? 'selected' : '' }}>Expired</option>
		</select>
	</div>
</div>