<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" ng-click="closeRelatedData()">
          <i class="fa fa-times"></i>
        </button>
        <button type="button" class="close" ng-click="hideForm()">
          <i class="fa fa-minus"></i>
        </button>
        <h4 class="modal-title">
          <translate
            >tools.builder.fields.relations.form.associateformtitle</translate
          >
        </h4>
      </div>
      <div class="modal-body">
        <div ng-if="query.datatablemode == 'QUERY'">
          <nav class="navbar navbar-default">
            <div class="container-fluid">
              <!-- Brand and toggle get grouped for better mobile display -->
              <!-- Collect the nav links, forms, and other content for toggling -->
              <div
                class="collapse navbar-collapse"
                id="bs-example-navbar-collapse-1"
              >
                <div class="row">
                  <form class="navbar-form navbar-left">
                    <div class="form-group">
                      <div
                        model-attribute
                        res="query.querydata.filterfield"
                        fti="matchfti"
                        locked="fieldData.filterfieldcanbechanged == undefined || fieldData.filterfieldcanbechanged == false"
                      ></div>
                    </div>
                    <button
                      type="button"
                      ng-model="query.selop"
                      class="btn btn-info"
                      bs-options="operande.value as operande.value for operande in operandes"
                      bs-select
                    ></button>
                  </form>
                  <form class="navbar-form navbar-left">
                    <div class="form-group">
                      <div
                        form-field
                        fti="matchfti"
                        ftid=""
                        map="map"
                        attname="query.querydata.filterfield.name"
                        default=""
                        initvalue=""
                        res="query.partdata"
                      ></div>
                    </div>
                    <button
                      type="button"
                      ng-model="query.selop"
                      class="btn btn-info"
                      ng-click="processSearch()"
                    >
                      <span>
                        <i class="fa fa-filter"></i>
                      </span>
                    </button>
                  </form>
                </div>
                <div class="row">
                  <div class="checkbox navbar-form navbar-left">
                    <input
                      type="checkbox"
                      ng-model="query.casesensitive"
                    />{{'common.case_sensitive' | translate }}
                  </div>
                </div>
              </div>
              <!-- /.navbar-collapse -->
            </div>
            <!-- /.container-fluid -->
          </nav>
          <div
            where="query.where"
            height="330"
            fti="matchfti"
            res=""
            map="map"
            actions="relatedActions"
            relationshow="true"
            gcdata-datatable
          ></div>
        </div>
        <div ng-if="query.datatablemode == 'GEOJSON'">
          <div
            geojsondata="query.selectlist"
            height="330"
            fti="matchfti"
            res=""
            map="map"
            actions="relatedActions"
            relationshow="true"
            gcdata-datatable
          ></div>
        </div>
      </div>
      <div class="modal-footer">
        <button
          type="button"
          class="btn btn-default"
          ng-click="closeForm(true)"
          style="float: left;"
        >
          {{'common.allclose' | translate }}
        </button>
      </div>
    </div>
  </div>
</div>
