improve ldn form template

This commit is contained in:
FrancescoMolinaro
2024-01-17 16:22:38 +01:00
parent a878696493
commit 8c100682cf

View File

@@ -34,20 +34,41 @@
class="form-control" formControlName="description" id="description" name="description"></textarea> class="form-control" formControlName="description" id="description" name="description"></textarea>
</div> </div>
<!-- In the url section -->
<div class="mb-5 mt-5"> <div class="mb-5 mt-5">
<label for="url" class="font-weight-bold">{{ 'ldn-new-service.form.label.url' | translate }}</label> <!-- In the url section -->
<input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched" <div class="d-flex">
[placeholder]="'ldn-new-service.form.placeholder.url' | translate" class="form-control" <div class="d-flex flex-column w-50 mr-2">
formControlName="url" <label for="url" class="font-weight-bold">{{ 'ldn-new-service.form.label.url' | translate }}</label>
id="url" <input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched"
name="url" [placeholder]="'ldn-new-service.form.placeholder.url' | translate" class="form-control"
type="text"> formControlName="url"
<div *ngIf="formModel.get('url').invalid && formModel.get('url').touched" class="error-text"> id="url"
{{ 'ldn-new-service.form.error.url' | translate }} name="url"
type="text">
<div *ngIf="formModel.get('url').invalid && formModel.get('url').touched" class="error-text">
{{ 'ldn-new-service.form.error.url' | translate }}
</div>
</div>
<div class="d-flex flex-column w-50">
<label for="score" class="font-weight-bold">{{ 'ldn-new-service.form.label.score' | translate }}</label>
<input [class.invalid-field]="formModel.get('score').invalid && formModel.get('score').touched"
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
id="score"
name="score"
min="0"
max="1"
step=".01"
class="form-control"
type="number">
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
{{ 'ldn-new-service.form.error.score' | translate }}
</div>
</div>
</div> </div>
</div> </div>
<!-- In the ldnUrl section --> <!-- In the ldnUrl section -->
<div class="mb-5 mt-5"> <div class="mb-5 mt-5">
<label for="ldnUrl" class="font-weight-bold">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label> <label for="ldnUrl" class="font-weight-bold">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label>
@@ -62,22 +83,6 @@
</div> </div>
</div> </div>
<!-- In the score section -->
<div class="mb-2">
<label for="score" class="font-weight-bold">{{ 'ldn-new-service.form.label.score' | translate }}</label>
<input [class.invalid-field]="formModel.get('score').invalid && formModel.get('score').touched"
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
id="score"
name="score"
min="0"
max="1"
step=".01"
class="form-control"
type="number">
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
{{ 'ldn-new-service.form.error.score' | translate }}
</div>
</div>
<!-- In the Inbound Patterns Labels section --> <!-- In the Inbound Patterns Labels section -->
<div class="row mb-1 mt-5" *ngIf="areControlsInitialized"> <div class="row mb-1 mt-5" *ngIf="areControlsInitialized">
@@ -134,8 +139,6 @@
ngbDropdownItem ngbDropdownItem
type="button"> type="button">
<div>{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }}</div> <div>{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }}</div>
<div
class="small-text">{{ 'ldn-service.form.pattern.' + pattern + '.description' | translate }}</div>
</button> </button>
</div> </div>
</div> </div>