<div id="collapsible-modal" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Collapsible graph settings</h4>
      </div>

      <form ng-submit="updateCollapsibleSettings()">
        <div class="modal-body">
          <div class="form-group">
            <label>Max depth</label>
            <input class="form-control" id="collapsible-max-depth" re-auto-focus ng-model="collapsibleSettings.maxDepth" type="number" min="0"/>

            <label>Direction</label>
            <select
              id="collapsible-direction"
              ng-model="collapsibleSettings.direction"
              ui-select2="{
                minimumResultsForSearch: 10,
                containerCssClass: 'graphs-select-container',
                dropdownCssClass: 'graphs-select-dropdown'}">
              <option ng-repeat="direction in collapsibleDirections" value="{{direction.value}}">{{direction.text}}</option>
            </select>
          </div>
        </div> <!-- modal-body -->

        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
          <button type="submit" class="btn btn-primary">Save</button>
        </div>
      </form>

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