1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-01 13:48:56 +08:00

30 lines
1.1 KiB
HTML
Raw Normal View History

<!--
Copyright (c) 2018
Mainflux
SPDX-License-Identifier: Apache-2.0
-->
2018-05-09 12:32:49 +02:00
<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>
2018-05-24 15:26:03 +02:00
<mat-select placeholder="Connected things" formControlName="connected" [compareWith]="compareFunction" multiple>
<mat-option *ngFor="let thing of thingsStore.things" [value]="thing">{{thing.name}}</mat-option>
2018-05-09 12:32:49 +02:00
</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>
2018-05-24 15:26:03 +02:00
</form>