<div class="modal" tabindex="-1" role="dialog">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" ng-click="closeNMFormulaire()">
          <i class="fa fa-times"></i>
        </button>
        <button type="button" class="close" ng-click="hideForm()">
          <i class="fa fa-minus"></i>
        </button>
        <div ng-if="scope.currentEditFeature.current.id != null">
          <h4 class="modal-title">scope.currentEditFeature.current.id</h4>
        </div>
        <div ng-if="scope.currentEditFeature.current.id == null">
          <h4
            class="modal-title"
            ng-bind-html="'edition.popup_title' | translate"
          ></h4>
        </div>
      </div>
      <div class="modal-body">
        <div ng-if="relatedFormTemplate == null">
          <div>
            <div ng-repeat="att in relatedAuthorizedAttributes">
              <label ng-class="field.required ? 'required' : ''"
                >{{ 'features.'+nmdata.ftiend.name+'.properties.' + att.name
                |translate }}
              </label>
              <div
                form-field
                fti="nmdata.ftiend"
                current="featuretoattach"
                map="map"
                required="false"
                attname="att.name"
                default=""
                res="currentEditProperties"
                activelabel="true"
                ng-model="popo"
                uploadfile="uploadfile"
                removedfile="removedfile"
              ></div>
            </div>
          </div>
        </div>
        <div ng-if="relatedFormTemplate != null">
          <div
            fti="nmdata.ftiend"
            map="map"
            res="currentEditFeature"
            editsession="editsession"
            relationholddata="relationholddata"
            chainpopup="chainpopup"
            editdescription="editdescription"
            templateform="relatedFormTemplate"
            form-render
          ></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>
        <button
          type="button"
          class="btn btn-default"
          ng-click="closeNMFormulaire()"
        >
          {{'common.close' | translate }}
        </button>
        <button
          type="button"
          class="btn btn-primary"
          ng-show="editmode"
          ng-click="saveNMFormulaire()"
        >
          {{'common.validate' | translate }}
        </button>
      </div>
    </div>
  </div>
</div>
