bootstrap_devise 0.0.4

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2699e14575e638fc88b50bc8d6b9d36f27f77b00bae4dd098b0cd4b4212a967d
4
+ data.tar.gz: 0607de0dbc42ddef9be4d03513586e62642f855e3444b46ef4eda092b32a6b46
5
+ SHA512:
6
+ metadata.gz: 341b79c5c6a04c608864dae8c962c49d602fc8898916124ce8b9cc974236cbbba7adb273fb4090c3854cfa6059effe973f16b08fe56435a9c2d687306111f1a2
7
+ data.tar.gz: 5d99614a87a33a2a24a59d620de84d5e8695757106749477577fc5e94244a6b0f110b3e7f87e6fc396b965bc263e015fa01677a45674ca1a9d59918ab05b2b20
@@ -0,0 +1,16 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <p><%= f.label :email %></p>
8
+ <p><%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %></p>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend confirmation instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,29 @@
1
+ <div class="d-flex justify-content-center pt-5 px-4 px-md-0">
2
+ <div class="col-12 col-md-6 col-lg-5">
3
+ <h2>Change your password</h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
6
+ <%= render "devise/shared/error_messages", resource: resource %>
7
+ <%= f.hidden_field :reset_password_token %>
8
+
9
+ <div class="mb-4">
10
+ <p><%= f.label :password, "New password", class: "form-control-label" %></p>
11
+ <% if @minimum_password_length %>
12
+ <p><em>(<%= @minimum_password_length %> characters minimum)</em></p>
13
+ <% end %>
14
+ <p><%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "form-control" %></p>
15
+ </div>
16
+
17
+ <div class="mb-4">
18
+ <p><%= f.label :password_confirmation, "Confirm new password", class: "form-control-label" %></p>
19
+ <p><%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %></p>
20
+ </div>
21
+
22
+ <div class="mb-4">
23
+ <%= f.submit "Change my password", class: "btn btn-primary" %>
24
+ </div>
25
+ <% end %>
26
+
27
+ <%= render "devise/shared/links" %>
28
+ </div>
29
+ </div>
@@ -0,0 +1,20 @@
1
+ <div class="d-flex justify-content-center pt-5 px-4 px-md-0">
2
+ <div class="col-12 col-md-6 col-lg-5">
3
+ <h2>Forgot your password?</h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
6
+ <%= render "devise/shared/error_messages", resource: resource %>
7
+
8
+ <div class="mb-4">
9
+ <p><%= f.label :email, class: "form-control-label" %></p>
10
+ <p><%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %></p>
11
+ </div>
12
+
13
+ <div class="mb-4">
14
+ <%= f.submit "Send me password reset instructions", class: "btn btn-primary" %>
15
+ </div>
16
+ <% end %>
17
+
18
+ <%= render "devise/shared/links" %>
19
+ </div>
20
+ </div>
@@ -0,0 +1,46 @@
1
+ <div class="d-flex justify-content-center pt-5 px-4 px-md-0">
2
+ <div class="col-12 col-md-6 col-lg-5">
3
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
6
+ <%= render "devise/shared/error_messages", resource: resource %>
7
+
8
+ <div class="mb-4">
9
+ <%= f.label :email, class: "form-control-label" %>
10
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
11
+ </div>
12
+
13
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
14
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
15
+ <% end %>
16
+
17
+ <div class="mb-4">
18
+ <%= f.label :password, class: "form-control-label" %> <i>(leave blank if you don't want to change it)</i>
19
+ <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
20
+ <% if @minimum_password_length %>
21
+ <em><%= @minimum_password_length %> characters minimum</em>
22
+ <% end %>
23
+ </div>
24
+
25
+ <div class="mb-4">
26
+ <%= f.label :password_confirmation, class: "form-control-label" %>
27
+ <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
28
+ </div>
29
+
30
+ <div class="mb-4">
31
+ <%= f.label :current_password, class: "form-control-label" %> <i>(we need your current password to confirm your changes)</i>
32
+ <%= f.password_field :current_password, autocomplete: "current-password", class: "form-control" %>
33
+ </div>
34
+
35
+ <div class="mb-4">
36
+ <%= f.submit "Update", class: "btn btn-primary" %>
37
+ </div>
38
+ <% end %>
39
+
40
+ <h3 class="mb-4">Cancel my account</h3>
41
+
42
+ <div class="mb-4 d-flex gap-2 align-items-center">Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger" %></div>
43
+
44
+ <%= link_to "Back", :back %>
45
+ </div>
46
+ </div>
@@ -0,0 +1,33 @@
1
+ <div class="d-flex justify-content-center pt-5 px-4 px-md-0">
2
+ <div class="col-12 col-md-6 col-lg-5">
3
+ <h2>Sign up</h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
6
+ <%= render "devise/shared/error_messages", resource: resource %>
7
+
8
+ <div class="mb-4">
9
+ <%= f.label :email, class: "form-control-label" %>
10
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
11
+ </div>
12
+
13
+ <div class="mb-4">
14
+ <%= f.label :password, class: "form-control-label" %>
15
+ <% if @minimum_password_length %>
16
+ <em>(<%= @minimum_password_length %> characters minimum)</em>
17
+ <% end %>
18
+ <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
19
+ </div>
20
+
21
+ <div class="mb-4">
22
+ <%= f.label :password_confirmation, class: "form-control-label" %>
23
+ <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
24
+ </div>
25
+
26
+ <div class="mb-4">
27
+ <%= f.submit "Sign up", class: "btn btn-primary" %>
28
+ </div>
29
+ <% end %>
30
+
31
+ <%= render "devise/shared/links" %>
32
+ </div>
33
+ </div>
@@ -0,0 +1,30 @@
1
+ <div class="d-flex justify-content-center pt-5 px-4 px-md-0">
2
+ <div class="col-12 col-md-6 col-lg-5">
3
+ <h2>Log in</h2>
4
+
5
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
6
+ <div class="mb-4">
7
+ <%= f.label :email, class: "form-label" %>
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
9
+ </div>
10
+
11
+ <div class="mb-4">
12
+ <%= f.label :password, class: "form-label" %>
13
+ <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %>
14
+ </div>
15
+
16
+ <% if devise_mapping.rememberable? %>
17
+ <div class="form-check mb-4">
18
+ <%= f.check_box :remember_me, { class: "form-check-input" }, 1, 0 %>
19
+ <%= f.label :remember_me, class: "form-check-label" %>
20
+ </div>
21
+ <% end %>
22
+
23
+ <div class="mb-4">
24
+ <%= f.submit "Log in", class: "btn btn-primary" %>
25
+ </div>
26
+ <% end %>
27
+
28
+ <%= render "devise/shared/links" %>
29
+ </div>
30
+ </div>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation" data-turbo-temporary>
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul>
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <p><%= link_to "Log in", new_session_path(resource_name) %></p>
3
+ <% end %>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <p><%= link_to "Sign up", new_registration_path(resource_name) %></p>
7
+ <% end %>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <p><%= link_to "Forgot your password?", new_password_path(resource_name) %></p>
11
+ <% end %>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <p><%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %></p>
15
+ <% end %>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <p><%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %></p>
19
+ <% end %>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <p><%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %></p>
24
+ <% end %>
25
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <p><%= f.label :email %></p>
8
+ <p><%= f.email_field :email, autofocus: true, autocomplete: "email" %></p>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend unlock instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,15 @@
1
+ require 'rails/generators/base'
2
+
3
+ module BootstrapDevise
4
+ class ViewsGenerator < Rails::Generators::Base
5
+ source_root File.expand_path('templates', __dir__)
6
+ desc "This generator adds the devise views styled with Bootstrap CSS"
7
+
8
+ def copy_devise_bootstrap_files_to_app
9
+ devise_folder_path = "#{Rails.root}/app/views/devise"
10
+ FileUtils.rm_rf(devise_folder_path)
11
+ FileUtils.mkdir_p(devise_folder_path)
12
+ directory 'devise', devise_folder_path
13
+ end
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bootstrap_devise
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Indigo
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: railties
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '7.0'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '7.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: thor
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.20.0
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.20.0
40
+ - !ruby/object:Gem::Dependency
41
+ name: rails
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '7.0'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '7.0'
54
+ description: Generate devise views for sign in and registration styled with Bootstrap
55
+ components
56
+ email: indigo@techtutorials.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/generators/bootstrap_devise/templates/devise/confirmations/new.html.erb
62
+ - lib/generators/bootstrap_devise/templates/devise/mailer/confirmation_instructions.html.erb
63
+ - lib/generators/bootstrap_devise/templates/devise/mailer/email_changed.html.erb
64
+ - lib/generators/bootstrap_devise/templates/devise/mailer/password_change.html.erb
65
+ - lib/generators/bootstrap_devise/templates/devise/mailer/reset_password_instructions.html.erb
66
+ - lib/generators/bootstrap_devise/templates/devise/mailer/unlock_instructions.html.erb
67
+ - lib/generators/bootstrap_devise/templates/devise/passwords/edit.html.erb
68
+ - lib/generators/bootstrap_devise/templates/devise/passwords/new.html.erb
69
+ - lib/generators/bootstrap_devise/templates/devise/registrations/edit.html.erb
70
+ - lib/generators/bootstrap_devise/templates/devise/registrations/new.html.erb
71
+ - lib/generators/bootstrap_devise/templates/devise/sessions/new.html.erb
72
+ - lib/generators/bootstrap_devise/templates/devise/shared/_error_messages.html.erb
73
+ - lib/generators/bootstrap_devise/templates/devise/shared/_links.html.erb
74
+ - lib/generators/bootstrap_devise/templates/devise/unlocks/new.html.erb
75
+ - lib/generators/bootstrap_devise/views_generator.rb
76
+ homepage: https://rubygems.org/gems/bootstrap_devise
77
+ licenses:
78
+ - MIT
79
+ metadata:
80
+ source_code_uri: https://github.com/indigotechtutorials/bootstrap-devise-gem
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubygems_version: 3.6.9
96
+ specification_version: 4
97
+ summary: Pretty devise sign in/sign up with Bootstrap
98
+ test_files: []