advanced config, toggle display clear password
This commit is contained in:
parent
b3b8d46aa3
commit
a0576a477d
|
@ -10,32 +10,20 @@
|
||||||
formControlName="description"
|
formControlName="description"
|
||||||
required
|
required
|
||||||
></textarea>
|
></textarea>
|
||||||
<button
|
|
||||||
mat-button
|
|
||||||
*ngIf="description.value"
|
|
||||||
matSuffix
|
|
||||||
mat-icon-button
|
|
||||||
aria-label="Clear"
|
|
||||||
(click)="description.value = ''"
|
|
||||||
>
|
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<label for="custom_url">
|
<label for="custom_url">
|
||||||
Url personnalisée pour les participants
|
Url personnalisée pour les participants
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
</label>
|
</label>
|
||||||
<br />
|
<br />
|
||||||
<button
|
<button
|
||||||
mat-button
|
|
||||||
*ngIf="form.controls.custom_url.value"
|
*ngIf="form.controls.custom_url.value"
|
||||||
matSuffix
|
|
||||||
mat-icon-button
|
|
||||||
aria-label="Clear"
|
aria-label="Clear"
|
||||||
(click)="form.patchValue({ custom_url: '' })"
|
(click)="form.patchValue({ custom_url: pollService.makeSlug(form) })"
|
||||||
></button>
|
>
|
||||||
|
<i class="fa fa-recycle"></i> régénérer
|
||||||
|
</button>
|
||||||
<input #custom_url matInput id="custom_url" placeholder="Url" formControlName="custom_url" required />
|
<input #custom_url matInput id="custom_url" placeholder="Url" formControlName="custom_url" required />
|
||||||
<br />
|
<br />
|
||||||
<div appearance="outline" class="is-not-flex">
|
<div appearance="outline" class="is-not-flex">
|
||||||
|
@ -51,16 +39,6 @@
|
||||||
formControlName="expiresDaysDelay"
|
formControlName="expiresDaysDelay"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<button
|
|
||||||
mat-button
|
|
||||||
*ngIf="expiresDaysDelay.value"
|
|
||||||
matSuffix
|
|
||||||
mat-icon-button
|
|
||||||
aria-label="Clear"
|
|
||||||
(click)="expiresDaysDelay.value = ''"
|
|
||||||
>
|
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<mat-checkbox class="is-not-flex" formControlName="areResultsPublic">
|
<mat-checkbox class="is-not-flex" formControlName="areResultsPublic">
|
||||||
Les participants pourront consulter les résultats
|
Les participants pourront consulter les résultats
|
||||||
|
@ -74,16 +52,26 @@
|
||||||
Le sondage sera protégé par un mot de passe
|
Le sondage sera protégé par un mot de passe
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
<br />
|
<br />
|
||||||
<input
|
<div class="password-box" *ngIf="form.value.isProtectedByPassword">
|
||||||
*ngIf="form.value.isProtectedByPassword"
|
<input
|
||||||
#password
|
#password
|
||||||
id="password"
|
id="password"
|
||||||
matInput
|
matInput
|
||||||
type="password"
|
[type]="displayClearPassword ? 'text' : 'password'"
|
||||||
placeholder="password"
|
placeholder="password"
|
||||||
formControlName="password"
|
formControlName="password"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<button
|
||||||
|
class="button"
|
||||||
|
[ngClass]="{ 'is-primary': displayClearPassword, 'is-info': !displayClearPassword }"
|
||||||
|
(click)="displayClearPassword = !displayClearPassword"
|
||||||
|
>
|
||||||
|
voir
|
||||||
|
<i class="fa fa-eye" *ngIf="!displayClearPassword"></i>
|
||||||
|
<i class="fa fa-eye-slash" *ngIf="displayClearPassword"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h3 class="title is-3">
|
<h3 class="title is-3">
|
||||||
<i class="fa fa-envelope-open"></i>
|
<i class="fa fa-envelope-open"></i>
|
||||||
|
@ -172,4 +160,5 @@
|
||||||
Les informations du sondage seront chiffrés en base de données
|
Les informations du sondage seront chiffrés en base de données
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<app-errors-list [form]="form"></app-errors-list>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -6,3 +6,6 @@
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.button .fa {
|
||||||
|
margin: 1em;
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { Poll } from '../../../../core/models/poll.model';
|
import { Poll } from '../../../../core/models/poll.model';
|
||||||
import { FormGroup } from '@angular/forms';
|
import { FormGroup } from '@angular/forms';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { PollService } from '../../../../core/services/poll.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-advanced-config',
|
selector: 'app-advanced-config',
|
||||||
|
@ -11,11 +12,12 @@ import { environment } from 'src/environments/environment';
|
||||||
export class AdvancedConfigComponent implements OnInit {
|
export class AdvancedConfigComponent implements OnInit {
|
||||||
public urlPrefix = '/participation/';
|
public urlPrefix = '/participation/';
|
||||||
public environment = environment;
|
public environment = environment;
|
||||||
|
public displayClearPassword = false;
|
||||||
@Input()
|
@Input()
|
||||||
public poll?: Poll;
|
public poll?: Poll;
|
||||||
@Input()
|
@Input()
|
||||||
public form: FormGroup;
|
public form: FormGroup;
|
||||||
constructor() {}
|
constructor(public pollService: PollService) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
display_routes: false, // demo paths to test polls
|
display_routes: false, // demo paths to test polls
|
||||||
autofill_creation: true,
|
autofill_creation: true,
|
||||||
advanced_options_display: false,
|
advanced_options_display: true,
|
||||||
autofill_participation: true,
|
autofill_participation: true,
|
||||||
// autofill: false,
|
// autofill: false,
|
||||||
showDemoWarning: false,
|
showDemoWarning: false,
|
||||||
|
|
Loading…
Reference in New Issue