mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
date selector as question answers
This commit is contained in:
parent
21040df287
commit
4a89b715a9
@ -24,7 +24,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<app-kind-select [form]="form"></app-kind-select>
|
<app-kind-select [form]="form"></app-kind-select>
|
||||||
<!-- <app-base-config [form]="form"></app-base-config>-->
|
<app-base-config [form]="form"></app-base-config>
|
||||||
<!-- <app-date-select-->
|
<!-- <app-date-select-->
|
||||||
<!-- *ngIf="form.value.configuration && form.value.configuration.isAboutDate"-->
|
<!-- *ngIf="form.value.configuration && form.value.configuration.isAboutDate"-->
|
||||||
<!-- [form]="form"-->
|
<!-- [form]="form"-->
|
||||||
|
@ -70,6 +70,7 @@ export class FormComponent implements OnInit {
|
|||||||
label: ['', [Validators.required]],
|
label: ['', [Validators.required]],
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
|
kind: ['', [Validators.required]],
|
||||||
configuration: this.fb.group({
|
configuration: this.fb.group({
|
||||||
areResultsPublic: [true, [Validators.required]],
|
areResultsPublic: [true, [Validators.required]],
|
||||||
whoCanChangeAnswers: ['everybody', [Validators.required]],
|
whoCanChangeAnswers: ['everybody', [Validators.required]],
|
||||||
@ -77,6 +78,7 @@ export class FormComponent implements OnInit {
|
|||||||
isOwnerNotifiedByEmailOnNewVote: [false, [Validators.required]],
|
isOwnerNotifiedByEmailOnNewVote: [false, [Validators.required]],
|
||||||
isOwnerNotifiedByEmailOnNewComment: [false, [Validators.required]],
|
isOwnerNotifiedByEmailOnNewComment: [false, [Validators.required]],
|
||||||
isMaybeAnswerAvailable: [false, [Validators.required]],
|
isMaybeAnswerAvailable: [false, [Validators.required]],
|
||||||
|
|
||||||
isAboutDate: [true, [Validators.required]],
|
isAboutDate: [true, [Validators.required]],
|
||||||
isZeroKnoledge: [false, [Validators.required]],
|
isZeroKnoledge: [false, [Validators.required]],
|
||||||
expiresDaysDelay: [60, [Validators.required, Validators.min(1)]],
|
expiresDaysDelay: [60, [Validators.required, Validators.min(1)]],
|
||||||
@ -110,6 +112,8 @@ export class FormComponent implements OnInit {
|
|||||||
creatorEmail: 'chucknorris@example.com',
|
creatorEmail: 'chucknorris@example.com',
|
||||||
isAboutDate: true,
|
isAboutDate: true,
|
||||||
// hasSeveralHours: true,
|
// hasSeveralHours: true,
|
||||||
|
kind: 'date',
|
||||||
|
// TODO aplatir les contrôles
|
||||||
configuration: {
|
configuration: {
|
||||||
whoCanChangeAnswers: 'everybody',
|
whoCanChangeAnswers: 'everybody',
|
||||||
isProtectedByPassword: false,
|
isProtectedByPassword: false,
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
<div class="kind-select form-field">
|
<div class="kind-select form-field">
|
||||||
|
<form [formGroup]="form">
|
||||||
<div class="kind-of-poll columns">
|
<div class="kind-of-poll columns">
|
||||||
<div class="column" *ngIf="template_questions_answers">
|
<div class="column" *ngIf="template_questions_answers">
|
||||||
<!-- version maquette questions réponses-->
|
<!-- version maquette questions réponses-->
|
||||||
{{ 'creation.want' | translate }}
|
<select name="type" id="type" class="input" formControlName="kind">
|
||||||
<select name="type" id="type" class="input">
|
<option [value]="'date'">{{ 'creation.kind.date' | translate }}</option>
|
||||||
<option value="classic">{{ 'creation.kind.classic' | translate }}</option>
|
<option [value]="'classic'">{{ 'creation.kind.classic' | translate }}</option>
|
||||||
<option value="date">{{ 'creation.kind.date' | translate }}</option>
|
|
||||||
</select>
|
</select>
|
||||||
{{ 'creation.choose_title' | translate }}
|
|
||||||
<input type="text" name="title" class="input" />
|
|
||||||
</div>
|
</div>
|
||||||
<!-- version avec un choix de bouton-->
|
<!-- version avec un choix de bouton-->
|
||||||
<div class="column" *ngIf="!template_questions_answers">
|
<div class="columns" *ngIf="!template_questions_answers">
|
||||||
|
<div class="column">
|
||||||
<button
|
<button
|
||||||
class="btn-block btn"
|
class="btn-block btn"
|
||||||
[ngClass]="{ 'is-primary': form.value.configuration.isAboutDate }"
|
[ngClass]="{ 'is-primary': form.value.configuration.isAboutDate }"
|
||||||
@ -45,3 +44,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user