<div class="featuretypeactionIsDetail">
  <div class="col-xs-12">
    <div class="input-group">
      <span class="input-group-addon" translate> common.name </span>
      <input
        type="text"
        class="form-control"
        placeholder="{{ 'common.name' | translate }}"
        ng-model="currentFormData.name"
        required
      />
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <label class="iTitle"> Rappel de l'intervention concernée </label>
      <div class="fieldsWrapper">
        <div
          class="field"
          ng-repeat="field in currentFormData.properties.is_detail_cfg.parent.fields track by $index"
        >
          <div
            class="btn btn-xxs btn-danger removeFieldFromBloc"
            ng-click="removeFieldFromBloc($index,'parent')"
          >
            <i class="fa fa-minus"></i>
          </div>
          <select
            class="form-control"
            ng-model="field.attr"
            class="btn btn-default attrpicker"
            ng-options="attr.name as translateAlias(attr,fti) for attr in fti.attributes"
          >
          </select>
        </div>
        <div class="field add">
          <div
            class="btn btn-sm btn-default addFieldToBloc"
            ng-click="addFieldToBloc('parent')"
          >
            <i class="fa fa-plus"></i>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="row spbrow">
    <div class="col-xs-12">
      <label class="iTitle"> Détails d'intervention </label>
    </div>
  </div>

  <div class="row spbrow">
    <div class="col-xs-6">
      <label> Table détail </label>
      <div
        model-component
        onchange="diftipicked(changedByUser)"
        res="diComponent.x"
        ftid="currentFormData.properties.is_detail_cfg.di_fti"
        autocomplete="true"
      ></div>
    </div>

    <div class="col-xs-6" ng-show="diComponent.x.uid">
      <label> Clé étrangère </label>
      <select
        class="form-control"
        ng-model="currentFormData.properties.is_detail_cfg.di_fk"
        class="btn btn-default attrpicker"
        ng-options="attr.name as translateAlias(attr,diComponent.x) for attr in diComponent.x.attributes"
      ></select>
    </div>
  </div>
  <div class="row">
    <div
      class="col-xs-12"
      ng-show="diComponent.x.uid && currentFormData.properties.is_detail_cfg.di_fk"
    >
      <div class="fieldsWrapper">
        <div
          class="field"
          ng-repeat="field in currentFormData.properties.is_detail_cfg.self.fields track by $index"
        >
          <div
            class="btn btn-xxs btn-danger removeFieldFromBloc"
            ng-click="removeFieldFromBloc($index,'self')"
          >
            <i class="fa fa-minus"></i>
          </div>
          <select
            class="form-control"
            ng-model="field.attr"
            class="btn btn-default attrpicker"
            ng-options="attr.name as translateAlias(attr,diComponent.x) for attr in diComponent.x.attributes"
          >
          </select>
        </div>
        <div class="field add">
          <div
            class="btn btn-sm btn-default addFieldToBloc"
            ng-click="addFieldToBloc('self')"
          >
            <i class="fa fa-plus"></i>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
