<div class="row">
  <div class="col-xs-12">
    <div class="input-group">
      <span class="input-group-addon" translate>
        model.featuretypes.actions.actionName
      </span>
      <input
        type="text"
        class="form-control"
        ng-model="currentFormData.name"
        required
      />
    </div>
  </div>
</div>

<div class="row">
  <div class="col-xs-12">
    <div class="alert alert-info">
      <translate>model.featuretypes.actions.EsrigeoprocessDescription</translate>
    </div>
  </div>
</div>


<div class="row">
  <div class="col-xs-12">
    <div class="input-group">
      <span class="input-group-addon" translate> urlsharing.url </span>
      <input
        type="url"
        class="form-control"
        ng-change="ArcGISUrlChanged()"
        ng-model="currentFormData.url"
        required
      />
    </div>
  </div>
</div>

<div class="row">
  <div class="col-xs-12">
    <div class="input-group">
      <span class="input-group-addon featuretypeaction-grey-border" translate>
        adminparam.columntitle_parameters
      </span>
      <button
        type="button"
        class="btn btn-min btn-success featuretypeaction-addparam-button"
        title="{{'common.add' | translate}}"
        ng-click="addParameter()"
      >
        <translate>model.featuretypes.actions.addparameter</translate>
      </button>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-xs-12">
    <table ng-table="tableParams" class="table table-striped table-bordered">
      <tr>
        <th colspan="2">
          <translate>model.featuretypes.actions.RapportTitle</translate>
        </th>
        <th colspan="2">
          <translate>adminparam.columntitle_modesaisie</translate>
        </th>
        <th colspan="2">
          <translate>model.featuretypes.actions.value</translate>
        </th>
        <th colspan="1">
          <translate>adminparam.columntitle_actions</translate>
        </th>
      </tr>
      <tr
        class="featuretypeaction-actions-buttons"
        ng-repeat="rapport in $data"
        ng-class="{'active': rapport.$selected}"
      >
        <td colspan="2">
          <input ng-show="!arcGisParameters"
            type="text"
            ng-model="rapport.name"
            class="form-control"
            required
          />
          <select ng-show="arcGisParameters" ng-model="rapport.name"
            ng-options="param.name as param.name for param in arcGisParameters">
          </select>
        </td>
        <td colspan="2">
          <select
            ng-model="rapport.saisieMode"
            ng-options="saisieMode for saisieMode in saisieModes | orderBy : 'toString()'  "
            ng-init="rapport.saisieMode = rapport.saisieMode || ( 'model.featuretypes.actions.saisieAttribut' | translate )"
            data-html="1"
            name="saisie_id"
            ng-change="changedParameters(rapport)"
            class="form-control"
            required
          >
            <option value="" disabled selected hidden translate
              >model.featuretypes.actions.choisirmode</option
            >
          </select>
        </td>
        <td colspan="2">
          <select
            ng-if="rapport.saisieMode == ( 'model.featuretypes.actions.saisieAttribut' | translate )"
            ng-model="rapport.attribute"
            ng-options="attribut for attribut in attributesAliases | orderBy : 'toString()'"
            name="paremeter_id"
            data-html="1"
            class="form-control"
            ng-change="attributChanged(rapport)"
            required
          >
            <option value="" hidden selected disabled translate
              >model.featuretypes.actions.select_attribut</option
            >
          </select>
          <input
            type="text"
            data-html="1"
            class="form-control"
            ng-disabled="true"
            ng-if="rapport.saisieMode === ( 'model.featuretypes.actions.saisieUtilisateur' | translate )"
            placeholder="{{ 'model.featuretypes.actions.saisieENUtilisateur' | translate }}"
          />
          <input
              type="text"
              data-html="1"
              class="form-control"
              ng-disabled="true"
              ng-if="rapport.saisieMode === ('model.featuretypes.actions.linearAtlasGeometry' | translate)
              || rapport.saisieMode === ('model.featuretypes.actions.surfaceAtlasGeometry' | translate)"
              placeholder="{{ 'model.featuretypes.actions.geometryOfEditedObject' | translate }}"
          />
          <input
            type="text"
            ng-if="rapport.saisieMode == ( 'model.featuretypes.actions.saisieStatic' | translate )"
            ng-model="rapport.attribute"
            class="form-control"
            required
          />
        </td>
        <td colspan="1">
          <button
            class="btn btn-mini btn-danger"
            ng-click="removeParameter($index)"
          >
            <i class="fa fa-remove"></i>
          </button>
        </td>
      </tr>
    </table>
  </div>
</div>