<div class="AncPersonneModal">
  <h3 class="modalTitle">
    <translate ng-if="!etablissementInfos && !dossier.properties.etablissement.id">Nouvel Etablissement</translate>
    <translate ng-if="!etablissementInfos && dossier.properties.etablissement.id">Édition Etablissement</translate>
    <translate ng-if="etablissementInfos">Information Etablissement</translate>

  </h3>
  <div class="modalBody">
    <div class="ancParcelle">
      <div>
        <div class="row spbrow">
          <div class="col-xs-12">
            <label style="color: #16a085">Etablissement</label>
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-6">
            <label class="required">Nom de l'établissement </label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.nom" />
            <input type="text" class="form-control" ng-if="etablissementInfos" ng-model="etablissementInfos.nom " />
          </div>
          <div class="col-xs-6">
            <label class="required"> N° Siret</label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.siret" />
            <input type="text" class="form-control" ng-if="etablissementInfos" ng-model="etablissementInfos.siret " />
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-12">
            <label style="color: #16a085">Contact</label>
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-4">
            <label>Civilité</label>
            <anc-civilite editable="true" ng-if="!etablissementInfos"
              res="dossier.properties.etablissement.contact_civilite">
            </anc-civilite>
            <anc-civilite editable="true" ng-if="etablissementInfos" res="etablissementInfos.contact_civilite">
            </anc-civilite>
          </div>
          <div class="col-xs-4">
            <label class="required"> Nom </label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_nom" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_nom " />
          </div>
          <div class="col-xs-4">
            <label>Prénom</label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_prenom" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_prenom " />
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-6">
            <label>Téléphone Fixe Contact</label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_num_tel" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_num_tel " />
          </div>
          <div class="col-xs-6">
            <label>Téléphone Portable Contact </label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_num_port" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_num_port " />
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-6">
            <label>Fax Contact</label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_fax" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_fax " />
          </div>
          <div class="col-xs-6">
            <label>Adresse e-mail Contact</label>
            <input type="text" class="form-control" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.contact_email" />
            <input type="text" class="form-control" ng-if="etablissementInfos"
              ng-model="etablissementInfos.contact_email " />
          </div>
        </div>
        <div class="row spbrow">
          <div class="col-xs-12">
            <label> Commentaires </label>
            <textarea class="form-control" rows="4" ng-if="etablissementInfos"
              ng-model="etablissementInfos.commentaires"></textarea>
            <textarea class="form-control" rows="4" ng-if="!etablissementInfos"
              ng-model="dossier.properties.etablissement.commentaires"></textarea>
          </div>
        </div>
      </div>
    </div>
    <div class="row spbrow" ng-if="!etablissementInfos">
      <div class="col-xs-12">
        <hr />
        <div class="btn btn-default pull-right" ng-disabled="!(dossier.properties.etablissement.siret && dossier.properties.etablissement.nom &&
          dossier.properties.etablissement.contact_nom)" ng-click="saveEtablissement()">
          <i class="fa fa-save"></i>
          <translate>common.save</translate>
        </div>
      </div>
    </div>
  </div>
</div>