mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
add env creation_display_proposals_time_slices
This commit is contained in:
parent
f1403fe2a0
commit
dbecfe6195
@ -117,7 +117,7 @@ export class PollService implements Resolve<Poll> {
|
|||||||
title: ['défault titre', [Validators.required, Validators.minLength(minlengthValidation)]],
|
title: ['défault titre', [Validators.required, Validators.minLength(minlengthValidation)]],
|
||||||
creatorPseudo: ['', []],
|
creatorPseudo: ['', []],
|
||||||
created_at: [new Date(), [Validators.required]],
|
created_at: [new Date(), [Validators.required]],
|
||||||
creatorEmail: ['', [Validators.required]],
|
creatorEmail: ['', [environment.creation_email_is_required ? Validators.required : null]],
|
||||||
custom_url: [this.uuidService.getUUID(), [Validators.required]],
|
custom_url: [this.uuidService.getUUID(), [Validators.required]],
|
||||||
description: ['', []],
|
description: ['', []],
|
||||||
password: ['', []],
|
password: ['', []],
|
||||||
|
@ -4,21 +4,7 @@
|
|||||||
<app-stepper [step_current]="5" [step_max]="pollService.step_max"></app-stepper>
|
<app-stepper [step_current]="5" [step_max]="pollService.step_max"></app-stepper>
|
||||||
<app-errors-list [form]="pollService.form"></app-errors-list>
|
<app-errors-list [form]="pollService.form"></app-errors-list>
|
||||||
<fieldset class="advanced-config">
|
<fieldset class="advanced-config">
|
||||||
<div class="has-background-danger" *ngIf="!pollService.form.valid">
|
<fieldset class="complete well" *ngIf="environment.advanced_options_display">
|
||||||
le formulaire est invalide
|
|
||||||
<pre> {{ pollService.form.errors | json }}</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button
|
|
||||||
class="button is-unchecked-info"
|
|
||||||
[ngClass]="{ 'is-info': !advancedDisplayEnabled, 'is-primary': advancedDisplayEnabled }"
|
|
||||||
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
|
|
||||||
>
|
|
||||||
<i class="fa fa-chevron-circle-down" *ngIf="!advancedDisplayEnabled"></i>
|
|
||||||
<i class="fa fa-chevron-circle-up" *ngIf="advancedDisplayEnabled"></i>
|
|
||||||
{{ 'creation.advanced' | translate }}
|
|
||||||
</button>
|
|
||||||
<fieldset class="complete well" *ngIf="advancedDisplayEnabled">
|
|
||||||
<app-advanced-config [form]="pollService.form"></app-advanced-config>
|
<app-advanced-config [form]="pollService.form"></app-advanced-config>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -34,10 +20,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <button class="btn btn--warning" (click)="askInitFormDefault()">-->
|
|
||||||
<!-- <i class="fa fa-refresh"></i>-->
|
|
||||||
<!-- Tout réinitialiser-->
|
|
||||||
<!-- </button>-->
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
import { PollService } from '../../../../../core/services/poll.service';
|
import { PollService } from '../../../../../core/services/poll.service';
|
||||||
import { ApiService } from '../../../../../core/services/api.service';
|
|
||||||
import { environment } from '../../../../../../environments/environment';
|
import { environment } from '../../../../../../environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -13,10 +12,13 @@ export class StepFiveComponent implements OnInit {
|
|||||||
@Input() step_max: any;
|
@Input() step_max: any;
|
||||||
@Input() public form: FormGroup;
|
@Input() public form: FormGroup;
|
||||||
poll: any;
|
poll: any;
|
||||||
|
public environment = environment;
|
||||||
advancedDisplayEnabled = environment.advanced_options_display;
|
advancedDisplayEnabled = environment.advanced_options_display;
|
||||||
|
|
||||||
constructor(public pollService: PollService) {
|
constructor(public pollService: PollService) {
|
||||||
this.pollService.step_current = 5;
|
this.pollService.step_current = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
askInitFormDefault() {
|
askInitFormDefault() {
|
||||||
|
@ -16,7 +16,6 @@ import { ToastService } from '../../../../../core/services/toast.service';
|
|||||||
export class StepFourComponent implements OnInit {
|
export class StepFourComponent implements OnInit {
|
||||||
public urlPrefix: any;
|
public urlPrefix: any;
|
||||||
public environment = environment;
|
public environment = environment;
|
||||||
public advancedDisplayEnabled: boolean = environment.advanced_options_display;
|
|
||||||
@Input()
|
@Input()
|
||||||
step_max: any;
|
step_max: any;
|
||||||
@Input()
|
@Input()
|
||||||
|
@ -10,7 +10,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<input class="input" type="text" id="name" formControlName="creatorPseudo" />
|
<input class="input" type="text" id="name" formControlName="creatorPseudo" />
|
||||||
<label for="email">
|
<label for="email">
|
||||||
Votre adresse e-mail (obligatoire)
|
Votre adresse e-mail
|
||||||
|
<span class="required-label" *ngIf="environment.creation_email_is_required">
|
||||||
|
(obligatoire)
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<input class="input" type="text" id="email" formControlName="creatorEmail" />
|
<input class="input" type="text" id="email" formControlName="creatorEmail" />
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { PollService } from '../../../../../core/services/poll.service';
|
import { PollService } from '../../../../../core/services/poll.service';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-step-six',
|
selector: 'app-step-six',
|
||||||
@ -7,6 +8,7 @@ import { PollService } from '../../../../../core/services/poll.service';
|
|||||||
styleUrls: ['./step-six.component.scss'],
|
styleUrls: ['./step-six.component.scss'],
|
||||||
})
|
})
|
||||||
export class StepSixComponent implements OnInit {
|
export class StepSixComponent implements OnInit {
|
||||||
|
public environment = environment;
|
||||||
constructor(public pollService: PollService) {
|
constructor(public pollService: PollService) {
|
||||||
this.pollService.step_current = 6;
|
this.pollService.step_current = 6;
|
||||||
}
|
}
|
||||||
|
@ -15,27 +15,28 @@ const apiV1 = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
frontDomain: productionBaseUrl,
|
|
||||||
production: true,
|
|
||||||
display_routes: false,
|
|
||||||
showDemoWarning: false,
|
|
||||||
// creation form
|
|
||||||
display_menu_creation: false,
|
|
||||||
autofill_creation: false,
|
|
||||||
autofill_participation: false,
|
|
||||||
advanced_options_display: false,
|
advanced_options_display: false,
|
||||||
autofill_default_timeslices: false,
|
appLogo: 'assets/img/logo.png',
|
||||||
creation_email_is_required: true,
|
|
||||||
creation_display_admin_url: false,
|
|
||||||
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
|
||||||
autoSendNewPoll: false,
|
|
||||||
interval_days_default: 7,
|
|
||||||
showStepperShortcuts: false,
|
|
||||||
expiresDaysDelay: 60,
|
|
||||||
maxCountOfAnswers: 300,
|
|
||||||
appTitle: 'FramaDate',
|
appTitle: 'FramaDate',
|
||||||
appVersion: '2.2.1',
|
appVersion: '2.2.1',
|
||||||
appLogo: 'assets/img/logo.png',
|
autofill_creation: false,
|
||||||
|
autofill_default_timeslices: false,
|
||||||
|
autofill_participation: false,
|
||||||
|
autoSendNewPoll: false,
|
||||||
|
creation_display_admin_url: false,
|
||||||
|
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
||||||
|
creation_display_proposals_time_slices: false,
|
||||||
|
creation_email_is_required: true,
|
||||||
|
display_menu_creation: false,
|
||||||
|
display_routes: false,
|
||||||
|
expiresDaysDelay: 60,
|
||||||
|
frontDomain: productionBaseUrl,
|
||||||
|
interval_days_default: 7,
|
||||||
|
maxCountOfAnswers: 300,
|
||||||
|
production: true,
|
||||||
|
showDemoWarning: false,
|
||||||
|
showStepperShortcuts: false,
|
||||||
|
|
||||||
api: {
|
api: {
|
||||||
versionToUse: 'apiV1',
|
versionToUse: 'apiV1',
|
||||||
version: {
|
version: {
|
||||||
@ -82,6 +83,5 @@ export const environment = {
|
|||||||
localStorage: {
|
localStorage: {
|
||||||
key: 'FramaSondage',
|
key: 'FramaSondage',
|
||||||
},
|
},
|
||||||
|
|
||||||
display_validation_errors: false,
|
display_validation_errors: false,
|
||||||
};
|
};
|
||||||
|
@ -16,27 +16,28 @@ import 'zone.js/dist/zone-error';
|
|||||||
endpoints.baseHref = apiV1.baseHref;
|
endpoints.baseHref = apiV1.baseHref;
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
frontDomain: 'http://127.0.0.1:4200',
|
advanced_options_display: true,
|
||||||
production: false,
|
appLogo: 'assets/img/logo.png',
|
||||||
display_routes: false, // demo paths to test polls
|
|
||||||
display_menu_creation: false,
|
|
||||||
autofill_creation: false,
|
|
||||||
advanced_options_display: false,
|
|
||||||
autofill_participation: false,
|
|
||||||
autofill_default_timeslices: false,
|
|
||||||
creation_email_is_required: true,
|
|
||||||
creation_display_proposals_time_slices: false,
|
|
||||||
creation_display_admin_url: false,
|
|
||||||
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
|
||||||
showDemoWarning: false,
|
|
||||||
autoSendNewPoll: false,
|
|
||||||
showStepperShortcuts: false,
|
|
||||||
interval_days_default: 7,
|
|
||||||
expiresDaysDelay: 60,
|
|
||||||
maxCountOfAnswers: 300,
|
|
||||||
appTitle: 'FramaDate',
|
appTitle: 'FramaDate',
|
||||||
appVersion: '2.2.1',
|
appVersion: '2.2.1',
|
||||||
appLogo: 'assets/img/logo.png',
|
autofill_creation: false,
|
||||||
|
autofill_default_timeslices: false,
|
||||||
|
autofill_participation: false,
|
||||||
|
autoSendNewPoll: false,
|
||||||
|
creation_display_admin_url: false,
|
||||||
|
creation_display_hour_per_day: false, // display or not the ability to choose time slices different per day
|
||||||
|
creation_display_proposals_time_slices: false,
|
||||||
|
creation_email_is_required: true,
|
||||||
|
display_menu_creation: false,
|
||||||
|
display_routes: false, // demo paths to test polls
|
||||||
|
expiresDaysDelay: 60,
|
||||||
|
frontDomain: 'http://127.0.0.1:4200',
|
||||||
|
interval_days_default: 7,
|
||||||
|
maxCountOfAnswers: 300,
|
||||||
|
production: false,
|
||||||
|
showDemoWarning: false,
|
||||||
|
showStepperShortcuts: false,
|
||||||
|
|
||||||
api: endpoints,
|
api: endpoints,
|
||||||
poll: poll_conf,
|
poll: poll_conf,
|
||||||
localStorage: {
|
localStorage: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user