|
12 | 12 | </ng-template>
|
13 | 13 |
|
14 | 14 | <form [formGroup]="questionFormGroup">
|
15 |
| - <div class="field grid col-12"> |
| 15 | + <div class="form-field mb-4"> |
16 | 16 | <label for="title">Title</label>
|
17 | 17 | <input
|
18 | 18 | formControlName="title"
|
|
25 | 25 | <small class="text-red-300">Title is required.</small>
|
26 | 26 | }
|
27 | 27 | </div>
|
28 |
| - <div class="formgrid grid field"> |
29 |
| - <div class="field col-12 md:col-6"> |
30 |
| - <label for="questionTopics">Topics</label> |
31 |
| - <p-multiSelect |
32 |
| - required="true" |
33 |
| - [style]="{ width: '100%' }" |
34 |
| - [options]="topics" |
35 |
| - (onFilter)="onFilterTopics($event)" |
36 |
| - formControlName="topics" |
37 |
| - optionLabel="label" |
38 |
| - optionValue="value" |
39 |
| - placeholder="Select Topics"> |
40 |
| - <ng-template let-option pTemplate="item"> |
41 |
| - <span>{{ option.label }}</span> |
42 |
| - </ng-template> |
| 28 | + <div class="form-field mb-4"> |
| 29 | + <label for="questionTopics">Topics</label> |
43 | 30 |
|
44 |
| - <ng-template pTemplate="footer"> |
45 |
| - <p-button |
46 |
| - *ngIf="isNoResultsFound" |
47 |
| - type="button" |
48 |
| - label="Add as New Topic" |
49 |
| - icon="pi pi-plus" |
50 |
| - (click)="addNewTopic()" /> |
51 |
| - </ng-template> |
52 |
| - </p-multiSelect> |
53 |
| - @if (isTopicsInvalid) { |
54 |
| - <small class="text-red-300">Topic(s) is required.</small> |
55 |
| - } |
56 |
| - </div> |
57 |
| - <div class="field col-12 md:col-6"> |
58 |
| - <label for="questionTopics">Difficulty</label> |
59 |
| - <p-dropdown |
60 |
| - [required]="true" |
61 |
| - [style]="{ width: '100%' }" |
62 |
| - [options]="difficulties" |
63 |
| - formControlName="difficulty" |
64 |
| - optionLabel="label" |
65 |
| - optionValue="value" |
66 |
| - placeholder="Select Difficulty" /> |
67 |
| - @if (isDifficultyInvalid) { |
68 |
| - <small class="text-red-300">Difficulty is required.</small> |
69 |
| - } |
70 |
| - </div> |
| 31 | + <p-multiSelect |
| 32 | + required="true" |
| 33 | + class="w-12" |
| 34 | + [style]="{ width: '100%' }" |
| 35 | + [options]="topics" |
| 36 | + (onFilter)="onFilterTopics($event)" |
| 37 | + formControlName="topics" |
| 38 | + optionLabel="label" |
| 39 | + optionValue="value" |
| 40 | + placeholder="Select Topics"> |
| 41 | + <ng-template let-option pTemplate="item"> |
| 42 | + <span>{{ option.label }}</span> |
| 43 | + </ng-template> |
| 44 | + |
| 45 | + <ng-template pTemplate="footer"> |
| 46 | + <p-button |
| 47 | + *ngIf="isNoResultsFound" |
| 48 | + type="button" |
| 49 | + label="Add as New Topic" |
| 50 | + icon="pi pi-plus" |
| 51 | + (click)="addNewTopic()" /> |
| 52 | + </ng-template> |
| 53 | + </p-multiSelect> |
| 54 | + @if (isTopicsInvalid) { |
| 55 | + <small class="text-red-300">Topic(s) is required.</small> |
| 56 | + } |
| 57 | + </div> |
| 58 | + <div class="form-field mb-4"> |
| 59 | + <label for="questionTopics">Difficulty</label> |
| 60 | + |
| 61 | + <p-dropdown |
| 62 | + class="w-12 flex align-items-center justify-content-center" |
| 63 | + autoWidth="false" |
| 64 | + [required]="true" |
| 65 | + [style]="{ width: '100%' }" |
| 66 | + [options]="difficulties" |
| 67 | + formControlName="difficulty" |
| 68 | + optionLabel="label" |
| 69 | + optionValue="value" |
| 70 | + placeholder="Select Difficulty" /> |
| 71 | + @if (isDifficultyInvalid) { |
| 72 | + <small class="text-red-300">Difficulty is required.</small> |
| 73 | + } |
71 | 74 | </div>
|
72 |
| - <div class="field grid col-12" field> |
| 75 | + <div class="form-field"> |
73 | 76 | <label for="questionDescription">Description</label>
|
74 | 77 | <textarea
|
75 | 78 | formControlName="description"
|
|
0 commit comments