<!--
    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>
