<div>
  <div class="form-group">
    <label class="col-sm-5 control-label" for="">Add a device to room</label>
    <div class="col-sm-7">
      <select name="room" id="" ng-model="selectedRoom" ng-options="room as room.name for room in rooms" required></select>
    </div>
  </div>


  <div class="form-group">
    <label class="col-sm-5 control-label" for="">Select a device type to control</label>
    
    <div class="col-sm-7">
      <select name="deviceType" id="" ng-model="device.db.type" ng-options="type for type in deviceTypes" required></select>
    </div>
  </div>


  <div class="form-group">
    <label class="col-sm-5 control-label" for="device-name">Enter a name for the device</label>
    <div class="col-sm-7">
      <input class="form-control" id="device-name" type="text" name="deviceName" placeholder="Device name" ng-model="device.name" ng-maxlength="32" required>
      <p class="help-block" ng-show="infoForm.deviceName.$error.required && infoForm.deviceName.$dirty">A valid device name is required.</p>
      <p class="help-block" ng-show="infoForm.deviceName.$error.maxlength && infoForm.deviceName.$dirty">The device name cannot be longer than 32 characters.</p>
    </div>
  </div>


  <div class="form-group">
    <label class="col-sm-5 control-label" for="">Search the database for the device or write-in details</label>
    
    <div class="col-sm-7">
      <label class="radio-inline">
        <input type="radio" name="dbSource" ng-model="device.db.source" value="DB" > Database (recommended)
      </label>

      <label class="radio-inline">
        <input type="radio" name="dbSource" ng-model="device.db.source" value="CUSTOM" > Write in
      </label>
    </div>
  </div>
</div>

