From ac571273f5e8bde07ac6cfc6bc81e99b187b6c2e Mon Sep 17 00:00:00 2001 From: Aldarien Date: Thu, 23 Apr 2020 00:19:03 -0400 Subject: [PATCH] Se agrega formato de correo y correo a solicitante --- common/Controller/Web/Contacto.php | 14 +++++++-- public/assets/styles/home.css | 8 ++++- resources/views/contacto/email.php | 47 ++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 resources/views/contacto/email.php diff --git a/common/Controller/Web/Contacto.php b/common/Controller/Web/Contacto.php index 80ca4d1..364ca64 100644 --- a/common/Controller/Web/Contacto.php +++ b/common/Controller/Web/Contacto.php @@ -17,10 +17,18 @@ class Contacto { $post = $request->getParsedBody(); $body = []; + $filename = implode(DIRECTORY_SEPARATOR, [ + $container->get('folders.templates'), + 'contacto', + 'email.php' + ]); + $html = file_get_contents($filename); foreach ($post as $key => $val) { - $body []= $key . ': ' . $val; + $body []= ucwords($key) . ': ' . $val; + $html = str_replace('{{$' . $key . '}}', $val, $html); } $body = implode(PHP_EOL, $body); + $subject = 'Contacto Web - ' . $post['nombre']; $message = $container->make(Message::class) @@ -29,13 +37,13 @@ class Contacto { ->addCc($container->get('email.administrativo')) ->setSubject($subject) ->setBody($body) - ->setHTMLBody(nl2br($body)); + ->setHTMLBody($html); $mailer->send($message); $message = $container->make(Message::class) ->setFrom($container->get('email')['username']) ->addTo($post['email'], $post['nombre']) ->setSubject($subject) - ->setBody('Su correo a Notaría Patricio Raby ha sido recibido.'); + ->setBody('Su correo a Notaría Patricio Raby Benavente ha sido recibido.'); $mailer->send($message); $output = [ diff --git a/public/assets/styles/home.css b/public/assets/styles/home.css index f2baeb0..ca6f9c6 100644 --- a/public/assets/styles/home.css +++ b/public/assets/styles/home.css @@ -5,6 +5,11 @@ background-blend-mode: multiply; color: white; } +@media screen and (max-width: 991px) { + #banner { + background-position: 75% !important; + } +} #banner a { color: inherit; } @@ -103,11 +108,11 @@ font-weight: bold; font-size: 16pt; } - #servicios .seguimiento { background-repeat: no-repeat; background-position: center; background-size: cover; + min-height: 10rem !important; } #indice .grid { @@ -124,6 +129,7 @@ #indice .img, #indice .img img { max-height: 20rem !important; + min-height: 10rem !important; } #indice .contenido { padding-top: 5rem !important; diff --git a/resources/views/contacto/email.php b/resources/views/contacto/email.php new file mode 100644 index 0000000..7b16342 --- /dev/null +++ b/resources/views/contacto/email.php @@ -0,0 +1,47 @@ + + + + Contacto Web - {{$nombre}} + + + + + + + + + + + + + + + + + + + + + + + + +
+ Nombre + + {{$nombre}} +
+ Teléfono + + {{$telefono}} +
+ Email + + {{$email}} +
+ Mensaje + + {{$mensaje}} +
+ +