<h4>
  <span>{{ 'model.featuretypes.import_shape.modal_title' | translate }}</span>
</h4>
<div class="row">
  <div class="col-xs-12">
    <label>
      <translate>model.datastores.please_select</translate>
    </label>
    <select
      ng-model="selectedStore"
      ng-options="dataStore.name for dataStore in stores track by dataStore.uid"
      id="inputStoresNames"
      class="form-control"
      required
    >
    </select>
  </div>
</div>
<div class="row">
  <div class="col-xs-12">
    <label>
      <translate>model.featuretypes.import_shape.load_files</translate>
    </label>
    <table style="width: 100%;">
      <tr>
        <td style="width: 50%;">
          <div
            ng-drop-zone
            max-filesize="6000"
            class="dropzone-container min-dropzone"
            drop-action="/services/{portalid}/file/uploadProcess"
            remove-action="/services/{portalid}/file/removeUploaded"
            process-id="uploadProcessID"
            dropzone-component="dropzoneComponent"
            dropzone-title="model.featuretypes.import_shape.files_to_drop"
          ></div>
          <button
            class="btn btn-default"
            type="button"
            ng-disabled="waitImport || !selectedStore"
            ng-click="importFile()"
          >
            <translate>importexportwidget.import</translate>
            <span class="glyphicon glyphicon-upload"></span>
          </button>
          <button
            class="btn btn-default"
            type="button"
            ng-disabled="waitImport"
            ng-click="clearDropzone()"
          >
            <translate>importexportwidget.deleteAll</translate>
            <span class="glyphicon glyphicon-remove"></span>
          </button>
          <img
            src="img/common/wait.gif"
            class="imp_waitImg"
            ng-show="waitImport"
          />
        </td>
        <td style="vertical-align: top;">
          <div class="imp_shp_descriptions">
            <div
              class="imp_shp_desc_list"
              ng-show="importedFeatures.length > 0"
            >
              <div
                class="imp_feature_description"
                ng-repeat="impfeat in importedFeatures"
              >
                <h4>{{impfeat.alias}}</h4>
                <p>
                  <span ng-repeat="impAttrib in impfeat.attributes"
                    >"{{impAttrib.name}}"
                  </span>
                </p>
                <br />
                <label>
                  <translate
                    >model.featuretypes.import_shape.srid_import_layer</translate
                  >
                </label>
                <input
                  type="text"
                  class="form-control"
                  ng-model="impfeat.srid"
                  bs-options="srid for srid in srids"
                  placeholder="ex: EPSG:3857, EPSG:2154, EPSG:4326..."
                  limit="25"
                  bs-typeahead
                />
              </div>
            </div>
          </div>
        </td>
      </tr>
    </table>
  </div>
</div>
<div class="row">
  <div class="col-xs-12">
    <label>
      <translate>model.featuretypes.import_shape.options</translate>
    </label>
    <div class="imp_shp_submit_block">
      <input type="checkbox" id="importDataChkbx" ng-model="importData" />
      <translate>model.featuretypes.import_shape.import</translate>
    </div>
    <div class="imp_shp_submit_block">
      <input type="checkbox" id="forceUpdateAttributsAndSrid" ng-model="forceUpdateAttributsAndSrid" />
      <translate>model.featuretypes.import_shape.forceUpdateAttributsAndSrid</translate>
    </div>
  </div>
  <br />
  <div class="col-xs-12 text-left">
    <label>
      <translate
        >model.featuretypes.import_shape.select_srid_destination</translate
      >
    </label>
    <input
      type="text"
      class="form-control"
      ng-model="destinationSRID"
      bs-options="srid for srid in srids"
      placeholder="ex: EPSG:3857, EPSG:2154, EPSG:4326..."
      limit="25"
      bs-typeahead
    />
  </div>
  <div class="col-xs-12 text-right">
    <hr />
    <button
      type="button"
      id="imp_shp_submit_button"
      class="btn btn-mini btn-primary"
      ng-disabled="waitImport || selectedStore == null || importedFeatures.length == 0 || destinationSRID == null"
      ng-click="submitShapeFeaturesImport()"
    >
      <translate>model.featuretypes.import_shape.submit</translate>
    </button>
  </div>
</div>
