hunk.code_window:     }
       this.$window.onbeforeunload = () => {
         if (this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
           return '';
         }
       };
  
hunk.labels: keep keep keep replace keep keep keep
hunk.after_edit:       if (this.edgeJob && this.edgeJob.FileContent !== this.oldFileContent && this.state.isEditorDirty) {
  
hunk.file_path: app/edge/views/edge-jobs/edgeJob/edgeJobController.js
hunk.type: replace
file: <div class="col-sm-12">
    <rd-widget>
      <rd-widget-custom-header icon="$ctrl.template.Logo" title-text="$ctrl.template.Title"></rd-widget-custom-header>
      <rd-widget-body classes="padding">
        <form class="form-horizontal" name="stackTemplateForm">
          <!-- description -->
          <div ng-if="$ctrl.template.Note">
            <div class="col-sm-12 form-section-title"> Information </div>
            <div class="form-group">
              <div class="col-sm-12">
                <div class="template-note" ng-bind-html="$ctrl.template.Note"></div>
              </div>
            </div>
          </div>
          <!-- !description -->
          <div class="col-sm-12 form-section-title"> Configuration </div>
          <!-- name-input -->
          <div class="form-group">
            <label for="template_name" class="col-sm-2 control-label text-left">Name</label>
            <div class="col-sm-10">
              <input type="text" name="template_name" class="form-control" ng-model="$ctrl.formValues.name" ng-pattern="$ctrl.nameRegex" placeholder="e.g. myStack" required />
            </div>
          </div>
          <div class="form-group" ng-show="stackTemplateForm.template_name.$invalid">
            <div class="col-sm-12 small text-warning">
              <div ng-messages="stackTemplateForm.template_name.$error">
                <p ng-message="pattern">
                  <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
                  <span>This field must consist of lower case alphanumeric characters, '_' or '-' (e.g. 'my-name', or 'abc-123').</span>
                </p>
              </div>
            </div>
          </div>
          <!-- !name-input -->
          <!-- env -->
          <div ng-repeat="var in $ctrl.template.Env" ng-if="!var.preset || var.select" class="form-group">
            <label for="field_{{ $index }}" class="col-sm-2 control-label text-left">
              {{ var.label }}
              <portainer-tooltip ng-if="var.description" position="bottom" message="{{ var.description }}"></portainer-tooltip>
            </label>
            <div class="col-sm-10">
              <input type="text" class="form-control" ng-if="!var.select" ng-model="var.value" id="field_{{ $index }}" />
              <select class="form-control" ng-if="var.select" ng-model="var.value" id="field_{{ $index }}">
                <option selected disabled hidden value="">Select value</option>
                <option ng-repeat="choice in var.select" value="{{ choice.value }}">{{ choice.text }}</option>
              </select>
            </div>
          </div>
          <!-- !env -->
          <ng-transclude ng-transclude-slot="advanced"></ng-transclude>
  
          <!-- access-control -->
          <por-access-control-form form-data="$ctrl.formValues.AccessControlData"></por-access-control-form>
          <!-- !access-control -->
          <!-- actions -->
          <div class="col-sm-12 form-section-title"> Actions </div>
          <div class="form-group">
            <div class="col-sm-12">
              <button
                type="button"
                class="btn btn-primary btn-sm"
                ng-disabled="$ctrl.state.actionInProgress || !$ctrl.formValues.name || !$ctrl.state.deployable"
                ng-click="$ctrl.createTemplate()"
                button-spinner="$ctrl.state.actionInProgress"
              >
                <span ng-hide="$ctrl.state.actionInProgress">Deploy the stack</span>
                <span ng-show="$ctrl.state.actionInProgress">Deployment in progress...</span>
              </button>
              <button type="button" class="btn btn-sm btn-default" ng-click="$ctrl.unselectTemplate($ctrl.template)">Hide</button>
              <div class="cols-sm-12 small text-danger" ng-if="$ctrl.state.formValidationError" style="margin-left: 5px; margin-top: 5px">{{ $ctrl.state.formValidationError }}</div>
              <div class="cols-sm-12 small text-danger" ng-if="!$ctrl.state.deployable" style="margin-left: 5px; margin-top: 5px"
                >This template type cannot be deployed on this environment.</div
              >
            </div>
          </div>
          <!-- !actions -->
        </form>
      </rd-widget-body>
    </rd-widget>
  </div>
  