77 lines
3.6 KiB
HTML
77 lines
3.6 KiB
HTML
<form class="form" [formGroup]="userForm" (ngSubmit)="onSubmit()">
|
|
<div class="row">
|
|
<div class="col-lg-10">
|
|
<nb-card>
|
|
<nb-card-header>Email SMTP Settings</nb-card-header>
|
|
<nb-card-body>
|
|
<input type="text" nbInput fullWidth formControlName="hostname" placeholder="Host">
|
|
<ng-container nbInputErrorMessage>
|
|
<div style="color:#7c0e0e" *ngIf="userForm.get('hostname').hasError('required') && userForm.get('hostname').touched">Name is required.</div>
|
|
|
|
|
|
</ng-container>
|
|
|
|
<input type="email" formControlName="email" nbInput fullWidth placeholder="E-mail">
|
|
<ng-container nbInputErrorMessage>
|
|
<div style="color:#7c0e0e" *ngIf="userForm.get('email').hasError('required') && userForm.get('email').touched">Email is required.</div>
|
|
|
|
<div style="color:#7c0e0e" *ngIf="!userForm.get('email')?.errors?.required && (userForm.get('email')?.errors?.pattern)">
|
|
Please enter a valid email address
|
|
</div>
|
|
</ng-container>
|
|
|
|
<input type="text" formControlName="password" nbInput fullWidth placeholder="Password">
|
|
<ng-container nbInputErrorMessage>
|
|
|
|
|
|
<!-- <div style="color:#7c0e0e" *ngIf="!userForm.get('password')?.errors?.required && !(userForm.get('password')?.errors?.pattern)">
|
|
Password length must be greater than or equal to 8, and the password must contain one or more uppercase, lowercase, numeric, and special characters.
|
|
</div> -->
|
|
<div style="color:#7c0e0e" *ngIf="userForm.get('password')?.invalid && (userForm.get('password')?.dirty || userForm.get('password')?.touched) && userForm.get('password')?.errors?.required">
|
|
Password is required
|
|
</div>
|
|
</ng-container>
|
|
|
|
|
|
|
|
|
|
<input type="number" formControlName="port" nbInput fullWidth placeholder="Port">
|
|
<ng-container nbInputErrorMessage>
|
|
<div style="color:#7c0e0e" *ngIf="userForm.get('port').hasError('required') && userForm.get('port').touched">Mobile No is required.</div>
|
|
|
|
|
|
</ng-container>
|
|
|
|
|
|
<nb-select selected="" formControlName="secure" style="width: 100% !important;margin-bottom: 1rem;" aria-placeholder="secure">
|
|
<nb-option value="true">true</nb-option>
|
|
<nb-option value="false">false</nb-option>
|
|
<nb-option hidden value="">Secure</nb-option>
|
|
</nb-select>
|
|
<nb-card-footer>
|
|
<div class="row show-grid" >
|
|
<div class="col-6 col-md-4">
|
|
<div>
|
|
<button type="button" class="cancel" nbButton status="danger" (click)="close()">Cancel</button>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-4">
|
|
<div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-4" style="text-align: end;">
|
|
<div>
|
|
<button nbButton status="success" [disabled]="!userForm.valid" type="submit" >Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</nb-card-footer>
|
|
</nb-card-body>
|
|
</nb-card>
|
|
</div>
|
|
</div>
|
|
|
|
</form> |