CST-12179 Removed comments

This commit is contained in:
Mattia Vianelli
2023-11-10 19:41:11 +01:00
parent 221a43d211
commit 3aaeaa6397
3 changed files with 457 additions and 551 deletions

View File

@@ -14,83 +14,43 @@
</div> </div>
</div> </div>
<div class="mb-2"> <div class="mb-5">
<label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label> <label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label>
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched" <input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" formControlName="name" id="name" [placeholder]="'ldn-new-service.form.placeholder.name' | translate" formControlName="name" id="name"
name="name" name="name"
type="text"> type="text">
<div *ngIf="formModel.get('name').invalid && formModel.get('name').touched" class="error-text">
{{ 'ldn-new-service.form.error.name' | translate }}
</div>
</div>
<div class="mb-4">
&nbsp;
</div> </div>
<!-- In the description section --> <!-- In the description section -->
<div class="mb-2 d-flex flex-column"> <div class="mb-5 mt-5 d-flex flex-column">
<label for="description">{{ 'ldn-new-service.form.label.description' | translate }}</label> <label for="description">{{ 'ldn-new-service.form.label.description' | translate }}</label>
<textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate" <textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate"
formControlName="description" id="description" name="description"></textarea> formControlName="description" id="description" name="description"></textarea>
</div> </div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the url section --> <!-- In the url section -->
<div class="mb-2"> <div class="mb-5 mt-5">
<label for="url">{{ 'ldn-new-service.form.label.url' | translate }}</label> <label for="url">{{ 'ldn-new-service.form.label.url' | translate }}</label>
<input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched" <input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched"
[placeholder]="'ldn-new-service.form.placeholder.url' | translate" formControlName="url" id="url" [placeholder]="'ldn-new-service.form.placeholder.url' | translate" formControlName="url" id="url"
name="url" name="url"
type="text"> 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>
<div class="mb-4">
&nbsp;
</div>
<!-- In the ldnUrl section --> <!-- In the ldnUrl section -->
<div class="mb-2"> <div class="mb-5 mt-5">
<label for="ldnUrl">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label> <label for="ldnUrl">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label>
<input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched" <input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched"
[placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" formControlName="ldnUrl" [placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" formControlName="ldnUrl"
id="ldnUrl" id="ldnUrl"
name="ldnUrl" name="ldnUrl"
type="text"> type="text">
<div *ngIf="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched" class="error-text">
{{ 'ldn-new-service.form.error.ldnurl' | translate }}
</div>
</div> </div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the score section --> <div class="row mb-1 mt-5">
<div class="mb-2">
<label for="score">{{ '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"
type="text">
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
{{ 'ldn-new-service.form.error.score' | translate }}
</div>
</div>
<div class="mb-4">
&nbsp;
</div>
<div class="row">
<div class="col"> <div class="col">
<label>{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label> <label>{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
</div> </div>
@@ -100,12 +60,13 @@
<div class="col-sm1 "> <div class="col-sm1 ">
<label class="label-box-2">{{ 'ldn-new-service.form.label.automatic' | translate }}</label> <label class="label-box-2">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
</div> </div>
<div class="col-sm-1"> <div class="col-sm-2">
</div> </div>
</div> </div>
<div *ngFor="let patternGroup of formModel.get('notifyServiceInboundPatterns')['controls']; let i = index" <div *ngFor="let patternGroup of formModel.get('notifyServiceInboundPatterns')['controls']; let i = index"
formGroupName="notifyServiceInboundPatterns" [class.marked-for-deletion]="markedForDeletionInboundPattern.includes(i)"> [class.marked-for-deletion]="markedForDeletionInboundPattern.includes(i)"
formGroupName="notifyServiceInboundPatterns">
<ng-container [formGroupName]="i"> <ng-container [formGroupName]="i">
@@ -116,7 +77,7 @@
name="additionalInboundPattern{{i}}" required> name="additionalInboundPattern{{i}}" required>
<option value="">{{ 'ldn-new-service.form.label.placeholder.inboundPattern' | translate }}</option> <option value="">{{ 'ldn-new-service.form.label.placeholder.inboundPattern' | translate }}</option>
<option *ngFor="let pattern of inboundPatterns" <option *ngFor="let pattern of inboundPatterns"
[ngValue]="pattern.name">{{ pattern.name }}</option> [value]="pattern">{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }} </option>
</select> </select>
</div> </div>
@@ -142,19 +103,19 @@
<div class="col-sm-2"> <div class="col-sm-2">
<button (click)="markForInboundPatternDeletion(i)" class="btn btn-outline-dark" <div class="btn-group">
<button (click)="markForInboundPatternDeletion(i)" class="btn btn-outline-dark trash-button"
type="button"> type="button">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
</button> </button>
<button (click)="unmarkForInboundPatternDeletion(i)" *ngIf="markedForDeletionInboundPattern.includes(i)"
class="btn btn-warning"
<button (click)="unmarkForInboundPatternDeletion(i)" *ngIf="markedForDeletionInboundPattern.includes(i)" class="btn btn-warning ml-2"
type="button"> type="button">
<i class="fas fa-undo"></i> <i class="fas fa-undo"></i>
</button> </button>
</div> </div>
</div> </div>
</div>
</ng-container> </ng-container>
</div> </div>
@@ -162,26 +123,26 @@
<span (click)="addInboundPattern()" <span (click)="addInboundPattern()"
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span> class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span>
<div class="mb-4">
&nbsp;
</div>
<div class="row"> <div class="row mb-1 mt-5">
<div class="col"> <div class="col">
<label>{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label> <label>{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
</div> </div>
<div class="col"> <div class="col">
<label class="label-box-3">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label> <label class="label-box">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
</div> </div>
<div class="col-sm-1 "> <div class="col-sm1 ">
<label class="label-box-2"></label> <label class="label-box-2" style="visibility: hidden;">
{{ 'ldn-new-service.form.label.automatic' | translate }}
</label>
</div> </div>
<div class="col-sm-1 "> <div class="col-sm-2">
</div> </div>
</div> </div>
<div *ngFor="let patternGroup of formModel.get('notifyServiceOutboundPatterns')['controls']; let i = index" <div *ngFor="let patternGroup of formModel.get('notifyServiceOutboundPatterns')['controls']; let i = index"
formGroupName="notifyServiceOutboundPatterns" [class.marked-for-deletion]="markedForDeletionOutboundPattern.includes(i)"> [class.marked-for-deletion]="markedForDeletionOutboundPattern.includes(i)"
formGroupName="notifyServiceOutboundPatterns">
<ng-container [formGroupName]="i"> <ng-container [formGroupName]="i">
@@ -193,7 +154,7 @@
required> required>
<option value="">{{ 'ldn-new-service.form.label.placeholder.outboundPattern' | translate }}</option> <option value="">{{ 'ldn-new-service.form.label.placeholder.outboundPattern' | translate }}</option>
<option *ngFor="let pattern of outboundPatterns" <option *ngFor="let pattern of outboundPatterns"
[ngValue]="pattern.name">{{ pattern.name }}</option> [value]="pattern">{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }} </option>
</select> </select>
</div> </div>
<div class="col"> <div class="col">
@@ -215,15 +176,19 @@
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<button (click)="markForOutboundPatternDeletion(i)" class="btn btn-outline-dark trash-button" type="button"> <div class="btn-group">
<button (click)="markForOutboundPatternDeletion(i)" class="btn btn-outline-dark trash-button"
type="button">
<i class="fas fa-trash"></i> <i class="fas fa-trash"></i>
</button> </button>
<button (click)="unmarkForOutboundPatternDeletion(i)" *ngIf="markedForDeletionOutboundPattern.includes(i)" class="btn btn-warning ml-2" <button (click)="unmarkForOutboundPatternDeletion(i)" *ngIf="markedForDeletionOutboundPattern.includes(i)"
class="btn btn-warning"
type="button"> type="button">
<i class="fas fa-undo"></i> <i class="fas fa-undo"></i>
</button> </button>
</div> </div>
</div> </div>
</div>
</ng-container> </ng-container>
</div> </div>
@@ -231,10 +196,6 @@
(click)="addOutboundPattern()" (click)="addOutboundPattern()"
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }} class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}
</span> </span>
<div class="mb-5">
&nbsp;
</div>
<div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group"> <div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
<span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span> <span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span>

View File

@@ -4,84 +4,46 @@
<h2 class="flex-grow-1">{{ 'ldn-create-service.title' | translate }}</h2> <h2 class="flex-grow-1">{{ 'ldn-create-service.title' | translate }}</h2>
</div> </div>
<!-- In the name section --> <!-- In the name section -->
<div class="mb-2"> <div class="mb-5">
<label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label> <label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label>
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched" <input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" formControlName="name" id="name" [placeholder]="'ldn-new-service.form.placeholder.name' | translate" formControlName="name" id="name"
name="name" name="name"
type="text"> type="text">
<div *ngIf="formModel.get('name').invalid && formModel.get('name').touched" class="error-text">
{{ 'ldn-new-service.form.error.name' | translate }}
</div>
</div> </div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the description section --> <!-- In the description section -->
<div class="mb-2 d-flex flex-column"> <div class="mb-5 mt-5 d-flex flex-column">
<label for="description">{{ 'ldn-new-service.form.label.description' | translate }}</label> <label for="description">{{ 'ldn-new-service.form.label.description' | translate }}</label>
<textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate" <textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate"
formControlName="description" id="description" name="description"></textarea> formControlName="description" id="description" name="description"></textarea>
</div> </div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the url section --> <!-- In the url section -->
<div class="mb-2"> <div class="mb-5 mt-5">
<label for="url">{{ 'ldn-new-service.form.label.url' | translate }}</label> <label for="url">{{ 'ldn-new-service.form.label.url' | translate }}</label>
<input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched" <input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched"
[placeholder]="'ldn-new-service.form.placeholder.url' | translate" formControlName="url" id="url" [placeholder]="'ldn-new-service.form.placeholder.url' | translate" formControlName="url" id="url"
name="url" name="url"
type="text"> 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>
<div class="mb-4">
&nbsp;
</div>
<!-- In the ldnUrl section --> <!-- In the ldnUrl section -->
<div class="mb-2"> <div class="mb-5 mt-5">
<label for="ldnUrl">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label> <label for="ldnUrl">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label>
<input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched" <input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched"
[placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" formControlName="ldnUrl" [placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" formControlName="ldnUrl"
id="ldnUrl" id="ldnUrl"
name="ldnUrl" name="ldnUrl"
type="text"> type="text">
<div *ngIf="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched" class="error-text">
{{ 'ldn-new-service.form.error.ldnurl' | translate }}
</div>
</div> </div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the score section -->
<div class="mb-2">
<label for="score">{{ '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"
type="text">
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
{{ 'ldn-new-service.form.error.score' | translate }}
</div>
</div>
<div class="mb-4">
&nbsp;
</div>
<!-- In the Inbound Patterns section --> <!-- In the Inbound Patterns section -->
<div class="row"> <div class="row mb-2 mt-5">
<div class="col"> <div class="col">
<label>{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label> <label>{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
</div> </div>
@@ -91,7 +53,7 @@
<div class="col-sm1 "> <div class="col-sm1 ">
<label class="label-box-2">{{ 'ldn-new-service.form.label.automatic' | translate }}</label> <label class="label-box-2">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
</div> </div>
<div class="col-sm-1"> <div class="col-sm-2">
</div> </div>
</div> </div>
@@ -103,15 +65,12 @@
<div class="row mb-1"> <div class="row mb-1">
<div class="col"> <div class="col">
<select [class.invalid-field]="!patternSelected()" #inboundPattern formControlName="pattern" id="additionalInboundPattern{{i}}" <select #inboundPattern formControlName="pattern" id="additionalInboundPattern{{i}}"
name="additionalInboundPattern{{i}}" required> name="additionalInboundPattern{{i}}" required>
<option value="">{{ 'ldn-new-service.form.label.placeholder.inboundPattern' | translate }}</option> <option value="">{{ 'ldn-new-service.form.label.placeholder.inboundPattern' | translate }}</option>
<option *ngFor="let pattern of inboundPatterns" <option *ngFor="let pattern of inboundPatterns"
[ngValue]="pattern.name">{{ pattern.name }}</option> [value]="pattern">{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }} </option>
</select> </select>
<div *ngIf="!patternSelected()" class="error-text">
{{ 'ldn-new-service.form.error.patterns' | translate }}
</div>
</div> </div>
@@ -145,24 +104,22 @@
</div> </div>
<span (click)="addInboundPattern()" <span (click)="addInboundPattern()"
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span> class="add-pattern-link mb-4">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span>
<div class="mb-4">
&nbsp;
</div>
<!-- In the Outbound Patterns section --> <!-- In the Outbound Patterns section -->
<div class="row"> <div class="row mb-1 mt-5">
<div class="col"> <div class="col">
<label>{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label> <label>{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
</div> </div>
<div class="col"> <div class="col">
<label class="label-box">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label> <label class="label-box">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
</div> </div>
<div class="col-sm-1 "> <div class="col-sm1 ">
<label class="label-box-2" style="visibility: hidden;">
{{ 'ldn-new-service.form.label.automatic' | translate }}
</label>
</div> </div>
<div class="col-sm-1 "> <div class="col-sm-2">
</div> </div>
</div> </div>
@@ -174,16 +131,13 @@
<!-- Input elements in a separate row --> <!-- Input elements in a separate row -->
<div class="row mb-1"> <div class="row mb-1">
<div class="col"> <div class="col">
<select [class.invalid-field]="!patternSelected()" #outboundPattern formControlName="pattern" id="additionalOutboundPattern{{i}}" <select #outboundPattern formControlName="pattern" id="additionalOutboundPattern{{i}}"
name="additionalOutboundPattern{{i}}" name="additionalOutboundPattern{{i}}"
required> required>
<option value="">{{ 'ldn-new-service.form.label.placeholder.outboundPattern' | translate }}</option> <option value="">{{ 'ldn-new-service.form.label.placeholder.outboundPattern' | translate }}</option>
<option *ngFor="let pattern of outboundPatterns" <option *ngFor="let pattern of outboundPatterns"
[ngValue]="pattern.name">{{ pattern.name }}</option> [value]="pattern">{{ 'ldn-service.form.pattern.' + pattern + '.label' | translate }}</option>
</select> </select>
<div *ngIf="!patternSelected()" class="error-text">
{{ 'ldn-new-service.form.error.patterns' | translate }}
</div>
</div> </div>
<div class="col"> <div class="col">
<ng-container *ngIf="outboundPattern.value"> <ng-container *ngIf="outboundPattern.value">
@@ -214,11 +168,8 @@
</div> </div>
<span (click)="addOutboundPattern()" <span (click)="addOutboundPattern()"
class="add-pattern-link">{{ 'ldn-new-service.form.label.addPattern' | translate }} class="add-pattern-link mb-4">{{ 'ldn-new-service.form.label.addPattern' | translate }}
</span> </span>
<div class="mb-4">
&nbsp;
</div>
<div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group"> <div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group">
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">
@@ -230,8 +181,6 @@
</button> </button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<ng-template #confirmModal> <ng-template #confirmModal>

View File

@@ -1,8 +1,6 @@
form { form {
max-width: 800px;
font-size: 14px; font-size: 14px;
position: relative; position: relative;
} }
input[type="text"], input[type="text"],
@@ -131,9 +129,7 @@ form button.btn.btn-primary[type="submit"] {
z-index: var(--ds-submission-footer-z-index); z-index: var(--ds-submission-footer-z-index);
} }
div + div {
margin-bottom: 40px;
}