From 242d8c77ca136ee5510fedec2666258a21be6faf Mon Sep 17 00:00:00 2001 From: Tomas Madeja <t.mm.madeja@gmail.com> Date: Thu, 27 May 2021 16:53:09 +0200 Subject: [PATCH] feat: rename form reset buttons --- .../components/create-game-form/create-game-form.component.html | 2 +- .../components/create-game-form/create-game-form.component.ts | 2 +- .../update-game-score-form.component.html | 2 +- .../update-game-score-form/update-game-score-form.component.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/app/components/create-game-form/create-game-form.component.html b/web/src/app/components/create-game-form/create-game-form.component.html index c975c5b..d5c60df 100644 --- a/web/src/app/components/create-game-form/create-game-form.component.html +++ b/web/src/app/components/create-game-form/create-game-form.component.html @@ -41,7 +41,7 @@ </div> <button type="submit" class="btn btn-success" [disabled]="!gameForm.form.valid">Submit</button> - <button type="button" class="btn btn-default" (click)="newGame(); gameForm.reset()">New Game</button> + <button type="button" class="btn btn-default" (click)="resetForm(); gameForm.reset()">Reset Form</button> </form> </div> diff --git a/web/src/app/components/create-game-form/create-game-form.component.ts b/web/src/app/components/create-game-form/create-game-form.component.ts index 43a9761..3be4402 100644 --- a/web/src/app/components/create-game-form/create-game-form.component.ts +++ b/web/src/app/components/create-game-form/create-game-form.component.ts @@ -41,7 +41,7 @@ export class CreateGameFormComponent implements OnInit { this.submitted = true; } - newGame() : void { + resetForm() : void { this.model = {gameDateTime: null, homeTeam: null, awayTeam: null}; } diff --git a/web/src/app/components/update-game-score-form/update-game-score-form.component.html b/web/src/app/components/update-game-score-form/update-game-score-form.component.html index 736a59d..cfa8cfa 100644 --- a/web/src/app/components/update-game-score-form/update-game-score-form.component.html +++ b/web/src/app/components/update-game-score-form/update-game-score-form.component.html @@ -29,7 +29,7 @@ </div> <button type="submit" class="btn btn-success" [disabled]="!updateGameScoreForm.form.valid">Submit</button> - <button type="button" class="btn btn-default" (click)="resetScore(); updateGameScoreForm.reset()">Reset Score</button> + <button type="button" class="btn btn-default" (click)="resetForm(); updateGameScoreForm.reset()">Reset Form</button> </form> </div> diff --git a/web/src/app/components/update-game-score-form/update-game-score-form.component.ts b/web/src/app/components/update-game-score-form/update-game-score-form.component.ts index 98bd39b..9ba1182 100644 --- a/web/src/app/components/update-game-score-form/update-game-score-form.component.ts +++ b/web/src/app/components/update-game-score-form/update-game-score-form.component.ts @@ -41,7 +41,7 @@ export class UpdateGameScoreFormComponent implements OnInit { this.submitted = true; } - resetScore() : void { + resetForm() : void { this.modelCopy.homeTeamScore = this.model.homeTeamScore; this.modelCopy.awayTeamScore = this.model.awayTeamScore; } -- GitLab