Skip to content
Snippets Groups Projects
Commit 61aed635 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Merge branch 'email-teste' into 'master'

Sending approvence email.

See merge request portalmec/portalmec!503
parents 1a043dbf 384fa1bb
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ class V1::UsersController < ApplicationController
@user.submitter_request = :accepted
@user.roles << Role.where(name: "publisher")
if @user.save
TeacherMailer.new_teacher_approved(@user.email, @user.school).deliver_now
TeacherMailer.new_teacher_approved(@user).deliver_now
render status: :ok
else
render json: @user.errors, status: :unprocessable_entity
......
......@@ -30,8 +30,8 @@ class TeacherMailer < ApplicationMailer
mail(subject: "Professor cadastrado atualizado")
end
def new_teacher_approved(email, school)
@school = school
mail(from: "integrada.contato@mec.gov.br", to: email, subject: "Cadastro como professor aprovado")
def new_teacher_approved(user)
@teacher = user
mail(from: "integrada.contato@mec.gov.br", to: @teacher.email, subject: "Cadastro como professor aprovado")
end
end
<!DOCTYPE html>
<style>
body{
background-color: #ffffff;
font-family: 'Roboto', sans-serif;
font-style: normal;
max-width: 569px;
padding: 54px 16px 56px 15px ;
margin: 0 auto;
color: #666666;
}
body p{
line-height: 21px;
font-family: Roboto;
font-style: normal;
font-weight: normal;
font-size: 15px;
margin: 15px 0 15px 0;
}
h1{
font-weight: 500;
font-size: 20px;
color: #00BCD4;
}
a{
color: #00BCD4;
text-decoration: none;
}
span{
font-size: 18px;
text-align: center;
letter-spacing: 0.01em;
display: inline-block;
margin: 0 0 3px 0;
}
hr{
width: 45%;
height:0;
border: 1px solid #D1D1D1;
margin: 20px auto 20px auto;
}
.logo{
width:252px;
}
.publish{
text-align: center;
margin-top: 20px;
margin-bottom: 40px;
}
.buttom{
left: 217px;
top: 276px;
margin-top:15px;
padding: 17px 14px 16px 15px;
background: #FF7F00;
border-radius: 3px;
border: none;
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);
font-weight: 500;
line-height: normal;
font-size: 14px;
color: #FFFFFF;
}
.info ul{
list-style-type: none;
}
.info ul li{
margin-top: 1em;
margin-bottom: 1em;
line-height: 21px;
font-family: Roboto;
font-style: normal;
font-weight: normal;
font-size: 15px;
}
.change-info p{
line-height: 17px !important;
font-size: 12px !important;
}
.block_margin{
margin: 30px 0px 30px 0px;
}
.bottom{
text-align: center;
margin-right: 10%;
margin-left: 10%;
}
</style>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>/* Email styles need to be inline */</style>
</head>
<body>
<% if @school.nil? %>
<p>Seu cadastro como professor foi aprovado.</p>
<% else %>
<p>Seu cadastro como professor da escola <%= @school.name %> no município de <%= @school.city %> - <%= @school.uf %> foi aprovado.</p>
<% end %>
<p>Agora você já pode publicar e compartilhar recursos educacionais digitais na Plataforma MEC RED com toda a comunidade escolar do país. <a href="https://plataformaintegrada.mec.gov.br/ajuda/publicando-recursos">SAIBA MAIS</a>
</body>
</html>
<body>
<h1>Olá, Professor(a) <%= @teacher.name %>,</h1>
<div class="block_margin">
<p>É com entusiasmo que notificamos que a sua solicitação de cadastro como Professor(a) na Plataforma Integrada de Recursos Educacionais Digitais foi atendida.</p>
<p>Legal, né?! Agora você já pode publicar Recursos Educacionais Digitais e compartilhá-los com toda a comunidade escolar!</p>
</div>
<div class="publish">
<span>Está animado e gostaria de publicar o seu primeiro recurso?</span>
<input type="button" class="buttom" Padding="17 14 16 15" value="PUBLICAR RECURSO">
</div>
<div class="block_margin">
<p>Agradecemos por sua contribuição!</br>A sua participação na Plataforma ajuda a fortalecer a nossa rede.</p>
</div>
<% if @teacher.school.nil? %>
<hr>
<div class="block_margin info">
<p>Confira novamente seus dados:</p>
<ul>
<li>Município - UF: <%= @teacher.school.uf%></li>
<li>Escola: <%= @teacher.school.name %></li>
<li>Telefone da escola: <%= @teacher.school.phone %></li>
<li>Seu CPF: <%= @teacher.cpf %></li>
<ul>
</div>
<div class="change-info block_margin">
<p>Gostaria de alterar as informaçóes de seu cadastro?</br><a href="">Clique aqui para acessar suas configurações de conta</a></p>
</div>
<% end %>
<hr>
<div class="bottom">
<p>Por favor, não responda esta mensagem. Em caso de dúvidas, acesse nossa <a href="https://plataformaintegrada.mec.gov.br/ajuda" target="_blank">Central de Ajuda</a></p>
<a href="https://plataformaintegrada.mec.gov.br" target="_blank"><img class="logo" src="https://plataformaintegrada.mec.gov.br/img/logo.svg"></a>
</div>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment