<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="delayTimeForm" role="form" ng-submit="addDelay(delay.time); $hide()" novalidate>
        <div class="modal-body">
          <div class="form-group">
            <label for="delay-time">Enter delay time in seconds</label>
            <input class="form-control" type="number" name="delayTime" placeholder="" ng-model="delay.time" min="0.1" max="99.9" step="0.1" auto-focus required>
            <p class="help-block" ng-show="delayTimeForm.delayTime.$error.required && delayTimeForm.delayTime.$dirty">A delay time is required.</p>
            <p class="help-block" ng-show="delayTimeForm.delayTime.$error.min || delayTimeForm.delayTime.$error.max && delayTimeForm.delayTime.$dirty">Please enter a number between 0.1 and 99.9.</p>
          </div>
        </div>
        <div class="modal-footer">
          <button type="submit" class="btn btn-primary" ng-disabled="delayTimeForm.$invalid">Done</button>
          <button type="button" class="btn btn-danger" ng-click="deleteKey('delay');$hide()">Cancel</button>
        </div>
      </form>
    </div>
  </div>
</div>
