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 admin_key: string;
public kind: string;
public description?: string;

View File

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

View File

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

View File

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