|
3 | 3 | <div *ngIf="errorMessages" class="error-messages p-3"> |
4 | 4 | <ul class="mb-0"> |
5 | 5 | <li *ngFor="let error of errorMessages"> |
6 | | - {{error | translate}} |
| 6 | + {{ error | translate }} |
7 | 7 | </li> |
8 | 8 | </ul> |
9 | 9 | </div> |
10 | 10 |
|
11 | 11 | <div class="row"> |
12 | 12 | <div class="form-group mt-3"> |
13 | | - <label class="form-label" for="name">{{'QUESTION-LORA-GATEWAY.NAME' | translate}}</label>* |
| 13 | + <label class="form-label" for="name">{{ 'QUESTION-LORA-GATEWAY.NAME' | translate }}</label>* |
14 | 14 | <input type="text" class="form-control" id="name" name="name" |
15 | | - [placeholder]="'QUESTION-LORA-GATEWAY.NAME-PLACEHOLDER' | translate" maxlength="50" required |
16 | | - [(ngModel)]="gateway.name" |
17 | | - [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('name'), 'is-valid' : formFailedSubmit && !errorFields.includes('name')}"> |
| 15 | + [placeholder]="'QUESTION-LORA-GATEWAY.NAME-PLACEHOLDER' | translate" maxlength="50" required |
| 16 | + [(ngModel)]="gateway.name" |
| 17 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('name'), 'is-valid' : formFailedSubmit && !errorFields.includes('name')}"> |
18 | 18 | </div> |
19 | 19 |
|
20 | 20 | <div class="form-group mt-3"> |
21 | | - <label class="form-label" for="description">{{'QUESTION-LORA-GATEWAY.DESCRIPTION' | translate}}</label> |
| 21 | + <label class="form-label" for="description">{{ 'QUESTION-LORA-GATEWAY.DESCRIPTION' | translate }}</label> |
22 | 22 | <textarea id="description" name="description" |
23 | | - [placeholder]="'QUESTION-LORA-GATEWAY.DESCRIPTION-PLACEHOLDER' | translate" [maxLength]="1024" [rows]="6" |
24 | | - class="form-control" [(ngModel)]="gateway.description" |
25 | | - [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('description'), 'is-valid' : formFailedSubmit && !errorFields.includes('description')}"></textarea> |
| 23 | + [placeholder]="'QUESTION-LORA-GATEWAY.DESCRIPTION-PLACEHOLDER' | translate" [maxLength]="1024" |
| 24 | + [rows]="6" |
| 25 | + class="form-control" [(ngModel)]="gateway.description" |
| 26 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('description'), 'is-valid' : formFailedSubmit && !errorFields.includes('description')}"></textarea> |
26 | 27 | </div> |
27 | 28 |
|
28 | 29 | <div class="form-group mt-3"> |
29 | | - <label class="form-label" for="gatewayId">{{'QUESTION-LORA-GATEWAY.GATEWAYID' | translate}}</label>* |
| 30 | + <label class="form-label" for="gatewayId">{{ 'QUESTION-LORA-GATEWAY.GATEWAYID' | translate }}</label>* |
30 | 31 | <input type="text" class="form-control" id="gatewayId" name="gatewayId" |
31 | | - [placeholder]="'QUESTION-LORA-GATEWAY.GATEWAYID-PLACEHOLDER' | translate" required |
32 | | - [(ngModel)]="gateway.gatewayId" [readonly]="editMode" |
33 | | - [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('gatewayId'), 'is-valid' : formFailedSubmit && !errorFields.includes('gatewayId')}"> |
| 32 | + [placeholder]="'QUESTION-LORA-GATEWAY.GATEWAYID-PLACEHOLDER' | translate" required |
| 33 | + [(ngModel)]="gateway.gatewayId" [readonly]="editMode" |
| 34 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('gatewayId'), 'is-valid' : formFailedSubmit && !errorFields.includes('gatewayId')}"> |
34 | 35 | </div> |
35 | 36 |
|
36 | 37 | <div class="row thirty-height" *ngIf="gateway.location"> |
|
40 | 41 |
|
41 | 42 | <div class="row mb-5"> |
42 | 43 | <div class="form-group mt-3 col-6"> |
43 | | - <label class="form-label" for="longitude">{{'GATEWAY.LONGITUDE' | translate}}</label> |
| 44 | + <label class="form-label" for="longitude">{{ 'GATEWAY.LONGITUDE' | translate }}</label> |
44 | 45 | <input type="number" class="form-control" id="longitude" name="longitude" [placeholder]="'00'" required |
45 | 46 | [(ngModel)]="gateway.location.longitude" step=".000001" min="-180" max="180" maxlength="12" |
46 | 47 | (keyup)="onCoordinateKey($event)" |
47 | 48 | [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('longitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('longitude')}"> |
48 | 49 | </div> |
49 | 50 |
|
50 | 51 | <div class="form-group mt-3 col-6"> |
51 | | - <label class="form-label" for="location.latitude">{{'GATEWAY.LATITUDE' | translate}}</label> |
| 52 | + <label class="form-label" for="location.latitude">{{ 'GATEWAY.LATITUDE' | translate }}</label> |
52 | 53 | <input type="number" class="form-control" id="location.latitude" name="location.latitude" [placeholder]="'00'" |
53 | 54 | required [(ngModel)]="gateway.location.latitude" step=".000001" min="-180" max="180" maxlength="12" |
54 | 55 | (keyup)="onCoordinateKey($event)" |
55 | 56 | [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('latitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('latitude')}"> |
56 | 57 | </div> |
57 | 58 |
|
58 | 59 | <div class="form-group mt-3 col-6"> |
59 | | - <label class="form-label" for="altitude">{{'GATEWAY.ALTITUDE' | translate}}</label> |
| 60 | + <label class="form-label" for="altitude">{{ 'GATEWAY.ALTITUDE' | translate }}</label> |
60 | 61 | <input type="number" class="form-control" id="altitude" name="altitude" [placeholder]="00" required |
61 | 62 | [(ngModel)]="gateway.location.altitude" step=".000001" min="-180" max="180" maxlength="9" |
62 | 63 | (keyup)="onCoordinateKey($event)" |
63 | 64 | [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('altitude'), 'is-valid' : formFailedSubmit && !errorFields.includes('altitude')}"> |
64 | 65 | </div> |
| 66 | + <div class="form-group mt-3"> |
| 67 | + <label class="form-label" for="placement">{{ 'GATEWAY.PLACEMENT-LABEL' | translate }}</label> |
| 68 | + <mat-select class="form-control" id="placement" name="gateway.placementOptions" [(ngModel)]="gateway.placement" |
| 69 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('placement'), 'is-valid' : formFailedSubmit && !errorFields.includes('placement')}"> |
| 70 | + <mat-option *ngFor="let placementOption of placements" [value]="placementOption.value"> |
| 71 | + {{ placementOption.label }} |
| 72 | + </mat-option> |
| 73 | + </mat-select> |
| 74 | + </div> |
| 75 | + <div class="form-group mt-3"> |
| 76 | + <label class="form-label" for="modelName">{{ 'QUESTION-LORA-GATEWAY.MODEL-NAME' | translate }}</label> |
| 77 | + <input type="text" class="form-control" id="modelName" name="modelName" |
| 78 | + [placeholder]="'QUESTION-LORA-GATEWAY.MODEL-NAME-PLACEHOLDER' | translate" |
| 79 | + [(ngModel)]="gateway.modelName" |
| 80 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('modelName'), 'is-valid': formFailedSubmit && !errorFields.includes('modelName')}"> |
| 81 | + </div> |
| 82 | + <div class="form-group mt-3"> |
| 83 | + <label class="form-label" for="antennaType">{{ 'QUESTION-LORA-GATEWAY.ANTENNA-TYPE' | translate }}</label> |
| 84 | + <input type="text" class="form-control" id="antennaType" name="antennaType" |
| 85 | + [placeholder]="'QUESTION-LORA-GATEWAY.ANTENNA-TYPE-PLACEHOLDER' | translate" |
| 86 | + [(ngModel)]="gateway.antennaType" |
| 87 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('antennaType'), 'is-valid': formFailedSubmit && !errorFields.includes('antennaType')}"> |
| 88 | + </div> |
| 89 | + <div class="form-group mt-3"> |
| 90 | + <label class="form-label" for="status">{{ 'GATEWAY.STATUS-NAME' | translate }}</label> |
| 91 | + <mat-select class="form-control" id="status" name="gateway.statusOptions" [(ngModel)]="gateway.status" |
| 92 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('status'), 'is-valid' : formFailedSubmit && !errorFields.includes('status')}"> |
| 93 | + <mat-option *ngFor="let statusOption of statuses" [value]="statusOption.value"> |
| 94 | + {{ statusOption.label }} |
| 95 | + </mat-option> |
| 96 | + </mat-select> |
| 97 | + </div> |
| 98 | + <div class="form-group mt-3"> |
| 99 | + <label class="form-label" |
| 100 | + for="gatewayResponsible">{{ 'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE' | translate }}</label> |
| 101 | + <input type="text" class="form-control" id="gatewayResponsible" name="gatewayResponsible" |
| 102 | + [placeholder]="'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE-PLACEHOLDER' | translate" |
| 103 | + [(ngModel)]="gateway.gatewayResponsibleName" |
| 104 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('gatewayResponsibleName'), 'is-valid': formFailedSubmit && !errorFields.includes('gatewayResponsibleName')}"> |
| 105 | + </div> |
| 106 | + <div class="form-group mt-3"> |
| 107 | + <label class="form-label" |
| 108 | + for="gatewayResponsibleEmail">{{ 'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE-CONTACT' | translate }}</label> |
| 109 | + <input type="text" class="form-control" id="gatewayResponsibleEmail" name="gatewayResponsibleEmail" |
| 110 | + [placeholder]="'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE-CONTACT-PLACEHOLDER' | translate" |
| 111 | + [(ngModel)]="gateway.gatewayResponsibleEmail" |
| 112 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('gatewayResponsibleEmail'), 'is-valid': formFailedSubmit && !errorFields.includes('gatewayResponsibleEmail')}"> |
| 113 | + </div> |
| 114 | + <div class="form-group mt-3"> |
| 115 | + <label class="form-label" |
| 116 | + for="gatewayResponsiblePhoneNumber">{{ 'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE-CONTACT-NUMBER' | translate }}</label> |
| 117 | + <input type="text" class="form-control" id="gatewayResponsiblePhoneNumber" name="gatewayResponsiblePhoneNumber" |
| 118 | + [placeholder]="'QUESTION-LORA-GATEWAY.GATEWAY-RESPONSIBLE-CONTACT-NUMBER-PLACEHOLDER' | translate" |
| 119 | + [(ngModel)]="gateway.gatewayResponsiblePhoneNumber" |
| 120 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('gatewayResponsiblePhoneNumber'), 'is-valid': formFailedSubmit && !errorFields.includes('gatewayResponsiblePhoneNumber')}"> |
| 121 | + </div> |
| 122 | + <div class="form-group mt-3"> |
| 123 | + <label class="form-label" |
| 124 | + for="operationalResponsibleName">{{ 'QUESTION-LORA-GATEWAY.OPERATION-RESPONSIBLE' | translate }}</label> |
| 125 | + <input type="text" class="form-control" id="operationalResponsibleName" name="operationalResponsibleName" |
| 126 | + [placeholder]="'QUESTION-LORA-GATEWAY.OPERATION-RESPONSIBLE-PLACEHOLDER' | translate" |
| 127 | + [(ngModel)]="gateway.operationalResponsibleName" |
| 128 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('operationalResponsibleName'), 'is-valid': formFailedSubmit && !errorFields.includes('operationalResponsibleName')}"> |
| 129 | + </div> |
| 130 | + <div class="form-group mt-3"> |
| 131 | + <label class="form-label" |
| 132 | + for="operationalResponsibleEmail">{{ 'QUESTION-LORA-GATEWAY.OPERATION-RESPONSIBLE-CONTACT' | translate }}</label> |
| 133 | + <input type="text" class="form-control" id="operationalResponsibleEmail" name="operationalResponsibleEmail" |
| 134 | + [placeholder]="'QUESTION-LORA-GATEWAY.OPERATION-RESPONSIBLE-CONTACT-PLACEHOLDER' | translate" |
| 135 | + [(ngModel)]="gateway.operationalResponsibleEmail" |
| 136 | + [ngClass]="{'is-invalid': formFailedSubmit && errorFields.includes('operationalResponsibleEmail'), 'is-valid': formFailedSubmit && !errorFields.includes('operationalResponsibleEmail')}"> |
| 137 | + </div> |
65 | 138 | </div> |
66 | 139 | <div class="form-group mt-3"> |
67 | | - <label class="form-label" for="tagsString">{{'QUESTION-LORA-GATEWAY.METADATA' | translate}}</label> |
| 140 | + <label class="form-label" for="tagsString">{{ 'QUESTION-LORA-GATEWAY.METADATA' | translate }}</label> |
68 | 141 | <input type="text" class="form-control" id="tagsString" name="tagsString" |
69 | | - [placeholder]="'QUESTION-LORA-GATEWAY.METADATA-PLACEHOLDER' | translate" required |
70 | | - [(ngModel)]="gateway.tagsString" |
71 | | - [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('tagsString'), 'is-valid' : formFailedSubmit && !errorFields.includes('tagsString')}"> |
| 142 | + [placeholder]="'QUESTION-LORA-GATEWAY.METADATA-PLACEHOLDER' | translate" required |
| 143 | + [(ngModel)]="gateway.tagsString" |
| 144 | + [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('tagsString'), 'is-valid' : formFailedSubmit && !errorFields.includes('tagsString')}"> |
72 | 145 | </div> |
73 | | - |
74 | 146 | </div> |
75 | 147 |
|
76 | 148 | <div class="form-group mt-5"> |
77 | | - <button (click)="routeBack()" class="btn btn-secondary" type="button">{{ 'GEN.CANCEL' | translate}}</button> |
| 149 | + <button (click)="routeBack()" class="btn btn-secondary" type="button">{{ 'GEN.CANCEL' | translate }}</button> |
78 | 150 | <button class="btn btn-primary ml-2" type="submit">{{ submitButton }}</button> |
79 | 151 | </div> |
80 | 152 | </form> |
|
0 commit comments