Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<h1 mat-dialog-title [innerHTML]="uitextEditPabTitle"></h1>
<form>
<div mat-dialog-content>
<!-- récap selection -->
<!-- champ à modifier -->
<mat-form-field class="select-form-field">
<mat-select [placeholder]="uitextVariable" [(value)]="variable">
<mat-option *ngFor="let v of availableVariables" [value]="v.value">
{{ v.label }}
</mat-option>
</mat-select>
</mat-form-field>
<!-- ngDefaultControl : see https://github.com/angular/components/issues/8267 -->
<mat-radio-group ngDefaultControl [(ngModel)]="varAction" name="varAction">
<div class="radio-button-and-input-wrapper rbaiw-set-value">
<mat-radio-button value="set-value">
{{ uitextSetValue }}
</mat-radio-button>
<mat-form-field class="input-form-field">
<input matInput [(ngModel)]="valueToSet" name="valueToSet" #valueToSetRef="ngModel"
(keydown.enter)="onEnterPressed($event)" required pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$">
</mat-form-field>
<mat-error *ngIf="varAction === 'set-value' && valueToSetRef.invalid">
{{ uitextMustBeANumber }}
</mat-error>
</div>
<div class="radio-button-and-input-wrapper rbaiw-delta">
<mat-radio-button value="delta">
{{ uitextDelta }}
</mat-radio-button>
<mat-form-field class="input-form-field">
<input matInput [(ngModel)]="delta" name="delta" #deltaRef="ngModel"
(keydown.enter)="onEnterPressed($event)" required pattern="^-?([0-9]*\.)?([0-9]+[Ee]-?)?[0-9]+$">
</mat-form-field>
<mat-error *ngIf="varAction === 'delta' && deltaRef.invalid">
{{ uitextMustBeANumber }}
</mat-error>
</div>
<div class="radio-button-and-input-wrapper">
<mat-radio-button value="interpolate">
{{ uitextInterpolate }}
</mat-radio-button>
</div>
</mat-radio-group>
</div>
<div mat-dialog-actions [attr.align]="'end'">
<button mat-raised-button color="primary" [mat-dialog-close]="false" cdkFocusInitial>
{{ uitextCancel }}
</button>
<button mat-raised-button type="submit" color="warn" (click)="applyValues()"
[disabled]="buttonDisabled(valueToSetRef, deltaRef)">
{{ uitextSave }}
</button>
</div>
</form>