Skip to content

Commit

Permalink
Rename cancel to onCancel in footer instead of lintignore
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-glombik committed Oct 24, 2024
1 parent 22c6a38 commit 1997c98
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h3 jhiTranslate="artemisApp.exercise.sections.grading" id="artemisApp.exercise.
[isDisabled]="
!!(editForm.form.invalid || fileUploadExercise.dueDateError || fileUploadExercise.assessmentDueDateError || fileUploadExercise.exampleSolutionPublicationDateError)
"
(cancel)="previousState()"
(onCancel)="previousState()"
(save)="save()"
[(notificationText)]="notificationText"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ <h3 jhiTranslate="artemisApp.exercise.sections.grading" id="artemisApp.exercise.
[isCreation]="!modelingExercise.id"
[isSaving]="isSaving"
[isDisabled]="!!(editForm.form.invalid || modelingExercise.dueDateError || modelingExercise.assessmentDueDateError || modelingExercise.exampleSolutionPublicationDateError)"
(cancel)="previousState()"
(onCancel)="previousState()"
(save)="save()"
[(notificationText)]="notificationText"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2 id="jhi-programming-exercise-heading-import" jhiTranslate="artemisApp.progra
[isSaving]="isSaving"
[invalidReasons]="getInvalidReasons()"
(save)="save()"
(cancel)="previousState()"
(onCancel)="previousState()"
[(notificationText)]="notificationText"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ <h3 jhiTranslate="artemisApp.exercise.sections.grading" id="artemisApp.exercise.
[isImport]="isImport"
[isSaving]="isSaving"
[isDisabled]="!!(editForm.form.invalid || textExercise.dueDateError || textExercise.assessmentDueDateError || textExercise.exampleSolutionPublicationDateError)"
(cancel)="previousState()"
(onCancel)="previousState()"
(save)="save()"
[(notificationText)]="notificationText"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<span class="d-none d-md-inline">({{ invalidReasons.length }})</span>
</div>
}
<button type="button" id="cancel-save" class="btn btn-sm btn-secondary" (click)="cancel.next()">
<button type="button" id="cancel-save" class="btn btn-sm btn-secondary" (click)="onCancel.next()">
<fa-icon [fixedWidth]="true" [icon]="faBan" class="sm" />
<span class="d-none d-sm-inline" jhiTranslate="entity.action.cancel"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { ButtonSize } from 'app/shared/components/button.component';
export class FormFooterComponent {
@Output() save = new EventEmitter<void>();

// eslint-disable @angular-eslint/no-output-native -- Necessary to avoid conflicts with native DOM events
@Output() cancel = new EventEmitter<void>();
// eslint-enable @angular-eslint/no-output-native
@Output() onCancel = new EventEmitter<void>();

@Input() isSaving: boolean = false;
@Input() isDisabled: boolean = false;
Expand Down

0 comments on commit 1997c98

Please sign in to comment.