<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" ng-show="title">
        <button type="button" class="close" ng-click="$hide()">&times;</button>
        <h4 class="modal-title">{{title}}</h4>
      </div>

      <form name="editBstationForm" role="form" ng-submit="editBstation(selections.room, selections.bstation); $hide()" novalidate>

        <div class="modal-body">
          <div class="form-group">
            <label for="bstation-name">Enter a name for the controller:</label>
            <input class="form-control" id="bstation-name" type="text" name="bstationName" placeholder="Controller name" ng-model="selections.bstation.name" ng-maxlength="32" required>
            <p class="help-block" ng-show="editBstationForm.bstationName.$error.required && editBstationForm.bstationName.$dirty">A valid controller name is required.</p>
            <p class="help-block" ng-show="editBstationForm.bstationName.$error.maxlength && editBstationForm.bstationName.$dirty">The controller name cannot be longer than 32 characters.</p>
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary" ng-disabled="editBstationForm.$invalid">Save</button>
          <button type="button" class="btn btn-danger" ng-click="cancelEdit(); $hide()">Cancel</button>
        </div>

      </form>
    </div>
  </div>
</div>
