mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00
22 lines
1.1 KiB
HTML
22 lines
1.1 KiB
HTML
![]() |
<form [formGroup]="addChannelForm" (ngSubmit)="onAddChannel()">
|
||
|
<h1 *ngIf="!editMode" mat-dialog-title>Add channel</h1>
|
||
|
<h1 *ngIf="editMode" mat-dialog-title>Edit channel</h1>
|
||
|
<div mat-dialog-content fxLayout="column">
|
||
|
<input type="hidden" formControlName="id">
|
||
|
<mat-form-field>
|
||
|
<input matInput tabindex="1" placeholder="Name" formControlName="name" />
|
||
|
<mat-error *ngIf="addChannelForm.get('name').errors?.required">
|
||
|
Name is required
|
||
|
</mat-error>
|
||
|
</mat-form-field>
|
||
|
<mat-form-field>
|
||
|
<mat-select placeholder="Connected clients" formControlName="connected" [compareWith]="compareFunction" multiple>
|
||
|
<mat-option *ngFor="let client of clientsStore.clients" [value]="client">{{client.name}}</mat-option>
|
||
|
</mat-select>
|
||
|
</mat-form-field>
|
||
|
</div>
|
||
|
<div mat-dialog-actions>
|
||
|
<button mat-button mat-dialog-close>Cancel</button>
|
||
|
<button mat-button mat-raised-button color="primary" type="submit" [disabled]="addChannelForm.invalid">Ok</button>
|
||
|
</div>
|
||
|
</form>
|