<div class="viewport-modal">
  <div class="modal-header dialog-header">
    <i c8y-icon="{{ vm.icons.simulator }}"></i>
    <h4 id="modal-title" translate>Duplicate simulator</h4>
  </div>

  <div class="modal-inner-scroll">
    <div class="modal-body" id="modal-body">
      <form name="simulatorCloneForm" novalidate>
        <div class="form-group">
          <label for="name" translate>Name</label>
          <input
            id="name"
            name="name"
            type="text"
            class="form-control"
            ng-model="vm.simulator.name"
            placeholder="{{ 'e.g. My simulator' | translate }}"
            required
          />
          <c8y-error-feedback field="simulatorCloneForm.name"></c8y-error-feedback>
        </div>
      </form>
    </div>
  </div>

  <div class="modal-footer">
    <button
      title="{{ 'Cancel' | translate }}"
      class="btn btn-default"
      ng-click="vm.dismiss()"
      type="button"
    >
      {{ 'Cancel' | translate }}
    </button>
    <button
      title="{{ 'Duplicate' | translate }}"
      type="button"
      class="btn btn-primary"
      ng-click="vm.close({$value: vm.simulator})"
      ng-disabled="simulatorCloneForm.$invalid"
    >
      {{ 'Duplicate' | translate }}
    </button>
  </div>
</div>
