<div class="modal-header">
	<button type="button" class="close" data-ng-click="cancel()">×</button>
	<h3 class="modal-title"><i class="fa fa-key"></i> Change the password for this job</h3>
</div>
<form class="form-horizontal" data-ng-submit="save()">
	<div class="modal-body">
		<div class="form-group">
			<label class="col-sm-3 control-label label-required" for="inputStart">Device:</label>
			<div class="col-sm-9">
				<select ng-model="data.password.device_id" class="form-control" ng-options="device.id as device.name for device in data.devices">
					<option value="">General</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label label-required" for="inputStart">Password Type:</label>
			<div class="col-sm-9">
				<select ng-model="data.password.type" class="form-control" ng-options="key as value for (key, value) in data.types">
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label label-required" for="inputUsername">Username</label>
			<div class="col-sm-9">
				<input type="text" class="form-control" id="inputUsername" data-ng-model="data.password.username" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label label-required" for="inputPassword">Password</label>
			<div class="col-sm-9">
				<div class="input-group">
					<input type="{[{showPassword ? 'text' : 'password'}]}" class="form-control" id="inputPassword" data-ng-model="data.password.password" required>
					<span class="input-group-addon" style="cursor: pointer;" data-ng-click="showPassword = !showPassword">
						<i class="fa" data-ng-class="showPassword ? 'fa-eye-slash' : 'fa-eye'"></i>
					</span>
				</div>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-default" data-ng-click="cancel()" eat-click>Close</button>
		<button ng-disabled=" ! isFormValid()" class="btn btn-primary">Save and close</button>
	</div>
</form>