Skip to content

Commit

Permalink
(chore) use one-time binding
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Mar 15, 2015
1 parent 392d444 commit 8a38ac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/templates/addResourceForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<li>
<label for="resource_sustainability" translate>ADD_RESOURCE_SUSTAINABILITY_QUESTION</label>
<span class="hint" translate>ADD_RESOURCE_SUSTAINABILITY_HELP_TEXT</span>
<span ng-repeat="i in [1,2,3,4,5]"><input name="resource_sustainability" type="radio" ng-model="resource.sustainability" ng-value="{{i}}" ng-required="!resource.sustainability"> {{i}} </span>
<span ng-repeat="i in [1,2,3,4,5]"><input name="resource_sustainability" type="radio" ng-model="resource.sustainability" ng-value="{{::i}}" ng-required="!resource.sustainability"> {{::i}} </span>
<span class="error" ng-show="resourceForm.resource_sustainability.$error.required" translate>FORM_REQUIRED</span>
</li>

<li>
<label for="resource_categories" translate>ADD_RESOURCE_TYPE_QUESTION</label>
<span class="hint" translate>ADD_RESOURCE_TYPE_HELP_TEXT</span>
<div ng-repeat="(category, value) in ::categories" class="resource-categories-list">
<input type="checkbox" id="resource_categories_{{category}}" name="resource_categories" ng-model="resource.categories[$index]" ng-true-value="'{{category}}'" ng-required="!isAtLeastOneTypeSelected(resource.categories)">
<input type="checkbox" id="resource_categories_{{::category}}" name="resource_categories" ng-model="resource.categories[$index]" ng-true-value="'{{::category}}'" ng-required="!isAtLeastOneTypeSelected(resource.categories)">
<label for="resource_categories_{{::category}}" translate>{{:: 'CATEGORY_' + category.toUpperCase() }}</label>
</div>
<span class="error" ng-show="resourceForm.resource_categories.$error.required" translate>FORM_REQUIRED_AT_LEAST_ONE</span>
Expand Down

0 comments on commit 8a38ac9

Please sign in to comment.