summaryrefslogtreecommitdiffstats
path: root/web/directive/checkboxes.html
blob: a2f312422fbbd14652ca78602158212bf05904ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!--
    Copyright (c) 2012-2015 Kaarle Ritvanen
    See LICENSE file for license details
-->

<ng-form name="form">
  <div class="form-group"
       ng-repeat="choice in choices"
       ng-class="{'has-success': form[choice.value].$dirty}">
    <div class="checkbox">
      <label>
	<aconf-set-checkbox choice="choice"></aconf-set-checkbox>
	<div ng-if="!choice.ref">{{ choice["ui-value"] }}</div>
	<a ng-if="choice.ref"
	   class="btn"
	   ng-class="{'btn-default': form[choice.value].$pristine, 'btn-success': form[choice.value].$dirty}"
	   href="#/config{{ choice.ref }}">{{ choice["ui-value"] }}</a>
      </label>
    </div>
  </div>
</ng-form>