<p><strong>To apply a template to a new room, enter the name for the new room, and select the base station that will be
  used in this room.</strong></p>

<form name="templateImportForm" novalidate>
  <div class="form-group">
    <label>Enter the new room name</label>
    <input class="form-control" type="text" name="roomname" placeholder="Room name" ng-model="importTemplate.room.name"
           required>

    <p class="help-block" ng-show="templateImportForm.filename.$dirty && templateImportForm.filename.$error.required">This field is required.</p>
  </div>
  <div class="form-group">
    <label>Choose an available base station for the room (listed by MAC address)</label>

    <refresh-hardware reset="importTemplate.baseStation" ng-model="baseStations"
                      device-type="bsType"></refresh-hardware>

    <div ng-if="baseStations.length">
      <div class="radio" ng-repeat="baseStation in baseStations track by baseStation.mac">
        <label>
          <input type="radio" name="base-station" ng-model="importTemplate.baseStation" id="base-station-{{$index}}"
                 ng-value="baseStation">
          {{baseStation.name}} <span class="text-muted">({{baseStation.mac | macAddress}})</span>
        </label>
      </div>
    </div>
  </div>
</form>

<div class="left-and-right">
  <a ui-sref="file-explorer.import-template-choose-room" class="btn btn-primary btn-prev"><i class="fa fa-caret-left"></i> Back</a>
  <button class="btn btn-primary" ng-disabled="templateImportForm.$invalid || !importTemplate.baseStation"
          ng-click="finish()">Finish
  </button>
</div>
