preselect All if no category is set, and prevent setting a parent category to itself

This commit is contained in:
Athou
2013-05-01 14:06:38 +02:00
parent 9223ad0def
commit 4111b49d5f
2 changed files with 12 additions and 1 deletions

View File

@@ -15,7 +15,7 @@
<label class="control-label">Parent category</label>
<div class="controls">
<select name="category" class="input-block-level" ng-model="category.parentId"
ng-options="cat.id as cat.name for cat in CategoryService.flatCategories">
ng-options="cat.id as cat.name for cat in CategoryService.flatCategories | filter: filterCurrent">
</select>
<span class="help-block" ng-show="!form.category.$valid">Required</span>
</div>