mirror of https://gitlab.com/openlp/web-remote.git
Minor tweak to alerts
This commit is contained in:
parent
91d902d07c
commit
5eba4581f6
|
@ -3,5 +3,5 @@
|
|||
<mat-form-field>
|
||||
<input matInput [(ngModel)]="alert" type="text" name="alert" placeholder="Alert" required>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button color="primary" id="sendButton" [disabled]="!alertForm.form.valid" (click)="onSubmit()">Send</button>
|
||||
<button mat-raised-button color="primary" id="sendButton" [disabled]="!alertForm.form.valid" (click)="onSubmit(); alertForm.reset()">Send</button>
|
||||
</form>
|
|
@ -18,8 +18,6 @@ export class OpenLPAlertComponent {
|
|||
constructor(private openlpService: OpenLPService, private snackBar: MatSnackBar) { }
|
||||
|
||||
onSubmit() {
|
||||
console.log('submitted: ', this.alert);
|
||||
this.openlpService.showAlert(this.alert).subscribe(res => this.snackBar.open('Alert submitted', '', {duration: 2000}));
|
||||
this.alert = '';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue