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
@ -402,21 +402,29 @@ class PollController extends EmailsController {
|
|||||||
public function testSendCreationMailAction(
|
public function testSendCreationMailAction(
|
||||||
$emailChoice = 'tktest_commentateur@tktest.com'
|
$emailChoice = 'tktest_commentateur@tktest.com'
|
||||||
) {
|
) {
|
||||||
|
$em = $this->getDoctrine()->getRepository( Poll::class );
|
||||||
|
$foundPoll = $em->findOneByCustomUrl( 'dessin-anime' );
|
||||||
$em = $this->getDoctrine()->getRepository( Owner::class );
|
$em = $this->getDoctrine()->getRepository( Owner::class );
|
||||||
$foundOwner = $em->findOneByEmail( $emailChoice );
|
$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 );
|
// $this->sendMailWithVars( $config );
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
<header>
|
<header>
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if title is defined %}
|
{% if title is defined %}
|
||||||
<h1>{{ title }}</h1>
|
<h1 class="text-center">{{ title }}</h1>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>Framadate - email</h1>
|
<h1 class="text-center">Framadate</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr>
|
<hr>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -30,6 +30,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
.text-center{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
html, body, main, header, footer, div {
|
html, body, main, header, footer, div {
|
||||||
font-family: "Open Sans", "Helvetica Neue", sans-serif;
|
font-family: "Open Sans", "Helvetica Neue", sans-serif;
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
{% extends 'email-base.html.twig' %}
|
{% extends 'email-base.html.twig' %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h1>✨ Création de votre sondage {{ title }} </h1>
|
<h1>✨ Création de votre sondage {{ poll.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.
|
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>
|
<br>
|
||||||
Ce mail est le premier, comportant le message qui doit être envoyé aux sondés.<br>
|
Ce mail est le premier, comportant le message qui doit être envoyé aux sondés.<br>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<blockquote>
|
<blockquote>
|
||||||
<i>
|
<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>.
|
"</strong>.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
Reference in New Issue
Block a user