-
-
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.
- Loading branch information
Showing
57 changed files
with
1,470 additions
and
94 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
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
2 changes: 1 addition & 1 deletion
2
frontend/src/app/components/answer/answer-form-list/answer-form-list.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
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
64 changes: 64 additions & 0 deletions
64
frontend/src/app/components/forms/form-create/form-create.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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<div class="container-fluid form-create"> | ||
<div class="back-button" (click)="onBackPressed()">← {{ 'BACK' | translate}}</div> | ||
|
||
<div class="header-row"> | ||
<span class="header-text col-md-2">{{'FORM_EDIT' | translate }}</span> | ||
<div class="buttons-pane"> | ||
<button class="btn-secondary btn" (click)="saveForm()">{{'FORM_SAVE_DRAFT' | translate}}</button> | ||
<button class="btn-primary btn" (click)="saveAndPublishForm()">{{'FORM_PUBLISH' | translate}}</button> | ||
</div> | ||
</div> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<form [formGroup]="formDetailsFormGroup"> | ||
<div class="col-md-6"> | ||
<div class="form-labeled-field"> | ||
<div> | ||
<span>{{'FORM_TITLE' | translate}}</span> | ||
</div> | ||
<div> | ||
<input class="form-control" formControlName="description" placeholder="{{'FORM_TITLE_PLACEHOLDER' | translate}}"> | ||
</div> | ||
</div> | ||
<div class="form-labeled-field"> | ||
<div> | ||
<span>{{'FORM_CODE' | translate}}</span> | ||
</div> | ||
<div> | ||
<input class="form-control" formControlName="code" placeholder="{{'FORM_CODE_PLACEHOLDER' | translate}}"> | ||
</div> | ||
</div> | ||
<div class="form-labeled-field-checkbox"> | ||
<div class="checkbox-label"> | ||
<span>{{'FORM_ONLY_DIASPORA' | translate}}</span> | ||
</div> | ||
<div class="checkbox-field"> | ||
<input type="checkbox" class="form-control" formControlName="diaspora"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6"> | ||
<!-- According to the design, this field should be here, but for now it has no correspondence in the model.--> | ||
|
||
<!-- <div>--> | ||
<!-- <span>{{'FORM_DESCRIPTION' | translate}}</span>--> | ||
<!-- </div>--> | ||
<!-- <div>--> | ||
<!-- <textarea rows="4" class="form-control" [(ngModel)]="form.description" placeholder="{{'FORM_DESCRIPTION_PLACEHOLDER' | translate}}"></textarea>--> | ||
<!-- </div>--> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="section-list" cdkDropList (cdkDropListDropped)="onReorder($event)"> | ||
<div *ngFor="let section of sectionFormGroupsArray; let i = index" cdkDrag class="section"> | ||
<app-section [sectionFormGroup]="section" | ||
(sectionDeleteEventEmitter)="onSectionDelete(i)"> | ||
</app-section> | ||
</div> | ||
</div> | ||
|
||
<div class="add-section-button" (click)="addFormSection()">+ {{'SECTION_ADD' | translate}}</div> | ||
</div> |
48 changes: 48 additions & 0 deletions
48
frontend/src/app/components/forms/form-create/form-create.component.scss
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,48 @@ | ||
.form-create { | ||
.back-button { | ||
font-weight: bold; | ||
cursor: pointer; | ||
margin-bottom: 1.2em; | ||
} | ||
|
||
.add-section-button { | ||
color: rebeccapurple; | ||
cursor: pointer; | ||
font-weight: bold; | ||
} | ||
|
||
.form-labeled-field { | ||
margin-bottom: 10px; | ||
|
||
&-checkbox { | ||
@extend .form-labeled-field; | ||
|
||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
|
||
.checkbox-label { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
} | ||
|
||
.checkbox-field { | ||
flex-basis: 16px; | ||
} | ||
} | ||
} | ||
|
||
.header-row { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
margin-bottom: 20px; | ||
|
||
.header-text { | ||
margin: auto 0; | ||
font-size: larger; | ||
font-weight: bold; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
frontend/src/app/components/forms/form-create/form-create.component.spec.ts
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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FormCreateComponent } from './form-create.component'; | ||
|
||
describe('FormCreateComponent', () => { | ||
let component: FormCreateComponent; | ||
let fixture: ComponentFixture<FormCreateComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ FormCreateComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(FormCreateComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.
4b7a5e1
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: