<div class="modal-header">
	<h3 class="modal-title">
		<i class="fa fa-comment"></i> <span ng-hide="data.id">Create a new channel</span><span ng-show="data.id">Channel settings</span>
	</h3>
</div>
<form name="templateForm" class="form-horizontal" ng-submit="save()">
	<div class="modal-body">
		<div class="form-group">
			<label for="inputName" class="col-sm-3 control-label label-required">Tag</label>
			<div class="col-sm-9">
				<input id="inputName" class="form-control" type="text" name="name" ng-model="data.tag" autocomplete="off" required>
				<span class="help-block"><small>This field must be unique, contains only letter, numbers and hyphens but no spaces. NO hashtags.</small></span>
			</div>
		</div>
		<div class="form-group">
			<label for="inputName" class="col-sm-3 control-label">Link to a task</label>
			<div class="col-sm-9 form-inline">
				<select name="related_type" ng-model="data.related_type" class="form-control">
					<option value="task">Task</option>
					<option value="project">Project</option>
				</select>
				<input type="text" class="form-control" name="related_id" ng-model="data.related_id" autocomplete="off" placeholder="ID of the task">
			</div>
		</div>
		<div class="form-group">
			<label for="inputName" class="col-sm-3 control-label label-required">Invite people</label>
			<div class="col-sm-9">
				<input id="taskId" class="form-control" type="hidden" name="task_id" ng-model="data.users" ui-select2="select2Options" multiple required>
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<button class="btn btn-default" ng-click="cancel()" data-eat-click>Cancel</button>
		<button class="btn btn-warning" ng-show="data.id">Update</button>
		<button class="btn btn-primary" ng-hide="data.id">Create</button>
	</div>
</form>