<script type="text/ng-template" id="newPropertyEquipmentModal.html">
	<form name="form" class="form-horizontal" ng-submit="_save(equipment)" novalidate>
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">
				<i class="ti ti-close"></i>
			</button>
			<h4 class="modal-title">New Equipment</h4>
		</div>
		<div class="modal-body">
			<p>Fields with <span style="color: #cc0000;">*</span> are required.</p>
			<div class="form-group">
				<label for="name" class="col-sm-3 control-label">Name <span style="color: #cc0000;">*</span></label>
				<div class="col-sm-8">
					<input type="text" class="form-control" name="name" id="name" ng-model="equipment.name" ng-required="true">
					<p class="help-block" ng-show="form.name.$touched && form.name.$error.required">Value is required.</p>
				</div>
			</div>
			<div class="form-group">
				<label for="description" class="col-sm-3 control-label">Description</label>
				<div class="col-sm-8">
					<textarea class="form-control" rows="5" ng-model="equipment.description"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label for="picture" class="col-sm-3 control-label">Picture</label>
				<div class="col-sm-8">
					<a class="btn btn-default" ngf-multiple="false" ngf-select="_uploadFile($file)" ngf-resize="{centerCrop: true, quality: 1.0}" ngf-pattern="'image/*'" ngf-accept="'image/*'" ngf-max-size="1MB" ngf-model-invalid="invalidFiles">Select</a>
					<a ng-if="equipment.picture" class="btn btn-info" ng-click="_viewImage(equipment.picture)">View</a>
					<span ng-if="invalidFiles">Invalid File. Select Another One.</span>
					<p class="help-block">Only Images up to 1MB.</p>
				</div>
			</div>
		</div>
		<div class="modal-footer">
			<a class="btn btn-danger" ng-click="cancel()">
				<i class="ti ti-close" style="margin-right: 5px;"></i>
				Cancel
			</a>
			<button type="submit" ng-disabled="!form.$valid" class="btn-primary btn">
				<i class="ti ti-share" style="margin-right: 5px;"></i>
				Save
			</button>
		</div>
	</form>
</script>