<div class="col-sm-12 form-section-title" style="float: initial"> User search configurations </div>

<div style="margin-top: 10px" ng-repeat="config in $ctrl.settings | limitTo: (1 - $ctrl.settings)">
  <ldap-user-search-item
    index="$index"
    config="config"
    domain-suffix="{{ $ctrl.domainSuffix }}"
    show-username-format="$ctrl.showUsernameFormat"
    base-filter="{{ $ctrl.baseFilter }}"
    on-remove-click="($ctrl.onRemoveClick)"
    limited-feature-id="$ctrl.limitedFeatureId"
  ></ldap-user-search-item>
</div>

<div class="form-group" style="margin-top: 10px">
  <div class="col-sm-12">
    <button
      class="label label-default interactive vertical-center"
      style="border: 0"
      ng-click="$ctrl.onAddClick()"
      limited-feature-dir="{{::$ctrl.limitedFeatureId}}"
      limited-feature-tabindex="-1"
    >
      <pr-icon icon="'plus-circle'"></pr-icon>
      Add user search configuration
    </button>
  </div>
  <div class="col-sm-12" style="margin-top: 10px">
    <button class="btn btm-sm btn-primary" type="button" ng-click="$ctrl.search()" limited-feature-dir="{{::$ctrl.limitedFeatureId}}" limited-feature-tabindex="-1">
      Display Users
    </button>
  </div>
</div>

<ldap-users-datatable ng-if="$ctrl.showTable" dataset="$ctrl.users"></ldap-users-datatable>
