Skip to content

Commit

Permalink
Reformat form
Browse files Browse the repository at this point in the history
  • Loading branch information
valb3r committed Apr 5, 2021
1 parent 708e43c commit a94be9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ <h5>Project activities:</h5>
cdkAutosizeMaxRows="10"></textarea>
</mat-form-field>
<br/>

<h5>Screenshot settings:</h5>
<div>
Ticketing interval, minutes:
<mat-slider min="1" max="30" step="1" [formControl]="ticketingInterval" thumbLabel="true"></mat-slider>
</div>
<h3>Screenshot settings:</h3>
<div>
<mat-checkbox [formControl]="trackScreenShots">
Do track screenshots
Expand All @@ -76,11 +79,6 @@ <h5>Screenshot settings:</h5>
Screenshot quality:
<mat-slider min="0" max="1" step="0.1" [formControl]="screenShotQuality" thumbLabel="true"></mat-slider>
</div>
<br/>
<div>
Screenshot interval, minutes:
<mat-slider min="1" max="30" step="1" [formControl]="screenShotIntervalM" thumbLabel="true"></mat-slider>
</div>
</form>
</mat-card-content>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export class AddOrEditProjectDialogComponent implements OnInit {

trackScreenShots = new FormControl(false, []);
screenShotQuality = new FormControl(0.5, [Validators.required, Validators.min(0), Validators.max(1)]);
screenShotIntervalM = new FormControl(10, []);
ticketingInterval = new FormControl(10, []);

newProjectForm = this.fb.group({
username: this.projectCodeControl,
fullname: this.projectNameControl,
activities: this.fb.array([]),
trackScreenShots: this.trackScreenShots,
screenShotQuality: this.screenShotQuality,
screenShotIntervalM: this.screenShotIntervalM
screenShotIntervalM: this.ticketingInterval
}, {validator: AddOrEditProjectDialogComponent.checkActivities});

fieldMatcher = new FieldErrorStateMatcher();
Expand All @@ -60,7 +60,7 @@ export class AddOrEditProjectDialogComponent implements OnInit {

this.trackScreenShots.setValue(data.screenshots);
this.screenShotQuality.setValue(data.quality);
this.screenShotIntervalM.setValue(data.intervalminutes);
this.ticketingInterval.setValue(data.intervalminutes);
}

ngOnInit() {
Expand Down Expand Up @@ -104,7 +104,7 @@ export class AddOrEditProjectDialogComponent implements OnInit {
description: this.projectDescriptionControl.value,
screenshots: this.trackScreenShots.value,
quality: this.screenShotQuality.value,
intervalminutes: this.screenShotIntervalM.value
intervalminutes: this.ticketingInterval.value
});
}

Expand Down

0 comments on commit a94be9e

Please sign in to comment.