<div class="modal-header">
  <button type="button" class="close" ng-click="cancel()" aria-hidden="true">&times;</button>
  <h4 class="modal-title">Merge: {{merge.orig.properties.name.value}}</h4>
</div>

<form class="form-horizontal" role="form" name="mergeEntity" ng-submit="save(mergeEntity)">
  <div class="modal-body">
    <div class="alert alert-warning">
        <strong>Warning</strong> If you proceed,
        all properties and relations of {{merge.orig.properties.name.value}} will be
        redirected to the given entity.
    </div>
    <div class="form-group" ng-class="{'has-error': mergeEntity.dest.$invalid}">
      <label class="col-sm-2 control-label" for="name">Destination</label>
      <div class="col-sm-10">
        <gn-entity-suggest entity="merge.dest" project="project"></gn-entity-suggest>
        <p class="help-block" ng-show="mergeEntity.dest.$invalid" ng-bind="mergeEntity.dest.$message"></p>
      </div>
    </div>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
    <button type="submit" class="btn btn-primary">Merge</button>
  </div>
</form>
