<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="editSystemForm" role="form" ng-submit="editSystem(selections.system); $hide()" novalidate>
        <div class="modal-body">    
          <label for="room-name">Enter a name for the system:</label>
          <input class="form-control" id="system-name" type="text" name="systemName" placeholder="System name" ng-model="selections.system.name" ng-maxlength="32" required>
          <p class="help-block" ng-show="editSystemForm.systemName.$error.required && editSystemForm.systemName.$dirty">A valid system name is required.</p>
          <p class="help-block" ng-show="editSystemForm.systemName.$error.maxlength && editSystemForm.systemName.$dirty">The system name cannot be longer than 32 characters.</p>       
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary" ng-disabled="editSystemForm.$invalid">Save</button>
          <button type="button" class="btn btn-danger" ng-click="cancelEdit(); $hide()">Cancel</button>
        </div>

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