aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorBruno Perles2015-11-13 14:53:53 +0100
committerBruno Perles2015-11-13 14:53:53 +0100
commit28e4f9740ede54ff83d2c431bf56e2e5aa8e89b2 (patch)
treeae867119e0898eb155a09a9d36d8d830ac3ee1d2 /app
parent6e6b503de53632dbc1ffad418e4a31491a7b15a8 (diff)
downloadchouette-core-28e4f9740ede54ff83d2c431bf56e2e5aa8e89b2.tar.bz2
#35883 - Add confirm link to send confirmation email
Diffstat (limited to 'app')
-rw-r--r--app/views/devise/confirmations/new.html.erb36
-rw-r--r--app/views/devise/sessions/new.html.erb14
-rw-r--r--app/views/devise/shared/_intro.html.erb9
3 files changed, 37 insertions, 22 deletions
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index 1e221155c..dae3f3023 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,13 +1,23 @@
-<%= title_tag t('.title') %>
-
-<%= semantic_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |form| %>
-
- <%= form.input :email %>
-
- <%= form.actions do %>
- <%= form.action :submit, :as => :button, :label => t('.title') %>
- <%= form.action :cancel, :as => :link %>
- <% end %>
-<% end %>
-
-<%= render "links" %>
+<div id="sessions_new" class="row">
+ <%= render 'devise/shared/intro' %>
+ <div class="col-md-4 login">
+ <div class="panel panel-default">
+ <div class="panel-heading"><%= t('.title') %></div>
+ <div class="panel-body">
+ <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :wrapper => "form_without_label", html: { :class => 'form-horizontal user', method: :post } ) do |form| %>
+ <%= form.input :email, :label => false, input_html: { :class => "form-control" } %>
+ <div class="row">
+ <div class="col-md-12">
+ <%= form.button :submit, t('.title'), :class => "btn-primary" %>
+ </div>
+ </div>
+ <div class="row options">
+ <div class="col-md-12 new_password">
+ <%= link_to t('devise.links.sign_in'), new_session_path(resource_name) %>
+ </div>
+ </div>
+ <% end %>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 35b874e64..2df4f3d97 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,13 +1,5 @@
<div id="sessions_new" class="row">
- <div class="col-md-8 product_summary">
- <h2><%= t(".welcome") %></h2>
- <p><%= t(".introduction1") %></p>
- <p><%= t(".introduction2") %></p>
- <ul>
- <li>- <%= t(".introduction_item1") %></li>
- <li>- <%= t(".introduction_item2") %></li>
- </ul>
- </div>
+ <%= render 'devise/shared/intro' %>
<div class="col-md-4 login">
<div class="panel panel-default">
<div class="panel-body">
@@ -29,6 +21,10 @@
</div>
<div class="col-md-6 new_password">
<%= link_to t("devise.links.new_password"), new_password_path(resource_name) %>
+ <% if devise_mapping.confirmable? && controller_name != 'confirmations' %>
+ <br>
+ <%= link_to t("devise.links.new_confirmation"), new_confirmation_path(resource_name) %>
+ <% end %>
</div>
</div>
<% end %>
diff --git a/app/views/devise/shared/_intro.html.erb b/app/views/devise/shared/_intro.html.erb
new file mode 100644
index 000000000..b56559352
--- /dev/null
+++ b/app/views/devise/shared/_intro.html.erb
@@ -0,0 +1,9 @@
+<div class="col-md-8 product_summary">
+ <h2><%= t("devise.sessions.new.welcome") %></h2>
+ <p><%= t("devise.sessions.new.introduction1") %></p>
+ <p><%= t("devise.sessions.new.introduction2") %></p>
+ <ul>
+ <li>- <%= t("devise.sessions.new.introduction_item1") %></li>
+ <li>- <%= t("devise.sessions.new.introduction_item2") %></li>
+ </ul>
+</div>