-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated form spacing and mobile (#285)
* updated form spacing and mobile * fixed spacing
- Loading branch information
Showing
9 changed files
with
158 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@import "node_modules/bootstrap/scss/functions"; | ||
@import "node_modules/bootstrap/scss/variables"; | ||
@import "node_modules/bootstrap/scss/mixins/_breakpoints"; | ||
|
||
@include media-breakpoint-up(xl) { | ||
|
||
} | ||
@include media-breakpoint-up(lg) { | ||
|
||
} | ||
@include media-breakpoint-up(md) { | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
<form [formGroup]="optionFormGroup"> | ||
<div class="mb-2"> | ||
<div class="col-md-8 d-flex flex-row"> | ||
<input type="text" class="form-control" placeholder="" formControlName="text"> | ||
|
||
<div class="col-md-8 option-container"> | ||
<input type="text" class="form-control" placeholder="" formControlName="text"> | ||
<div class="icon-holder"> | ||
<app-icon-toggle-input enabledIcon="/assets/forms/icon-text-enabled.png" | ||
enabledIconTooltip="{{'MARK_AS_FREE_TEXT' | translate}}" | ||
disabledIcon="/assets/forms/icon-text-disabled.png" | ||
disabledIconTooltip="{{'MARK_AS_REGULAR' | translate}}" | ||
formControlName="isFreeText"> | ||
</app-icon-toggle-input> | ||
</div> | ||
|
||
<div class="icon-holder"> | ||
<app-icon-toggle-input enabledIcon="/assets/forms/icon-text-enabled.png" | ||
enabledIconTooltip="{{'MARK_AS_FREE_TEXT' | translate}}" | ||
disabledIcon="/assets/forms/icon-text-disabled.png" | ||
disabledIconTooltip="{{'MARK_AS_REGULAR' | translate}}" | ||
formControlName="isFreeText"> | ||
</app-icon-toggle-input> | ||
</div> | ||
<div class="icon-holder"> | ||
<app-icon-toggle-input enabledIcon="/assets/forms/icon-flag-enabled.png" | ||
enabledIconTooltip="{{'FLAG_OPTION' | translate}}" | ||
disabledIcon="/assets/forms/icon-flag-disabled.png" | ||
disabledIconTooltip="{{'UNFLAG_OPTION' | translate}}" | ||
formControlName="flagged"> | ||
</app-icon-toggle-input> | ||
</div> | ||
|
||
<div class="icon-holder"> | ||
<app-icon-toggle-input enabledIcon="/assets/forms/icon-flag-enabled.png" | ||
enabledIconTooltip="{{'FLAG_OPTION' | translate}}" | ||
disabledIcon="/assets/forms/icon-flag-disabled.png" | ||
disabledIconTooltip="{{'UNFLAG_OPTION' | translate}}" | ||
formControlName="flagged"> | ||
</app-icon-toggle-input> | ||
</div> | ||
|
||
<div class="icon-holder" (click)="optionDeleteEventEmitter.emit()"> | ||
<img src="/assets/forms/icon-delete.png" alt=""> | ||
</div> | ||
<div class="icon-holder" (click)="optionDeleteEventEmitter.emit()"> | ||
<img src="/assets/forms/icon-delete.png" alt=""> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
.option-container { | ||
.icon-holder { | ||
display: flex; | ||
flex-direction: row; | ||
margin: 4px auto; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
|
||
.icon-holder { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
cursor: pointer; | ||
|
||
cursor: pointer; | ||
|
||
margin: auto 4px; | ||
} | ||
margin: auto 4px; | ||
} | ||
|
75 changes: 33 additions & 42 deletions
75
src/app/components/forms/question/question.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
|
||
<div class="col-md-12 question-component"> | ||
<div class="field icon-holder" (click)="toggleOptions()"> | ||
<span *ngIf="hideOptions"> | ||
▶ | ||
</span> | ||
<span *ngIf="!hideOptions"> | ||
▼ | ||
</span> | ||
<div class="card mb-4"> | ||
<div class="card-header d-flex flex-row justify-content-between"> | ||
<div><span [ngClass]="{'rotate':hideOptions}" (click)="toggleOptions()"><img src="/assets/forms/down.png" alt=""></span> {{ questionFormGroup.controls['code']?.value || 'QUESTION_CODE' | translate }} - {{ questionFormGroup.controls['text']?.value || 'QUESTION_TEXT' | translate }}</div> | ||
<div class="field icon-holder" (click)="questionDeleteEventEmitter.emit()"> | ||
<img src="/assets/forms/icon-delete.png" alt=""> | ||
</div> | ||
</div> | ||
<div class="card-body" [hidden]="hideOptions"> | ||
|
||
<div class="expandable-container"> | ||
<form [formGroup]="questionFormGroup"> | ||
<div class="main-fields-container"> | ||
<div class="field col-md-2"> | ||
<input class="form-control" formControlName="code" placeholder="{{'QUESTION_CODE' | translate}}"> | ||
</div> | ||
<div class="field col-md-6"> | ||
<input class="form-control" formControlName="text" placeholder="{{'QUESTION_TEXT' | translate}}"> | ||
</div> | ||
<div class="field col-md-2"> | ||
<select class="form-control" formControlName="questionType"> | ||
<option *ngFor="let questionType of questionTypes" [ngValue]="questionType.id">{{questionType.name | translate}}</option> | ||
</select> | ||
</div> | ||
<div class="field icon-holder" (click)="questionDeleteEventEmitter.emit()"> | ||
<img src="/assets/forms/icon-delete.png" alt=""> | ||
<form [formGroup]="questionFormGroup"> | ||
<div class="row"> | ||
<div class="field col-lg-3 col-md-6"> | ||
<input class="form-control" formControlName="code" placeholder="{{'QUESTION_CODE' | translate}}"> | ||
</div> | ||
<div class="field col-lg-6 col-md-12 order-2 mt-md-4 mt-lg-0"> | ||
<input class="form-control" formControlName="text" placeholder="{{'QUESTION_TEXT' | translate}}"> | ||
</div> | ||
<div class="field col-lg-3 col-md-6 order-1"> | ||
<select class="form-control" formControlName="questionType"> | ||
<option *ngFor="let questionType of questionTypes" [ngValue]="questionType.id">{{questionType.name | translate}}</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
|
||
<div [hidden]="hideOptions" class="options-panel"> | ||
|
||
<div cdkDropList | ||
class="options-list" | ||
(cdkDropListDropped)="onReorder($event)"> | ||
<div *ngFor="let option of optionFormGroupsArray; let i = index" cdkDrag class="option-line"> | ||
<app-option [optionFormGroup]="option" | ||
(optionDeleteEventEmitter)="onOptionDelete(i)" | ||
class="option"> | ||
</app-option> | ||
</form> | ||
<hr /> | ||
<div cdkDropList class="options-list" (cdkDropListDropped)="onReorder($event)"> | ||
<div *ngFor="let option of optionFormGroupsArray; let i = index" cdkDrag class="option-line"> | ||
<app-option [optionFormGroup]="option" | ||
(optionDeleteEventEmitter)="onOptionDelete(i)" | ||
class="option"> | ||
</app-option> | ||
|
||
<div class="icon-holder icon-reorder" cdkDragHandle> | ||
<img src="/assets/forms/icon-reorder.png" alt=""> | ||
<div class="icon-holder icon-reorder" cdkDragHandle> | ||
<img src="/assets/forms/icon-reorder.png" alt=""> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-12 add-option-button" (click)="addOption()">+ {{'OPTION_ADD' | translate}}</div> | ||
</div> | ||
<div class="col add-option-button" (click)="addOption()">+ {{'OPTION_ADD' | translate}}</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
274d361
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: