Skip to content

Commit

Permalink
Create workshop#673 (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
romandivonchuk authored Dec 3, 2021
1 parent 174c757 commit f962940
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 16 deletions.
20 changes: 20 additions & 0 deletions src/app/shared/styles/create-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,23 @@ button:focus {
border-bottom: 2px solid #E3E3E3;
margin: 1rem 0;
}

.wrapper-border {
border: 1px solid #E3E3E3;
border-radius: 25px;
padding: 20px;

textarea::-webkit-scrollbar {
width: 10px;
}

textarea::-webkit-resizer {
opacity: 0;
}

.step-textarea {
border: none;
border-radius: 0;
padding: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
{{status.name}}
</mat-option>
</mat-select>
</mat-form-field>
</mat-form-field>

<label class="step-label"> Опис <span class="step-required">*</span></label>
<mat-form-field appPlaceholderStyling floatLabel="never" appearance="none">
<textarea matInput class="step-textarea" placeholder="Максимум {{constants.MAX_DESCRIPTION_LENGTH}} символів"
formControlName="description" maxlength="{{constants.MAX_DESCRIPTION_LENGTH}}"></textarea>
<div class="wrapper-border">
<textarea matInput class="step-textarea" placeholder="Максимум {{constants.MAX_DESCRIPTION_LENGTH}} символів"
formControlName="description" maxlength="{{constants.MAX_DESCRIPTION_LENGTH}}"></textarea>
</div>
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="PhotoFormGroup.get('description').invalid && PhotoFormGroup.get('description').touched">
</app-validation-hint-for-input>
</form>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<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]="constants.AGE_MAX">
[max]="AboutFormGroup.get('maxAge').value ? AboutFormGroup.get('maxAge').value - 1 : constants.AGE_MAX">
</mat-form-field>
</div>
<app-validation-hint-for-input type="requiredField"
Expand All @@ -75,7 +75,7 @@
<p class="step-text">До</p>
<mat-form-field>
<input matInput class="step-input step-input-age" type="number" formControlName="maxAge" appDigitOnly
maxlength="2" [directiveFormControl]="AboutFormGroup.get('maxAge')" appMinMax [min]="constants.AGE_MIN"
maxlength="2" [directiveFormControl]="AboutFormGroup.get('maxAge')" appMinMax [min]="AboutFormGroup.get('minAge').value ? AboutFormGroup.get('minAge').value + 1 : constants.AGE_MIN"
[max]="constants.AGE_MAX">
</mat-form-field>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
border-radius: 21px;
line-height: initial;
box-sizing: border-box;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
{{DescriptionFormGroup.get('description').value.length}}/{{constants.MAX_DESCRIPTION_LENGTH}}</label>
</div>
<mat-form-field appearance="none">
<textarea matInput class="step-textarea step-input-field" placeholder="Максимум {{constants.MAX_DESCRIPTION_LENGTH}} символів"
<div class="wrapper-border">
<textarea matInput class="step-textarea step-input-field" placeholder="Максимум {{constants.MAX_DESCRIPTION_LENGTH}} символів"
formControlName="description" maxlength="{{constants.MAX_DESCRIPTION_LENGTH}}"></textarea>
</div>
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="DescriptionFormGroup.get('description').invalid && DescriptionFormGroup.get('description').touched">
Expand All @@ -33,7 +35,7 @@
fxLayoutAlign='center space-between'>
<mat-radio-button #radio1 name="radioBtn1" [value]="false">Відсутні</mat-radio-button>
<mat-radio-button #radio2 name="radioBtn2" [value]="true">Наявні</mat-radio-button>
<input matInput class="step-input" placeholder="Пандус/спец. обладнання" formControlName="disabilityOptionsDesc">
<input matInput class="step-input" [ngClass]="{'disabled-field' : !disabilityOptionRadioBtn.value}" placeholder="Пандус/спец. обладнання" formControlName="disabilityOptionsDesc">
</mat-radio-group>

<app-category-select [workshop]="workshop" [CategoryFormGroup]="DescriptionFormGroup.get('categories')">
Expand Down Expand Up @@ -61,5 +63,5 @@
<app-validation-hint-for-input type="requiredField"
[invalid]="DescriptionFormGroup.get('keyWords').invalid && DescriptionFormGroup.get('keyWords').touched">
</app-validation-hint-for-input>
</form>

</form>
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
.keywords-input {
position: absolute;
top: 5px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@
{{TeacherFormGroup.get('description').value.length}}/{{constants.MAX_TEACHER_DESCRIPTION_LENGTH }}</label>
</div>
<mat-form-field appearance="none">
<textarea matInput class="step-textarea step-input-field"
placeholder="Максимум {{constants.MAX_TEACHER_DESCRIPTION_LENGTH}} символів" formControlName="description"
maxlength="{{constants.MAX_TEACHER_DESCRIPTION_LENGTH}}"></textarea>
<div class="wrapper-border">
<textarea matInput class="step-textarea step-input-field"
placeholder="Максимум {{constants.MAX_TEACHER_DESCRIPTION_LENGTH}} символів" formControlName="description"
maxlength="{{constants.MAX_TEACHER_DESCRIPTION_LENGTH}}"></textarea>
</div>
</mat-form-field>
<app-validation-hint-for-input type="requiredField"
[invalid]="TeacherFormGroup.get('description').invalid && TeacherFormGroup.get('description').touched">
Expand All @@ -73,4 +75,4 @@
</button>
</div>

</form>
</form>

0 comments on commit f962940

Please sign in to comment.