devise-foundation-views 0.1.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +76 -0
- data/.gitignore +32 -3
- data/.rspec +1 -0
- data/.rubocop.yml +44 -0
- data/CHANGELOG.md +76 -0
- data/CODE_OF_CONDUCT.md +9 -0
- data/Gemfile +9 -2
- data/README.md +102 -25
- data/Rakefile +6 -2
- data/UPGRADE_GUIDE.md +87 -0
- data/app/assets/stylesheets/devise_foundation_layout.css +49 -0
- data/app/assets/stylesheets/devise_foundation_views.css +53 -0
- data/app/assets/stylesheets/devise_foundation_views_less.less +47 -8
- data/app/assets/stylesheets/devise_foundation_views_scss.scss +48 -8
- data/app/views/devise/confirmations/new.html.erb +18 -25
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -10
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -14
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -12
- data/app/views/devise/passwords/edit.html.erb +25 -27
- data/app/views/devise/passwords/new.html.erb +16 -23
- data/app/views/devise/registrations/edit.html.erb +51 -35
- data/app/views/devise/registrations/new.html.erb +29 -29
- data/app/views/devise/sessions/new.html.erb +32 -30
- data/app/views/devise/shared/_error_messages.html.erb +17 -0
- data/app/views/devise/shared/_foundation_layout.html.erb +12 -0
- data/app/views/devise/shared/_links.html.erb +22 -20
- data/app/views/devise/unlocks/new.html.erb +16 -23
- data/app/views/devise_haml/confirmations/new.html.haml +10 -15
- data/app/views/devise_haml/mailer/confirmation_instructions.html.haml +3 -3
- data/app/views/devise_haml/mailer/reset_password_instructions.html.haml +5 -5
- data/app/views/devise_haml/mailer/unlock_instructions.html.haml +4 -4
- data/app/views/devise_haml/passwords/edit.html.haml +16 -17
- data/app/views/devise_haml/passwords/new.html.haml +10 -14
- data/app/views/devise_haml/registrations/edit.html.haml +32 -23
- data/app/views/devise_haml/registrations/new.html.haml +18 -18
- data/app/views/devise_haml/sessions/new.html.haml +20 -20
- data/app/views/devise_haml/shared/_error_messages.html.haml +9 -0
- data/app/views/devise_haml/shared/_foundation_layout.html.haml +7 -0
- data/app/views/devise_haml/shared/_links.html.haml +20 -19
- data/app/views/devise_haml/unlocks/new.html.haml +10 -14
- data/app/views/devise_slim/confirmations/new.html.slim +10 -14
- data/app/views/devise_slim/mailer/confirmation_instructions.html.slim +3 -4
- data/app/views/devise_slim/mailer/reset_password_instructions.html.slim +5 -6
- data/app/views/devise_slim/mailer/unlock_instructions.html.slim +4 -4
- data/app/views/devise_slim/passwords/edit.html.slim +16 -18
- data/app/views/devise_slim/passwords/new.html.slim +10 -14
- data/app/views/devise_slim/registrations/edit.html.slim +32 -24
- data/app/views/devise_slim/registrations/new.html.slim +18 -19
- data/app/views/devise_slim/sessions/new.html.slim +20 -20
- data/app/views/devise_slim/shared/_error_messages.html.slim +9 -0
- data/app/views/devise_slim/shared/_foundation_layout.html.slim +7 -0
- data/app/views/devise_slim/shared/_links.html.slim +20 -19
- data/app/views/devise_slim/unlocks/new.html.slim +10 -15
- data/bin/console +8 -0
- data/bin/setup +5 -0
- data/devise-foundation-views.gemspec +28 -17
- data/lib/devise-foundation-views.rb +16 -19
- data/lib/devise_foundation_views_helper.rb +3 -17
- data/lib/devise_layout_helper.rb +18 -0
- data/lib/generators/devise/views/foundation_layout/foundation_layout_generator.rb +34 -0
- data/lib/generators/devise/views/foundation_layout/templates/layouts/devise.html.erb +37 -0
- data/lib/generators/devise/views/foundation_templates/foundation_templates_generator.rb +19 -15
- data/lib/version.rb +3 -1
- data/locales/uk.yml +1 -1
- metadata +108 -19
- data/.travis.yml +0 -8
|
@@ -1,10 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// Foundation 6 styles for Devise forms (host app must include Foundation CSS).
|
|
2
|
+
.devise-foundation-views {
|
|
3
|
+
margin: 2rem 0;
|
|
4
|
+
|
|
5
|
+
.devise-form-card {
|
|
6
|
+
background: #fff;
|
|
7
|
+
border: 1px solid #e6e6e6;
|
|
8
|
+
border-radius: 0.25rem;
|
|
9
|
+
padding: 2rem 1.5rem 1.5rem;
|
|
10
|
+
margin-bottom: 1rem;
|
|
11
|
+
|
|
12
|
+
h2 {
|
|
13
|
+
margin-bottom: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
label {
|
|
17
|
+
display: block;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
margin-bottom: 0.35rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input[type="email"],
|
|
23
|
+
input[type="password"],
|
|
24
|
+
input[type="text"],
|
|
25
|
+
input[type="tel"] {
|
|
26
|
+
width: 100%;
|
|
27
|
+
margin-bottom: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.cell {
|
|
31
|
+
margin-bottom: 1.25rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.help-text {
|
|
35
|
+
margin-top: -0.5rem;
|
|
36
|
+
margin-bottom: 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.button.expanded {
|
|
40
|
+
margin-top: 0.5rem;
|
|
41
|
+
margin-bottom: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
4
44
|
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
padding: 40px 20px 0 20px;
|
|
45
|
+
.devise-links {
|
|
46
|
+
margin-top: 1.5rem;
|
|
47
|
+
line-height: 1.8;
|
|
48
|
+
}
|
|
10
49
|
}
|
|
@@ -1,9 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Foundation 6 styles for Devise forms (host app must include Foundation CSS).
|
|
2
|
+
.devise-foundation-views {
|
|
3
|
+
margin: 2rem 0;
|
|
4
|
+
|
|
5
|
+
.devise-form-card {
|
|
6
|
+
background: #fff;
|
|
7
|
+
border: 1px solid #e6e6e6;
|
|
8
|
+
border-radius: 0.25rem;
|
|
9
|
+
padding: 2rem 1.5rem 1.5rem;
|
|
10
|
+
margin-bottom: 1rem;
|
|
11
|
+
|
|
12
|
+
h2 {
|
|
13
|
+
margin-bottom: 1.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
label {
|
|
17
|
+
display: block;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
margin-bottom: 0.35rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
input[type="email"],
|
|
23
|
+
input[type="password"],
|
|
24
|
+
input[type="text"],
|
|
25
|
+
input[type="tel"] {
|
|
26
|
+
width: 100%;
|
|
27
|
+
margin-bottom: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.cell {
|
|
31
|
+
margin-bottom: 1.25rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.help-text {
|
|
35
|
+
margin-top: -0.5rem;
|
|
36
|
+
margin-bottom: 0.5rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.button.expanded {
|
|
40
|
+
margin-top: 0.5rem;
|
|
41
|
+
margin-bottom: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.devise-links {
|
|
46
|
+
margin-top: 1.5rem;
|
|
47
|
+
line-height: 1.8;
|
|
48
|
+
}
|
|
3
49
|
}
|
|
4
|
-
.login-box {
|
|
5
|
-
background: #fff;
|
|
6
|
-
border: 1px solid #ddd;
|
|
7
|
-
margin: 100px 0;
|
|
8
|
-
padding: 40px 20px 0 20px;
|
|
9
|
-
}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<% end %>
|
|
20
|
-
</div>
|
|
21
|
-
<%= render "devise/shared/links" %>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".resend_confirmation_instructions", default: "Resend confirmation instructions") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
|
|
5
|
+
<div class="grid-x grid-padding-x">
|
|
6
|
+
<div class="cell">
|
|
7
|
+
<%= f.label :email %>
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="cell">
|
|
12
|
+
<%= f.submit t(".resend_confirmation_instructions", default: "Resend confirmation instructions"), class: "button expanded" %>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<%= render "devise/shared/links" %>
|
|
18
|
+
<% end %>
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
<p>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</p>
|
|
7
|
-
<p>
|
|
8
|
-
<%= link_to t('.action', :default => "Confirm my account"),
|
|
9
|
-
confirmation_url(@resource, :confirmation_token => @token, locale: I18n.locale) %>
|
|
10
|
-
</p>
|
|
1
|
+
<p><%= t(".welcome", email: @email, default: "Welcome #{@email}!") %></p>
|
|
2
|
+
|
|
3
|
+
<p><%= t(".instruction", default: "You can confirm your account email through the link below:") %></p>
|
|
4
|
+
|
|
5
|
+
<p><%= link_to t(".confirm_my_account", default: "Confirm my account"), confirmation_url(@resource, confirmation_token: @token) %></p>
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
<p><%= t(
|
|
2
|
-
|
|
3
|
-
<p>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<p>
|
|
10
|
-
<%= t('.instruction_2', :default => "If you didn't request this, please ignore this email.") %>
|
|
11
|
-
</p>
|
|
12
|
-
<p>
|
|
13
|
-
<%= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.") %>
|
|
14
|
-
</p>
|
|
1
|
+
<p><%= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!") %></p>
|
|
2
|
+
|
|
3
|
+
<p><%= t(".someone_requested_a_link", default: "Someone has requested a link to change your password. You can do this through the link below.") %></p>
|
|
4
|
+
|
|
5
|
+
<p><%= link_to t(".change_my_password", default: "Change my password"), edit_password_url(@resource, reset_password_token: @token) %></p>
|
|
6
|
+
|
|
7
|
+
<p><%= t(".if_you_didnt_request", default: "If you didn't request this, please ignore this email.") %></p>
|
|
8
|
+
<p><%= t(".password_wont_change", default: "Your password won't change until you access the link above and create a new one.") %></p>
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
<p>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<p>
|
|
8
|
-
<%= t('.instruction', :default => "Click the link below to unlock your account:") %>
|
|
9
|
-
</p>
|
|
10
|
-
<p>
|
|
11
|
-
<%= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => @resource.unlock_token, locale: I18n.locale) %>
|
|
12
|
-
</p>
|
|
1
|
+
<p><%= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!") %></p>
|
|
2
|
+
|
|
3
|
+
<p><%= t(".account_locked", default: "Your account has been locked due to an excessive number of unsuccessful sign in attempts.") %></p>
|
|
4
|
+
|
|
5
|
+
<p><%= t(".click_link_below", default: "Click the link below to unlock your account:") %></p>
|
|
6
|
+
|
|
7
|
+
<p><%= link_to t(".unlock_my_account", default: "Unlock my account"), unlock_url(@resource, unlock_token: @token) %></p>
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
</div>
|
|
25
|
-
<%= render "devise/shared/links" %>
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".change_your_password", default: "Change your password") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
<%= f.hidden_field :reset_password_token %>
|
|
5
|
+
|
|
6
|
+
<div class="grid-x grid-padding-x">
|
|
7
|
+
<div class="cell">
|
|
8
|
+
<%= f.label :password, t(".new_password", default: "New password") %>
|
|
9
|
+
<% if @minimum_password_length %>
|
|
10
|
+
<p class="help-text"><%= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)") %></p>
|
|
11
|
+
<% end %>
|
|
12
|
+
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="cell">
|
|
16
|
+
<%= f.label :password_confirmation, t(".confirm_new_password", default: "Confirm new password") %>
|
|
17
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="cell">
|
|
21
|
+
<%= f.submit t(".change_my_password", default: "Change my password"), class: "button expanded" %>
|
|
26
22
|
</div>
|
|
27
23
|
</div>
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
26
|
+
<%= render "devise/shared/links" %>
|
|
27
|
+
<% end %>
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div class="row">
|
|
14
|
-
<%= f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"%>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="row">
|
|
17
|
-
<%= f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: "button expand large-12 large-centered columns" %>
|
|
18
|
-
</div>
|
|
19
|
-
<% end %>
|
|
20
|
-
</div>
|
|
21
|
-
<%= render "devise/shared/links" %>
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".forgot_your_password", default: "Forgot your password?") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
|
|
5
|
+
<div class="grid-x grid-padding-x">
|
|
6
|
+
<div class="cell">
|
|
7
|
+
<%= f.label :email %>
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="cell">
|
|
12
|
+
<%= f.submit t(".send_me_reset_password_instructions", default: "Send me password reset instructions"), class: "button expanded" %>
|
|
22
13
|
</div>
|
|
23
14
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
<%= render "devise/shared/links" %>
|
|
18
|
+
<% end %>
|
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".title", resource: resource_class.model_name.human, default: "Edit #{resource_name.to_s.humanize}") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
|
|
5
|
+
<div class="grid-x grid-padding-x">
|
|
6
|
+
<div class="cell">
|
|
7
|
+
<%= f.label :email %>
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
12
|
+
<div class="cell">
|
|
13
|
+
<div class="callout warning">
|
|
14
|
+
<%= t(".currently_waiting_confirmation", email: resource.unconfirmed_email, default: "Currently waiting confirmation for: #{resource.unconfirmed_email}") %>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
18
|
+
|
|
19
|
+
<div class="cell">
|
|
20
|
+
<%= f.label :password %>
|
|
21
|
+
<p class="help-text"><%= t(".leave_blank_if_you_don_t_want_to_change_it", default: "(leave blank if you don't want to change it)") %></p>
|
|
22
|
+
<%= f.password_field :password, autocomplete: "new-password" %>
|
|
23
|
+
<% if @minimum_password_length %>
|
|
24
|
+
<p class="help-text"><%= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "#{@minimum_password_length} characters minimum") %></p>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<div class="cell">
|
|
29
|
+
<%= f.label :password_confirmation %>
|
|
30
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="cell">
|
|
34
|
+
<%= f.label :current_password %>
|
|
35
|
+
<p class="help-text"><%= t(".we_need_your_current_password_to_confirm_your_changes", default: "(we need your current password to confirm your changes)") %></p>
|
|
36
|
+
<%= f.password_field :current_password, autocomplete: "current-password" %>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="cell">
|
|
40
|
+
<%= f.submit t(".update", default: "Update"), class: "button expanded" %>
|
|
41
|
+
</div>
|
|
35
42
|
</div>
|
|
43
|
+
<% end %>
|
|
44
|
+
|
|
45
|
+
<div class="text-center">
|
|
46
|
+
<h3><%= t(".cancel_my_account", default: "Cancel my account") %></h3>
|
|
47
|
+
<p>
|
|
48
|
+
<%= t(".unhappy", default: "Unhappy") %>
|
|
49
|
+
<%= button_to t(".cancel_my_account", default: "Cancel my account"), registration_path(resource_name), data: { confirm: t(".are_you_sure", default: "Are you sure?"), turbo_confirm: t(".are_you_sure", default: "Are you sure?") }, method: :delete, class: "button alert expanded" %>
|
|
50
|
+
</p>
|
|
51
|
+
<%= link_to t(".back", default: "Back"), :back %>
|
|
36
52
|
</div>
|
|
37
|
-
|
|
53
|
+
<% end %>
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
</div>
|
|
27
|
-
<%= render "devise/shared/links" %>
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".sign_up", default: "Sign up") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
|
|
5
|
+
<div class="grid-x grid-padding-x">
|
|
6
|
+
<div class="cell">
|
|
7
|
+
<%= f.label :email %>
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="cell">
|
|
12
|
+
<%= f.label :password %>
|
|
13
|
+
<% if @minimum_password_length %>
|
|
14
|
+
<p class="help-text"><%= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)") %></p>
|
|
15
|
+
<% end %>
|
|
16
|
+
<%= f.password_field :password, autocomplete: "new-password" %>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="cell">
|
|
20
|
+
<%= f.label :password_confirmation %>
|
|
21
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="cell">
|
|
25
|
+
<%= f.submit t(".sign_up", default: "Sign up"), class: "button expanded" %>
|
|
28
26
|
</div>
|
|
29
27
|
</div>
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
<% end %>
|
|
29
|
+
|
|
30
|
+
<%= render "devise/shared/links" %>
|
|
31
|
+
<% end %>
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
<%= render layout: "devise/shared/foundation_layout", locals: { title: t(".sign_in", default: "Log in") } do %>
|
|
2
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
|
3
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
|
4
|
+
|
|
5
|
+
<div class="grid-x grid-padding-x">
|
|
6
|
+
<div class="cell">
|
|
7
|
+
<%= f.label :email %>
|
|
8
|
+
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="cell">
|
|
12
|
+
<%= f.label :password %>
|
|
13
|
+
<%= f.password_field :password, autocomplete: "current-password" %>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<% if devise_mapping.rememberable? %>
|
|
17
|
+
<div class="cell">
|
|
18
|
+
<div class="grid-x align-middle">
|
|
19
|
+
<div class="cell shrink">
|
|
20
|
+
<%= f.check_box :remember_me %>
|
|
18
21
|
</div>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<%= f.check_box :remember_me %>
|
|
22
|
-
<%= f.label :remember_me %>
|
|
23
|
-
</div>
|
|
24
|
-
<% end %>
|
|
25
|
-
<div class="row">
|
|
26
|
-
<%= f.submit t('.sign_in', :default => "Sign in"), class: "button expand large-12 large-centered columns" %>
|
|
22
|
+
<div class="cell auto">
|
|
23
|
+
<%= f.label :remember_me %>
|
|
27
24
|
</div>
|
|
28
|
-
|
|
29
|
-
</div>
|
|
30
|
-
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
<div class="cell">
|
|
30
|
+
<%= f.submit t(".sign_in", default: "Log in"), class: "button expanded" %>
|
|
31
31
|
</div>
|
|
32
32
|
</div>
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
<% end %>
|
|
34
|
+
|
|
35
|
+
<%= render "devise/shared/links" %>
|
|
36
|
+
<% end %>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<% if resource.errors.any? %>
|
|
2
|
+
<div id="error_explanation" class="callout alert" data-closable role="alert">
|
|
3
|
+
<h2>
|
|
4
|
+
<%= I18n.t("errors.messages.not_saved",
|
|
5
|
+
count: resource.errors.count,
|
|
6
|
+
resource: resource.class.model_name.human.downcase) %>
|
|
7
|
+
</h2>
|
|
8
|
+
<ul class="no-bullet">
|
|
9
|
+
<% resource.errors.full_messages.each do |message| %>
|
|
10
|
+
<li><%= message %></li>
|
|
11
|
+
<% end %>
|
|
12
|
+
</ul>
|
|
13
|
+
<button class="close-button" aria-label="<%= t("devise.shared.error_messages.close", default: "Dismiss alert") %>" type="button" data-close>
|
|
14
|
+
<span aria-hidden="true">×</span>
|
|
15
|
+
</button>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="grid-container devise-foundation-views">
|
|
2
|
+
<div class="grid-x grid-padding-x align-center">
|
|
3
|
+
<div class="small-12 medium-8 large-5 cell">
|
|
4
|
+
<div class="devise-form-card">
|
|
5
|
+
<% if local_assigns[:title].present? %>
|
|
6
|
+
<h2 class="text-center devise-form-card__title"><%= title %></h2>
|
|
7
|
+
<% end %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<div class="devise-links text-center">
|
|
2
|
+
<%- if controller_name != 'sessions' %>
|
|
3
|
+
<%= link_to t(".sign_in", default: "Log in"), new_session_path(resource_name) %><br />
|
|
4
|
+
<% end %>
|
|
4
5
|
|
|
5
|
-
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
|
6
|
-
<%= link_to t(".sign_up", :
|
|
7
|
-
<% end
|
|
6
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
|
7
|
+
<%= link_to t(".sign_up", default: "Sign up"), new_registration_path(resource_name) %><br />
|
|
8
|
+
<% end %>
|
|
8
9
|
|
|
9
|
-
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
|
10
|
-
<%= link_to t(".forgot_your_password", :
|
|
11
|
-
<% end
|
|
10
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
|
11
|
+
<%= link_to t(".forgot_your_password", default: "Forgot your password?"), new_password_path(resource_name) %><br />
|
|
12
|
+
<% end %>
|
|
12
13
|
|
|
13
|
-
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
|
14
|
-
<%= link_to t(
|
|
15
|
-
<% end
|
|
14
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
|
15
|
+
<%= link_to t(".didn_t_receive_confirmation_instructions", default: "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name) %><br />
|
|
16
|
+
<% end %>
|
|
16
17
|
|
|
17
|
-
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
|
18
|
-
<%= link_to t(
|
|
19
|
-
<% end
|
|
18
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
|
19
|
+
<%= link_to t(".didn_t_receive_unlock_instructions", default: "Didn't receive unlock instructions?"), new_unlock_path(resource_name) %><br />
|
|
20
|
+
<% end %>
|
|
20
21
|
|
|
21
|
-
<%- if devise_mapping.omniauthable? %>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<% end
|
|
22
|
+
<%- if devise_mapping.omniauthable? %>
|
|
23
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
|
24
|
+
<%= button_to t(".sign_in_with_provider", provider: OmniAuth::Utils.camelize(provider), default: "Sign in with #{OmniAuth::Utils.camelize(provider)}"), omniauth_authorize_path(resource_name, provider), data: { turbo: false }, class: "button hollow expanded" %><br />
|
|
25
|
+
<% end %>
|
|
26
|
+
<% end %>
|
|
27
|
+
</div>
|