Merge branch 'master' of github.com:snap-cloud/snapcon

* 'master' of github.com:snap-cloud/snapcon:
  Skip datatable spec because github actions is weird.
  Add devise view files for email messages
  Make the _mailbot_* files not depend on @conference
  Tweak devise text for confirm emails
This commit is contained in:
Michael Ball 2021-04-15 22:22:23 -07:00
commit 4dedfdfe90
10 changed files with 55 additions and 22 deletions

View file

@ -4,7 +4,7 @@
.panel.panel-default
.panel-heading
%h3.panel-title
Resend confirmation instructions
Resend account confirmation instructions
.panel-body
= semantic_form_for(resource, as: resource_name, url: confirmation_path(resource_name), method: :post) do |f|
= f.input :email, input_html: { autofocus: true, required: true }

View file

@ -0,0 +1,9 @@
<%= render partial: "layouts/mailbot_header" %>
<div id="content">
<p>Welcome to Snap!Con <%= @email %>!</p>
<p>You can confirm your account email through the link below:</p>
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
</div>
<%= render partial: "layouts/mailbot_footer" %>

View file

@ -0,0 +1,7 @@
<p>Hello <%= @email %>!</p>
<% if @resource.try(:unconfirmed_email?) %>
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
<% else %>
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
<% end %>

View file

@ -0,0 +1,3 @@
<p>Hello <%= @resource.email %>!</p>
<p>We're contacting you to notify you that your password has been changed.</p>

View file

@ -0,0 +1,8 @@
<p>Hello <%= @resource.email %>!</p>
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>

View file

@ -0,0 +1,7 @@
<p>Hello <%= @resource.email %>!</p>
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
<p>Click the link below to unlock your account:</p>
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>

View file

@ -1,12 +1,7 @@
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="Snap!Con -- A conference all about Snap!, a programing language from UC Berkeley." name="description"/>
<meta content="Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock" name="author"/>
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
<div id="border" style="background-color: <%= conference_color(@conference) %>"></div>
<% if @conference.present? %>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<% else %>
<div id="border" style="background-color: #003262">
<% end %>
</body>
</html>
</html>

View file

@ -9,17 +9,21 @@
<meta content="Michael Ball, Brian Harvey, Jens Moenig, Bernat Romagosa, Dan Garcia, Lauren Mock" name="author"/>
<%= stylesheet_link_tag "mailbot" %>
</head>
<body>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<body>
<% if @conference.present? %>
<div id="border" style="background-color: <%= conference_color(@conference) %>">
<% else %>
<div id="border" style="background-color: #003262">
<% end %>
<div class="row">
<div class="col-md-2">
<% if @conference.present? %>
<%= image_tag(conference_logo_url(@conference), style: "display:block;height:70px;width:auto;", alt: @conference.title + ' logo') %>
<% else %>
<%= image_tag(Organization.first.picture_url, style: "display:block;height:70px;width:auto;", alt: ENV['OSEM_NAME'] + ' logo') %>
<% end %>
</div>
</div>
</div>
</body>