1 <cd-modal [modalRef]="activeModal">
2 <span class="modal-title"
3 i18n>{editMode, select, true {Edit} other {Add}} Matcher</span>
5 <ng-container class="modal-content">
10 <div class="modal-body">
12 <div class="form-group row">
13 <label class="cd-col-form-label required"
16 <div class="cd-col-form-input">
17 <select class="form-control"
19 formControlName="name"
21 <option [ngValue]="null"
22 i18n>-- Select an attribute to match against --</option>
23 <option *ngFor="let attribute of nameAttributes"
28 <span class="help-block"
29 *ngIf="form.showError('name', formDir, 'required')"
30 i18n>This field is required!</span>
35 <div class="form-group row">
36 <label class="cd-col-form-label required"
39 <div class="cd-col-form-input">
41 (focus)="valueFocus.next($any($event).target.value)"
42 (click)="valueClick.next($any($event).target.value)"
46 [ngbTypeahead]="search"
47 formControlName="value">
48 <span *ngIf="form.showError('value', formDir, 'required')"
50 i18n>This field is required!</span>
52 <div *ngIf="form.getValue('value') && !form.getValue('isRegex') && matcherMatch"
53 class="cd-col-form-offset {{matcherMatch.cssClass}}"
55 <span class="text-muted {{matcherMatch.cssClass}}">
56 {{matcherMatch.status}}
62 <div class="form-group row">
63 <div class="cd-col-form-offset">
64 <div class="custom-control custom-checkbox">
65 <input type="checkbox"
66 class="custom-control-input"
67 formControlName="isRegex"
71 class="custom-control-label"
72 i18n>Use regular expression</label>
78 <div class="modal-footer">
79 <cd-submit-button (submitAction)="onSubmit()"
81 <span i18n>{editMode, select, true {Edit} other {Add}}</span>
83 <cd-back-button (backAction)="activeModal.close()"