blob: 94adddfc43265ca7b1db19a672db01321dcec6b2 [file] [log] [blame]
Barath Kumar R403234e2020-07-07 15:48:58 +05301<!--
2Copyright 2020 TATA ELXSI
3
4Licensed under the Apache License, Version 2.0 (the 'License');
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15
16Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17-->
18<form [formGroup]="osmrepoForm" (ngSubmit)="osmRepoSubmit();">
19 <div class="modal-header">
20 <h4 class="modal-title" id="modal-basic-title">{{(getCreateupdateType === 'Add' ? 'PAGE.OSMREPO.NEWOSMREPO' : 'PAGE.OSMREPO.EDITOSMREPO') | translate }}</h4>
21 <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()">
22 <i class="fas fa-times-circle text-danger"></i>
23 </button>
24 </div>
25 <div class="modal-body osmrepoadd">
SANDHYA.JSc84f1122024-06-04 21:50:03 +053026 <div class="form-group row mb-3">
Barath Kumar R403234e2020-07-07 15:48:58 +053027 <label class="col-sm-12 col-form-label mandatory-label"
28 [ngClass]="{'text-danger': osmrepoForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | translate}}</label>
29 <label class="col-sm-4 col-form-label" for="name">{{'NAME' | translate}}*</label>
30 <div class="col-sm-8">
31 <input autocomplete="off" class="form-control" placeholder="{{'NAME' | translate}}" type="text"
32 formControlName="name" id="name" [ngClass]="{ 'is-invalid': submitted && f.name.errors }"
33 maxlength="{{sharedService.MAX_LENGTH_NAME}}" required>
34 </div>
35 </div>
SANDHYA.JSc84f1122024-06-04 21:50:03 +053036 <div class="form-group row mb-3">
Barath Kumar R403234e2020-07-07 15:48:58 +053037 <label class="col-sm-4 col-form-label" for="type">{{'TYPE' | translate}}*</label>
38 <div class="col-sm-8">
39 <ng-select bindLabel="title" bindValue="value" [items]="osmrepoType"
40 placeholder="{{'SELECT' | translate}} {{'TYPE' | translate}}" formControlName="type" id="type"
41 [ngClass]="{ 'is-invalid': submitted && f.type.errors }" required>
42 </ng-select>
43 </div>
44 </div>
SANDHYA.JSc84f1122024-06-04 21:50:03 +053045 <div class="form-group row mb-3">
Barath Kumar R403234e2020-07-07 15:48:58 +053046 <label class="col-sm-4 col-form-label" for="url">{{'URL' | translate}}*</label>
47 <div class="col-sm-8">
48 <input autocomplete="off" class="form-control" placeholder="{{'URL' | translate}}" type="url"
49 formControlName="url" id="url" [ngClass]="{ 'is-invalid': submitted && f.url.errors }" required>
50 <div *ngIf="osmrepoForm.invalid" class="invalid-feedback">
51 <div *ngIf="f.url.errors && f.url.value">{{'DOMVALIDATIONS.INVALIDURL' | translate}}</div>
52 </div>
53 </div>
54 </div>
SANDHYA.JSc84f1122024-06-04 21:50:03 +053055 <div class="form-group row mb-3">
Barath Kumar R403234e2020-07-07 15:48:58 +053056 <label class="col-sm-4 col-form-label" for="description">{{'DESCRIPTION' | translate}}*</label>
57 <div class="col-sm-8">
58 <textarea rows="5" cols="50" class="form-control" placeholder="{{'DESCRIPTION' | translate}}" type="text"
59 formControlName="description" id="description" [ngClass]="{ 'is-invalid': submitted && f.description.errors }"
60 maxlength="{{sharedService.MAX_LENGTH_DESCRIPTION}}" required></textarea>
61 </div>
62 </div>
63 </div>
64 <div class="modal-footer">
65 <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button>
66 <button type="submit"
67 class="btn btn-primary">{{(getCreateupdateType === 'Add' ? 'ADD' : 'UPDATE') | translate}}</button>
68 </div>
69</form>
70<app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>