update url to copy after creation

This commit is contained in:
Tykayn 2021-04-30 16:00:22 +02:00 committed by tykayn
parent 16db2a69cf
commit bfdb18b316
4 changed files with 13 additions and 9 deletions

View File

@ -16,6 +16,7 @@ export class Poll {
public default_expiracy_days_from_now = 60; public default_expiracy_days_from_now = 60;
public admin_key: string;
public kind: string; public kind: string;
public description?: string; public description?: string;

View File

@ -1,6 +1,4 @@
<div class="admin-form padded"> <div class="admin-form padded">
<app-success [poll]="poll"></app-success>
<div class="container is-max-widescreen"> <div class="container is-max-widescreen">
<form [formGroup]="form"> <form [formGroup]="form">
<header class="columns"> <header class="columns">
@ -82,4 +80,6 @@
</div> </div>
</form> </form>
</div> </div>
<app-success [poll]="poll"></app-success>
</div> </div>

View File

@ -30,10 +30,8 @@
Pour accéder au sondage et à tous ses paramètres : Pour accéder au sondage et à tous ses paramètres :
<a href="{{ poll.custom_url }}">{{ poll.custom_url }} </a> <a href="{{ poll.custom_url }}">{{ poll.custom_url }} </a>
</p> </p>
<app-copy-text <app-copy-text [textToCopy]="window.location.href + 'poll/admin/' + poll.admin_key + ''"></app-copy-text>
[textToCopy]="window.location.href + '/poll/' + poll.custom_url + '/consultation'" <a [href]="window.location.href + 'poll/admin/' + poll.admin_key + ''">
></app-copy-text>
<a href="{{ poll.custom_url }}">
Voir le sondage coté administrateur·ice Voir le sondage coté administrateur·ice
</a> </a>
<p class="note"> <p class="note">
@ -45,10 +43,14 @@
<h2 i18n>{{ 'resume.users' | translate }}</h2> <h2 i18n>{{ 'resume.users' | translate }}</h2>
<p> <p>
Pour accéder au sondage : Pour accéder au sondage :
<a href="{{ poll.custom_url }}">{{ poll.custom_url }} </a> <a href="{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}"
>{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}
</a>
</p> </p>
<app-copy-text [textToCopy]="poll.custom_url"></app-copy-text> <app-copy-text
<a href="{{ poll.custom_url }}"> [textToCopy]="window.location.href + 'poll/' + poll.custom_url + '/consultation'"
></app-copy-text>
<a href="{{ window.location.href + 'poll/' + poll.custom_url + 'consultation' }}">
Voir le sondage Voir le sondage
</a> </a>
</section> </section>

View File

@ -10,6 +10,7 @@ import { Poll } from '../../../core/models/poll.model';
export class SuccessComponent implements OnInit { export class SuccessComponent implements OnInit {
@Input() poll: Poll; @Input() poll: Poll;
mailToRecieve: string; mailToRecieve: string;
window: any = window;
constructor(private pollService: PollService) {} constructor(private pollService: PollService) {}