mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
style on creation poll email
This commit is contained in:
parent
623b16a046
commit
afef8edd0b
@ -245,7 +245,7 @@ class PollController extends EmailsController {
|
||||
$repository = $this->getDoctrine()->getRepository( Poll::class );
|
||||
$poll = $repository->findOneByCustomUrl( $custom_url );
|
||||
if ( $poll ) {
|
||||
throw new \JsonException( 'NOPE, ce sondage existe déjà: '.$custom_url );
|
||||
throw new \JsonException( 'NOPE, ce sondage existe déjà: ' . $custom_url );
|
||||
}
|
||||
|
||||
$newpoll = new Poll();
|
||||
@ -402,21 +402,29 @@ class PollController extends EmailsController {
|
||||
public function testSendCreationMailAction(
|
||||
$emailChoice = 'tktest_commentateur@tktest.com'
|
||||
) {
|
||||
$em = $this->getDoctrine()->getRepository( Poll::class );
|
||||
$foundPoll = $em->findOneByCustomUrl( 'dessin-anime' );
|
||||
$em = $this->getDoctrine()->getRepository( Owner::class );
|
||||
$foundOwner = $em->findOneByEmail( $emailChoice );
|
||||
if ( $foundOwner ) {
|
||||
$sent = $this->sendOwnerPollsAction( $foundOwner );
|
||||
if ( $sent ) {
|
||||
$config = [
|
||||
'owner' => $foundOwner,
|
||||
'title' => $this->getParameter( 'WEBSITE_NAME' ) . ' | Mes sondages',
|
||||
'email_template' => 'emails/owner-list.html.twig',
|
||||
];
|
||||
return $this->render( 'emails/owner-list.html.twig', $config );
|
||||
// return $this->json( [ "message" => "test email sent to " . $foundOwner->getEmail() . "!" ], 200 );
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render( 'emails/creation-mail.html.twig',
|
||||
[ 'poll' => $foundPoll, 'owner' => $foundPoll->getOwner() ] );
|
||||
|
||||
|
||||
// if ( $foundOwner ) {
|
||||
// $sent = $this->sendOwnerPollsAction( $foundOwner );
|
||||
// if ( $sent ) {
|
||||
// $config = [
|
||||
// 'owner' => $foundOwner,
|
||||
// 'title' => $this->getParameter( 'WEBSITE_NAME' ) . ' | Mes sondages',
|
||||
// 'email_template' => 'emails/owner-list.html.twig',
|
||||
// ];
|
||||
// return $this->render( 'emails/owner-list.html.twig', $config );
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// return $this->json( [ "message" => "test email sent to " . $foundOwner->getEmail() . "!" ], 200 );
|
||||
|
||||
// $this->sendMailWithVars( $config );
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
<header>
|
||||
{% block title %}
|
||||
{% if title is defined %}
|
||||
<h1>{{ title }}</h1>
|
||||
<h1 class="text-center">{{ title }}</h1>
|
||||
{% else %}
|
||||
<h1>Framadate - email</h1>
|
||||
<h1 class="text-center">Framadate</h1>
|
||||
{% endif %}
|
||||
<hr>
|
||||
{% endblock %}
|
||||
@ -30,6 +30,9 @@
|
||||
|
||||
</div>
|
||||
<style type="text/css">
|
||||
.text-center{
|
||||
text-align:center;
|
||||
}
|
||||
html, body, main, header, footer, div {
|
||||
font-family: "Open Sans", "Helvetica Neue", sans-serif;
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
{% extends 'email-base.html.twig' %}
|
||||
{% block content %}
|
||||
|
||||
<h1>✨ Création de votre sondage {{ title }} </h1>
|
||||
Suite à la création de votre sondage <strong>{{ title }}</strong> vous recevez deux emails afin de ne pas transmettre par erreur aux sondés le lien d'administration de votre sondage.
|
||||
<h1>✨ Création de votre sondage {{ poll.title }} </h1>
|
||||
Suite à la création de votre sondage <strong>{{ poll.title }}</strong> vous recevez deux emails afin de ne pas transmettre par erreur aux sondés le lien d'administration de votre sondage.
|
||||
<br>
|
||||
Ce mail est le premier, comportant le message qui doit être envoyé aux sondés.<br>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<blockquote>
|
||||
<i>
|
||||
|
||||
💡 {{ owner.pseudo }} ( {{ owner.email }} ) vient de créer un sondage intitulé : " <strong>{{ title }}
|
||||
💡 {{ owner.pseudo }} ( {{ owner.email }} ) vient de créer un sondage intitulé : " <strong>{{ poll.title }}
|
||||
"</strong>.
|
||||
<br>
|
||||
<br>
|
||||
|
Loading…
Reference in New Issue
Block a user