Skip to content

Commit

Permalink
autocomplete="none" (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
litvinets authored Jan 13, 2022
1 parent ce3f99e commit cff32e0
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<form [formGroup]="CategoryFormGroup" class="wrapper" fxLayout='column' fxLayoutAlign='center space-between'>
<label class="step-label"> Напрямок за яким здійснюється навчання <span class="step-required">*</span></label>
<input matInput type="text" placeholder="Почніть вводити напрямок або виберіть зі списку" class="step-input"
formControlName="directionId" [matAutocomplete]="auto" disableOptionCentering
(click)="getFullDirectionList()">
<mat-autocomplete class="dropdown-panel direction" #auto="matAutocomplete" (optionSelected)="onSelectDirection($event.option.value)"
[displayWith]="optionDisplayDirection">
<mat-option *ngFor="let direction of filteredDirections" [value]="direction" class="dropdown-option">
{{ direction.title }}
</mat-option>
</mat-autocomplete>
<input matInput type="text" placeholder="Почніть вводити напрямок або виберіть зі списку" class="step-input"
formControlName="directionId" [matAutocomplete]="auto" disableOptionCentering (click)="getFullDirectionList()"
autocomplete="none">
<mat-autocomplete class="dropdown-panel direction" #auto="matAutocomplete"
(optionSelected)="onSelectDirection($event.option.value)" [displayWith]="optionDisplayDirection">
<mat-option *ngFor="let direction of filteredDirections" [value]="direction" class="dropdown-option">
{{ direction.title }}
</mat-option>
</mat-autocomplete>
<app-validation-hint-for-input type="requiredField"
[invalid]="directionIdControl.invalid && directionIdControl.touched">
</app-validation-hint-for-input>
Expand All @@ -17,9 +17,9 @@
<label class="step-label"> Відділ <span class="step-required">*</span></label>
<input matInput type="text" placeholder="Почніть вводити відділ або виберіть зі списку" class="step-input"
formControlName="departmentId" [matAutocomplete]="autoDepartment" disableOptionCentering
panelClass="dropdown-panel" (click)="getFullDepartmentList()">
<mat-autocomplete class="dropdown-panel direction" #autoDepartment="matAutocomplete" (optionSelected)="onSelectDepartment($event.option.value)"
[displayWith]="optionDisplayDepartment">
panelClass="dropdown-panel" (click)="getFullDepartmentList()" autocomplete="none">
<mat-autocomplete class="dropdown-panel direction" #autoDepartment="matAutocomplete"
(optionSelected)="onSelectDepartment($event.option.value)" [displayWith]="optionDisplayDepartment">
<mat-option *ngFor="let department of filteredDepartments" [value]="department" class="dropdown-option">
{{ department.title }}
</mat-option>
Expand All @@ -32,16 +32,15 @@
<ng-container *ngIf="(classes$ | async)?.length">
<label class="step-label"> Клас <span class="step-required">*</span></label>
<input matInput type="text" placeholder="Почніть вводити клас або виберіть зі списку" class="step-input"
formControlName="classId" [matAutocomplete]="autoClasses" disableOptionCentering
panelClass="dropdown-panel" (click)="getFullClassList()">
formControlName="classId" [matAutocomplete]="autoClasses" disableOptionCentering panelClass="dropdown-panel"
(click)="getFullClassList()" autocomplete="none">
<mat-autocomplete class="dropdown-panel direction" #autoClasses="matAutocomplete"
[displayWith]="optionDisplayClass">
<mat-option *ngFor="let classItem of filteredClasses" [value]="classItem" class="dropdown-option">
{{ classItem.title }}
</mat-option>
</mat-autocomplete>
<app-validation-hint-for-input type="requiredField"
[invalid]="classIdControl.invalid && classIdControl.touched">
<app-validation-hint-for-input type="requiredField" [invalid]="classIdControl.invalid && classIdControl.touched">
</app-validation-hint-for-input>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<form class="city-search">
<mat-form-field appearance="none">
<input #search ngClass="{{className}}" type="text" matInput [formControl]="cityFormControl" [matAutocomplete]="auto">
<input #search ngClass="{{className}}" type="text" matInput [formControl]="cityFormControl"
[matAutocomplete]="auto">
<mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" (onKeyPress)="onSelect($event)"
(optionSelected)="onSelect($event)" [displayWith]="displayCityName">
<mat-option [disabled]="!(isCity$ | async)" *ngFor="let city of cities$ | async" [value]="city">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
<p class="text">Від</p>
<div>
<input class="input step-input" type="text" [disabled]="!workingDays.length" matInput
[ngxMatTimepicker]="timepickerStart" format="24" required formControlName="startTime">
[ngxMatTimepicker]="timepickerStart" format="24" required formControlName="startTime" autocomplete="none">
<app-validation-hint-for-input type="requiredField"
[invalid]="workingHoursForm.get('startTime').invalid && workingHoursForm.get('startTime').touched">
</app-validation-hint-for-input>
</div>
<p class="text">До</p>
<div>
<input class="input step-input" type="text" [disabled]="!workingDays.length" matInput
[ngxMatTimepicker]="timepickerEnd" format="24" required formControlName="endTime" [min]="getMinTime()">
[ngxMatTimepicker]="timepickerEnd" format="24" required formControlName="endTime" [min]="getMinTime()"
autocomplete="none">
<app-validation-hint-for-input type="requiredField"
[invalid]="workingHoursForm.get('endTime').invalid && workingHoursForm.get('endTime').touched">
</app-validation-hint-for-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<label class="step-label">Прізвище<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="lastName">
<input matInput class="step-input" type="text" formControlName="lastName" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ChildFormGroup.get('lastName').errors?.required"
Expand All @@ -16,7 +16,7 @@

<label class="step-label">Ім'я<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="firstName">
<input matInput class="step-input" type="text" formControlName="firstName" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ChildFormGroup.get('firstName').errors?.required"
Expand All @@ -29,7 +29,7 @@

<label class="step-label">По-батькові<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="middleName">
<input matInput class="step-input" type="text" formControlName="middleName" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ChildFormGroup.get('middleName').errors?.required"
Expand Down Expand Up @@ -72,7 +72,7 @@

<label class="step-label">Місце навчання (заклад)</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="placeOfStudy">
<input matInput class="step-input" type="text" formControlName="placeOfStudy" autocomplete="none">
</mat-form-field>

<div fxLayout='row' fxLayoutAlign='center' *ngIf="childrenAmount > 1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h4 class="step-title">Юридична адреса</h4>

<label class="step-label">Область<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="district" maxlength="15">
<input matInput class="step-input" type="text" formControlName="district" maxlength="15" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="LegalAddressFormGroup.get('district').errors?.required"
Expand All @@ -16,7 +16,7 @@ <h4 class="step-title">Юридична адреса</h4>

<label class="step-label">Місто<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="city" maxlength="15">
<input matInput class="step-input" type="text" formControlName="city" maxlength="15" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="LegalAddressFormGroup.get('city').errors?.required"
Expand All @@ -29,7 +29,7 @@ <h4 class="step-title">Юридична адреса</h4>

<label class="step-label">Район<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="region">
<input matInput class="step-input" type="text" formControlName="region" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="LegalAddressFormGroup.get('region').errors?.required"
Expand All @@ -42,7 +42,7 @@ <h4 class="step-title">Юридична адреса</h4>

<label class="step-label">Вулиця<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="street">
<input matInput class="step-input" type="text" formControlName="street" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="LegalAddressFormGroup.get('street').errors?.required"
Expand All @@ -55,7 +55,7 @@ <h4 class="step-title">Юридична адреса</h4>

<label class="step-label">Будинок<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="buildingNumber">
<input matInput class="step-input" type="text" formControlName="buildingNumber" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="LegalAddressFormGroup.get('buildingNumber').errors?.required"
Expand All @@ -81,7 +81,7 @@ <h4>Фактична адреса</h4>

<label class="step-label">Область<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="district" maxlength="15">
<input matInput class="step-input" type="text" formControlName="district" maxlength="15" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ActualAddressFormGroup.get('district').errors?.required"
Expand All @@ -94,7 +94,7 @@ <h4>Фактична адреса</h4>

<label class="step-label">Місто<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="city" maxlength="15">
<input matInput class="step-input" type="text" formControlName="city" maxlength="15" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ActualAddressFormGroup.get('city').errors?.required"
Expand All @@ -107,7 +107,7 @@ <h4>Фактична адреса</h4>

<label class="step-label">Район<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="region">
<input matInput class="step-input" type="text" formControlName="region" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ActualAddressFormGroup.get('region').errors?.required"
Expand All @@ -120,7 +120,7 @@ <h4>Фактична адреса</h4>

<label class="step-label">Вулиця<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="street">
<input matInput class="step-input" type="text" formControlName="street" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ActualAddressFormGroup.get('street').errors?.required"
Expand All @@ -133,7 +133,7 @@ <h4>Фактична адреса</h4>

<label class="step-label">Будинок<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="buildingNumber">
<input matInput class="step-input" type="text" formControlName="buildingNumber" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="ActualAddressFormGroup.get('buildingNumber').errors?.required"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@

<label class="step-label"> Повна назва організації <span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="fullTitle">
<input matInput class="step-input" type="text" formControlName="fullTitle" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="InfoFormGroup.get('fullTitle').invalid && InfoFormGroup.get('fullTitle').touched">
</app-validation-hint-for-input>

<label class="step-label"> Скорочена назва організації <span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="shortTitle">
<input matInput class="step-input" type="text" formControlName="shortTitle" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="InfoFormGroup.get('shortTitle').invalid && InfoFormGroup.get('shortTitle').touched">
</app-validation-hint-for-input>

<label class="step-label"> ПІБ керівника <span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="director">
<input matInput class="step-input" type="text" formControlName="director" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="InfoFormGroup.get('director').errors?.required"
Expand All @@ -74,7 +74,8 @@
<label class="step-label"> {{this.InfoFormGroup.get('type').value === 0? "ІПН" : "ЄДПРОУ"}} <span
class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" maxlength="10" appDigitOnly formControlName="edrpouIpn">
<input matInput class="step-input" type="text" maxlength="10" appDigitOnly formControlName="edrpouIpn"
autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="InfoFormGroup.get('edrpouIpn').errors?.required"
Expand Down Expand Up @@ -119,22 +120,22 @@

<label class="step-label">Веб сайт</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="website">
<input matInput class="step-input" type="text" formControlName="website" autocomplete="none">
</mat-form-field>

<label class="step-label">Facebook</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="facebook">
<input matInput class="step-input" type="text" formControlName="facebook" autocomplete="none">
</mat-form-field>

<label class="step-label">Instagram</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="instagram">
<input matInput class="step-input" type="text" formControlName="instagram" autocomplete="none">
</mat-form-field>

<label class="step-label">Засновник<span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="founder">
<input matInput class="step-input" type="text" formControlName="founder" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredEmptyField"
[isEmptyCheck]="InfoFormGroup.get('founder').errors?.required"
Expand All @@ -144,4 +145,4 @@
[invalid]="InfoFormGroup.get('founder').invalid && InfoFormGroup.get('founder').touched"
[forbiddenCharacter]="InfoFormGroup.get('founder').errors?.pattern?.requiredPattern">
</app-validation-hint-for-input>
</form>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<label class="step-label"> Назва <span class="step-required">*</span></label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="title">
<input matInput class="step-input" type="text" formControlName="title" autocomplete="none">
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="AboutFormGroup.get('title').invalid && AboutFormGroup.get('title').touched">
Expand Down Expand Up @@ -43,15 +43,15 @@

<label class="step-label">Веб сайт</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="website">
<input matInput class="step-input" type="text" formControlName="website" autocomplete="none">
</mat-form-field>
<label class="step-label">Facebook</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="facebook">
<input matInput class="step-input" type="text" formControlName="facebook" autocomplete="none">
</mat-form-field>
<label class="step-label">Instagram</label>
<mat-form-field>
<input matInput class="step-input" type="text" formControlName="instagram">
<input matInput class="step-input" type="text" formControlName="instagram" autocomplete="none">
</mat-form-field>
<div class="border-bottom"></div>
<label class="step-label"> Вік-дітей <span class="step-required">*</span></label>
Expand All @@ -62,7 +62,8 @@
<mat-form-field>
<input matInput class="step-input step-input-age" type="number" formControlName="minAge" appDigitOnly
maxlength="2" appMinMax [directiveFormControl]="AboutFormGroup.get('minAge')" [min]="constants.AGE_MIN"
[max]="AboutFormGroup.get('maxAge').value ? AboutFormGroup.get('maxAge').value - 1 : constants.AGE_MAX">
[max]="AboutFormGroup.get('maxAge').value ? AboutFormGroup.get('maxAge').value - 1 : constants.AGE_MAX"
autocomplete="none">
</mat-form-field>
</div>
<app-validation-hint-for-input type="requiredField"
Expand All @@ -77,7 +78,7 @@
<input matInput class="step-input step-input-age" type="number" formControlName="maxAge" appDigitOnly
maxlength="2" [directiveFormControl]="AboutFormGroup.get('maxAge')" appMinMax
[min]="AboutFormGroup.get('minAge').value ? AboutFormGroup.get('minAge').value + 1 : constants.AGE_MIN"
[max]="constants.AGE_MAX">
[max]="constants.AGE_MAX" autocomplete="none">
</mat-form-field>

</div>
Expand Down
Loading

0 comments on commit cff32e0

Please sign in to comment.