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)]],
|
||||
creatorPseudo: ['', []],
|
||||
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]],
|
||||
description: ['', []],
|
||||
password: ['', []],
|
||||
|
@ -4,21 +4,7 @@
|
||||
<app-stepper [step_current]="5" [step_max]="pollService.step_max"></app-stepper>
|
||||
<app-errors-list [form]="pollService.form"></app-errors-list>
|
||||
<fieldset class="advanced-config">
|
||||
<div class="has-background-danger" *ngIf="!pollService.form.valid">
|
||||
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">
|
||||
<fieldset class="complete well" *ngIf="environment.advanced_options_display">
|
||||
<app-advanced-config [form]="pollService.form"></app-advanced-config>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
@ -34,10 +20,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button class="btn btn--warning" (click)="askInitFormDefault()">-->
|
||||
<!-- <i class="fa fa-refresh"></i>-->
|
||||
<!-- Tout réinitialiser-->
|
||||
<!-- </button>-->
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { PollService } from '../../../../../core/services/poll.service';
|
||||
import { ApiService } from '../../../../../core/services/api.service';
|
||||
import { environment } from '../../../../../../environments/environment';
|
||||
|
||||
@Component({
|
||||
@ -13,10 +12,13 @@ export class StepFiveComponent implements OnInit {
|
||||
@Input() step_max: any;
|
||||
@Input() public form: FormGroup;
|
||||
poll: any;
|
||||
public environment = environment;
|
||||
advancedDisplayEnabled = environment.advanced_options_display;
|
||||
|
||||
constructor(public pollService: PollService) {
|
||||
this.pollService.step_current = 5;
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
askInitFormDefault() {
|
||||
|
@ -16,7 +16,6 @@ import { ToastService } from '../../../../../core/services/toast.service';
|
||||
export class StepFourComponent implements OnInit {
|
||||
public urlPrefix: any;
|
||||
public environment = environment;
|
||||
public advancedDisplayEnabled: boolean = environment.advanced_options_display;
|
||||
@Input()
|
||||
step_max: any;
|
||||
@Input()
|
||||
|
@ -10,7 +10,10 @@
|
||||
</label>
|
||||
<input class="input" type="text" id="name" formControlName="creatorPseudo" />
|
||||
<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>
|
||||
<input class="input" type="text" id="email" formControlName="creatorEmail" />
|
||||
</form>
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PollService } from '../../../../../core/services/poll.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Component({
|
||||
selector: 'app-step-six',
|
||||
@ -7,6 +8,7 @@ import { PollService } from '../../../../../core/services/poll.service';
|
||||
styleUrls: ['./step-six.component.scss'],
|
||||
})
|
||||
export class StepSixComponent implements OnInit {
|
||||
public environment = environment;
|
||||
constructor(public pollService: PollService) {
|
||||
this.pollService.step_current = 6;
|
||||
}
|
||||
|
@ -15,27 +15,28 @@ const apiV1 = {
|
||||
};
|
||||
|
||||
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,
|
||||
autofill_default_timeslices: false,
|
||||
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,
|
||||
appLogo: 'assets/img/logo.png',
|
||||
appTitle: 'FramaDate',
|
||||
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: {
|
||||
versionToUse: 'apiV1',
|
||||
version: {
|
||||
@ -82,6 +83,5 @@ export const environment = {
|
||||
localStorage: {
|
||||
key: 'FramaSondage',
|
||||
},
|
||||
|
||||
display_validation_errors: false,
|
||||
};
|
||||
|
@ -16,27 +16,28 @@ import 'zone.js/dist/zone-error';
|
||||
endpoints.baseHref = apiV1.baseHref;
|
||||
|
||||
export const environment = {
|
||||
frontDomain: 'http://127.0.0.1:4200',
|
||||
production: false,
|
||||
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,
|
||||
advanced_options_display: true,
|
||||
appLogo: 'assets/img/logo.png',
|
||||
appTitle: 'FramaDate',
|
||||
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,
|
||||
poll: poll_conf,
|
||||
localStorage: {
|
||||
|
Loading…
Reference in New Issue
Block a user