1
|
<div class="uk-margin-small-bottom">
|
2
|
<div class="uk-margin-small-top uk-margin-bottom uk-grid uk-flex uk-flex-bottom">
|
3
|
<h5 class="uk-margin-bottom-remove">{{_formatTitle(filter.title)}}</h5>
|
4
|
<a *ngIf="filter.selectedFromValue || filter.selectedToValue" (click)="clearFilter()" class="portal-link">
|
5
|
Clear
|
6
|
</a>
|
7
|
</div>
|
8
|
<div aria-expanded="false">
|
9
|
<div>
|
10
|
<div class = "uk-animation-fade filterItem searchFilterItem uk-text-small">
|
11
|
<div class="searchFilterBoxValues ">
|
12
|
<form class="uk-inline uk-text-small form-group" #rangeForm="ngForm" fromYearAfterToYear>
|
13
|
<input class=" uk-input form-control uk-width-1-3" (focus)="focusedInput = 'from'" (blur)="focusedInput = ''"
|
14
|
[(ngModel)]="filter.selectedFromValue" name="yearFrom" #yearFrom="ngModel" inValidYear
|
15
|
placeholder="From"/>
|
16
|
<input class=" uk-input form-control uk-width-1-3 uk-margin-left" (focus)="focusedInput = 'to'" (blur)="focusedInput = ''"
|
17
|
[(ngModel)]="filter.selectedToValue" name="yearTo" #yearTo="ngModel" inValidYear
|
18
|
placeholder="To"/>
|
19
|
<button type="submit" (click)="yearChanged()"
|
20
|
[ngStyle]="{'cursor': rangeForm.valid ? 'pointer' : 'not-allowed'}" class="uk-icon uk-width-1-6 uk-text-right"
|
21
|
[disabled]="rangeForm.invalid">
|
22
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
23
|
icon="chevron-right" ratio="1">
|
24
|
<polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline>
|
25
|
</svg>
|
26
|
</button>
|
27
|
|
28
|
<div *ngIf="(yearFrom.invalid && focusedInput != 'from' && (yearFrom.dirty || yearFrom.touched)) ||
|
29
|
(yearTo.invalid && focusedInput != 'to' && (yearTo.dirty || yearTo.touched))"
|
30
|
class="alert alert-danger uk-margin-small-top">
|
31
|
<div *ngIf="(yearFrom.errors && yearFrom.errors.inValidYear) || (yearTo.errors && yearTo.errors.inValidYear)">
|
32
|
Year must be between {{yearMin}} and {{yearMax}}.
|
33
|
</div>
|
34
|
</div>
|
35
|
<div *ngIf="yearFrom.valid && yearTo.valid && rangeForm.errors?.fromYearAfterToYear && (rangeForm.touched || rangeForm.dirty)"
|
36
|
class="alert alert-danger uk-margin-small-top">
|
37
|
"From" year must be equal or greater than "To" year.
|
38
|
</div>
|
39
|
</form>
|
40
|
</div>
|
41
|
</div>
|
42
|
</div>
|
43
|
</div>
|
44
|
</div>
|