devise-bootstrap-form 0.4.0 → 1.0.0.alpha.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/CHANGELOG.md +1 -1
  4. data/CONTRIBUTING.md +16 -4
  5. data/Gemfile +0 -1
  6. data/README.md +44 -36
  7. data/app/views/devise/confirmations/new.html.erb +13 -19
  8. data/app/views/devise/invitations/edit.html.erb +10 -16
  9. data/app/views/devise/invitations/new.html.erb +8 -14
  10. data/app/views/devise/mailer/invitation_instructions.html.erb +1 -1
  11. data/app/views/devise/mailer/invitation_instructions.text.erb +1 -1
  12. data/app/views/devise/passwords/edit.html.erb +19 -25
  13. data/app/views/devise/passwords/new.html.erb +11 -18
  14. data/app/views/devise/registrations/edit.html.erb +20 -26
  15. data/app/views/devise/registrations/new.html.erb +16 -22
  16. data/app/views/devise/sessions/new.html.erb +15 -21
  17. data/app/views/devise/shared/_links.html.erb +5 -5
  18. data/app/views/devise/unlocks/new.html.erb +10 -16
  19. data/app/views/i18n/confirmations/new.html.erb +13 -19
  20. data/app/views/i18n/mailer/confirmation_instructions.html.erb +3 -3
  21. data/app/views/i18n/mailer/email_changed.html.erb +3 -3
  22. data/app/views/i18n/mailer/password_change.html.erb +2 -2
  23. data/app/views/i18n/mailer/reset_password_instructions.html.erb +5 -5
  24. data/app/views/i18n/mailer/unlock_instructions.html.erb +4 -4
  25. data/app/views/i18n/passwords/edit.html.erb +19 -25
  26. data/app/views/i18n/passwords/new.html.erb +10 -17
  27. data/app/views/i18n/registrations/edit.html.erb +20 -26
  28. data/app/views/i18n/registrations/new.html.erb +16 -22
  29. data/app/views/i18n/sessions/new.html.erb +15 -21
  30. data/app/views/i18n/shared/_links.html.erb +8 -8
  31. data/app/views/i18n/unlocks/new.html.erb +10 -16
  32. data/devise-bootstrap-form.gemspec +1 -1
  33. data/gemfiles/5.2.gemfile +14 -0
  34. data/gemfiles/6.0.gemfile +14 -0
  35. data/gemfiles/6.1.gemfile +14 -0
  36. data/gemfiles/7.0.gemfile +14 -0
  37. data/lib/devise_bootstrap_form/version.rb +2 -1
  38. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e648e6a37294388fe0ac3b168a71bb25b612a7a5c2044c9e14ad2fa52ac4f9d
4
- data.tar.gz: e35e50df2246d2a026e7314bc39324fb890e1b59eccf262cf895d770507246cd
3
+ metadata.gz: 15bc335b3fe1c26d69757d7f3a8f0ec576b256f46b28af3ed55704053cf223e5
4
+ data.tar.gz: 4f2c6270e99305531bd0b883e04adc0788860097a73441efa1398da785f5972d
5
5
  SHA512:
6
- metadata.gz: c25fe5579ee38bd3ecda497023f5f3a2b7775ca0816ef1f17206c057331576673dc15ff3f3bbadf68c6d0670f185853c37826661f6ef09022ee327f97a418594
7
- data.tar.gz: f68845e7b03738f5115e1ec79ab21ae87ee2e3a17a57068572f88ac212c1b56b9e782e8f99bbe19de18c22e3a67c719a37c83702a0c8fdf8506df97acf32ce17
6
+ metadata.gz: 301fc9fd13d272c6e2123c91a9e710c041eedac49dabc2f45e791431dfeea2a8638650ddc35c278f2cf0b57bb00d7b06930af5abb676240c412fa8d1881544fb
7
+ data.tar.gz: fba754597c59efe3ad7defe844bc0c4658d5e877586898d732993d2301f6feb40bf81840519c6ca2ba4848772f7efcbad27af626ef9389aae1bc7653b82bb7cb
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
+ *.gemfile.lock
4
5
  /_yardoc/
5
6
  /coverage/
6
7
  /doc/
@@ -9,6 +10,10 @@
9
10
  *.gem
10
11
  .cache/
11
12
 
13
+ .netrc
14
+ .node_repl_history
15
+ .yarnrc
16
+
12
17
  .vagrant/
13
18
  # For some reason, the test cases generate the mailer views in this directory,
14
19
  # as well as the `test/rails_app/app/views/devise/mailer` directory.
data/CHANGELOG.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  ### Bugfixes
12
12
 
13
- * None.
13
+ * Your contribution here!
14
14
 
15
15
  ## [0.4.0][] (2022-01-02)
16
16
 
data/CONTRIBUTING.md CHANGED
@@ -9,6 +9,8 @@ If you find a bug or have an idea for a feature:
9
9
 
10
10
  ## Testing
11
11
 
12
+ There are automated tests, and test apps that allow you do manual testing and explore the gem.
13
+
12
14
  ### Manual and Exploratory Testing
13
15
 
14
16
  There are test apps in `test/rails_app`, for the default locale, and `es_rails_app` for a Spanish locale.
@@ -23,18 +25,28 @@ rails s -b 0.0.0.0 &
23
25
  # Navigate to localhost:3000/people/sign_in
24
26
  ```
25
27
 
28
+ To change the version of Rails for the test app:
29
+
30
+ ```bash
31
+ export BUNDLE_GEMFILE=gemfiles/7.0.gemfile # change this to the version of Rails you need
32
+ bundle update
33
+ rails s -b 0.0.0.0 &
34
+ ```
35
+
26
36
  ### Automated Testing
27
37
 
28
- To run the tests and the RuboCop checks:
38
+ To test locally against a specific version of Rails, do the following:
29
39
 
30
40
  ```bash
31
- rake
41
+ export BUNDLE_GEMFILE=gemfiles/7.0.gemfile # change this to the version of Rails you need
42
+ bundle update
43
+ rake test
32
44
  ```
33
45
 
34
- To run just the tests:
46
+ To run the tests and the RuboCop checks, assuming you've set the `BUNDLE_GEMFILE` as above:
35
47
 
36
48
  ```bash
37
- rake test
49
+ rake
38
50
  ```
39
51
 
40
52
  ## Gotchas
data/Gemfile CHANGED
@@ -4,7 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in devise-bootstrap-form.gemspec
6
6
  gemspec
7
- # eval_gemfile("test/rails_app/Gemfile")
8
7
 
9
8
  group :development do
10
9
  gem "chandler", ">= 0.7.0"
data/README.md CHANGED
@@ -56,59 +56,67 @@ To switch back to what Devise gives you, remove the `app/views/devise` folder. Y
56
56
 
57
57
  ## Generated Layout
58
58
 
59
- Each of the forms in enclosed in the following:
59
+ The generated view is just like the default Devise, but any form elements (e.g. e-mail field) are created using the `bootstrap_form` helpers rather than the stock Rails helpers. This ensures that your Devise forms will have a consistent look with the rest of the forms in your application.
60
+
61
+ The generated view provides a pretty simple vertical layout. You can, and probably will, customize the generated views to your own tastes.
62
+
63
+ Here's what the sign in view looks like (internationalized version):
60
64
 
61
65
  ```html
62
- <div class="devise-bootstrap-form">
63
- <div class="devise-bootstrap-form-row">
64
- <div class="devise-bootstrap-form-col">
65
- <!-- the form... -->
66
- </div>
67
- </div>
66
+ <h2 class="text-center"><%= t(".sign_in") %></h2>
67
+ <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
68
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
69
+ <%= f.password_field :password, autocomplete: "current-password", placeholder: "Password" %>
70
+
71
+ <% if devise_mapping.rememberable? -%>
72
+ <%= f.form_group do %>
73
+ <%= f.check_box :remember_me %>
74
+ <% end %>
75
+ <% end -%>
76
+
77
+ <%= f.form_group class: "d-grid" do %>
78
+ <%= f.submit t(".sign_in"), class: "btn btn-primary btn-lg" %>
79
+ <% end %>
80
+ <% end %>
81
+ <div class="text-center">
82
+ <%= render "devise/shared/links" %>
68
83
  </div>
69
84
  ```
70
85
 
71
- The generator also generates `app/assets/stylesheets/devise_bootstrap_form.scss` that contains the following:
86
+ ## Internationalization
72
87
 
73
- ```css
74
- .devise-bootstrap-form {
75
- @extend .container;
76
- }
88
+ If your `Gemfile` includes `devise-i18n`, `devise-bootstrap-form` will generate views with translations. If you're also using `devise_invitable`, you have to manually copy its translations into your application from the [`devise_invitable` wiki](https://github.com/scambra/devise_invitable/wiki/I18n).
77
89
 
78
- .devise-bootstrap-form-col {
79
- @extend .col-12;
80
- @extend .col-sm-8;
81
- @extend .col-lg-6;
82
- }
90
+ Also, don't forget to add `gem "rails-i18n"` to your `Gemfile`.
83
91
 
84
- .devise-bootstrap-form-row {
85
- @extend .row;
86
- @extend .justify-content-around;
87
- }
88
- ```
92
+ ## Differences from the Previous Version
89
93
 
90
- You may want to adjust to your own tastes. For example, if the layout used by your Devise views already wraps the view in a `.container`, you can remove the:
94
+ - The generator no longer provides styles to format the Devise pages.
95
+ - The generator no longer makes assumptions about the asset pipeline you're using, i.e. it doesn't assume you're using SASS, and it doesn't modify `app/assets/stylesheets/application.scss`.
96
+ - The views are no longer wrapped in rows and columns. Out of the box the views are easier to drop into whatever formatting and layout you want.
97
+ - Bootstrap 5 dropped the `btn-block` class, and `devise-bootstrap-form` used it on the default button in each view. See below for the view change.
91
98
 
92
- ```css
93
- .devise-bootstrap-form {
94
- @extend .container;
95
- }
96
- ```
99
+ ### Changes in the Generated Views
97
100
 
98
- from `app/assets/stylesheets/devise_bootstrap_form.scss`.
101
+ Each view has a submit button, and the Bootstrap 4 mark-up looks like this:
99
102
 
100
- You can also modify the views to change the surrounding `div`s to your needs, or change the SASS in `app/assets/stylesheets/devise_bootstrap_form.scss`.
103
+ ```ruby
104
+ <%= f.form_group do %>
105
+ <%= f.submit t('.sign_up'), class: "btn btn-primary btn-block btn-lg" %>
106
+ <% end %>
107
+ ```
101
108
 
102
- If you don't want the `devise_bootstrap_form`-generated styles at all, remove the following line from `app/asserts/application.scss`:
109
+ With Bootstrap 5, it looks like this:
103
110
 
104
- ```css
105
- @include "devise_bootstrap_form.scss";
111
+ ```ruby
112
+ <%= f.form_group class: "d-grid" do %>
113
+ <%= f.submit t(".sign_up"), class: "btn btn-primary btn-lg" %>
114
+ <% end %>
106
115
  ```
107
116
 
108
- ## Internationalization
109
- If your `Gemfile` includes `devise-i18n`, `devise-bootstrap-form` will generate views with translations. If you're also using `devise_invitable`, you have to manually copy its translations into your application from the [`devise_invitable` wiki](https://github.com/scambra/devise_invitable/wiki/I18n).
117
+ ## Upgrading an Existing App to Bootstrap 5
110
118
 
111
- Also, don't forget to add `gem "rails-i18n"` to your `Gemfile`.
119
+ If you're upgrading an existing app to Bootstrap 5, it's probably easiest to just apply the [changes to the views](changes-in-the-generated-views) manually. The only time it would be worthwhile to regenerate the Bootstrap 5 forms would be if hadn't modified the generated forms.
112
120
 
113
121
  ## Contributing
114
122
 
@@ -1,23 +1,17 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Resend confirmation instructions</h2>
1
+ <h2 class="text-center">Resend confirmation instructions</h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
8
5
 
9
- <%= f.email_field :email,
10
- autofocus: true,
11
- autocomplete: "email",
12
- value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
13
- <%= f.form_group do %>
14
- <%= f.submit "Resend confirmation instructions", class: 'btn btn-primary btn-lg btn-block' %>
15
- <% end %>
16
- <% end %>
6
+ <%= f.email_field :email,
7
+ autofocus: true,
8
+ autocomplete: "email",
9
+ value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
10
+ <%= f.form_group class: "d-grid" do %>
11
+ <%= f.submit "Resend confirmation instructions", class: "btn btn-primary btn-lg btn-block" %>
12
+ <% end %>
13
+ <% end %>
17
14
 
18
- <div class="text-center">
19
- <%= render "devise/shared/links" %>
20
- </div>
21
- </div>
22
- </div>
15
+ <div class="text-center">
16
+ <%= render "devise/shared/links" %>
23
17
  </div>
@@ -1,19 +1,13 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2><%= t 'devise.invitations.edit.header' %></h2>
1
+ <h2><%= t "devise.invitations.edit.header" %></h2>
5
2
 
6
- <%= bootstrap_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
8
- <%= f.hidden_field :invitation_token, readonly: true %>
3
+ <%= bootstrap_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :invitation_token, readonly: true %>
9
6
 
10
- <% if f.object.class.require_password_on_accepting %>
11
- <%= f.password_field :password %>
12
- <%= f.password_field :password_confirmation, class: "required" %>
13
- <% end %>
7
+ <% if f.object.class.require_password_on_accepting %>
8
+ <%= f.password_field :password %>
9
+ <%= f.password_field :password_confirmation, class: "required" %>
10
+ <% end %>
14
11
 
15
- <%= f.submit t("devise.invitations.edit.submit_button"), class: "btn btn-primary btn-lg btn-block" %>
16
- <% end %>
17
- </div>
18
- </div>
19
- </div>
12
+ <%= f.submit t("devise.invitations.edit.submit_button"), class: "btn btn-primary btn-lg btn-block" %>
13
+ <% end %>
@@ -1,17 +1,11 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t "devise.invitations.new.header" %></h2>
1
+ <h2 class="text-center"><%= t "devise.invitations.new.header" %></h2>
5
2
 
6
- <%= bootstrap_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
3
+ <%= bootstrap_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :post} do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
8
5
 
9
- <% resource.class.invite_key_fields.each do |field| -%>
10
- <%= f.text_field field %>
11
- <% end -%>
6
+ <% resource.class.invite_key_fields.each do |field| -%>
7
+ <%= f.text_field field %>
8
+ <% end -%>
12
9
 
13
- <%= f.submit t("devise.invitations.new.submit_button"), class: "btn btn-primary btn-lg btn-block" %>
14
- <% end %>
15
- </div>
16
- </div>
17
- </div>
10
+ <%= f.submit t("devise.invitations.new.submit_button"), class: "btn btn-primary btn-lg btn-block" %>
11
+ <% end %>
@@ -5,7 +5,7 @@
5
5
  <p><%= link_to t("devise.mailer.invitation_instructions.accept"), accept_invitation_url(@resource, :invitation_token => @token) %></p>
6
6
 
7
7
  <% if @resource.invitation_due_at %>
8
- <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %></p>
8
+ <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :"devise.mailer.invitation_instructions.accept_until_format")) %></p>
9
9
  <% end %>
10
10
 
11
11
  <p><%= t("devise.mailer.invitation_instructions.ignore") %></p>
@@ -5,7 +5,7 @@
5
5
  <%= accept_invitation_url(@resource, :invitation_token => @token) %>
6
6
 
7
7
  <% if @resource.invitation_due_at %>
8
- <%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')) %>
8
+ <%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :"devise.mailer.invitation_instructions.accept_until_format")) %>
9
9
  <% end %>
10
10
 
11
11
  <%= t("devise.mailer.invitation_instructions.ignore") %>
@@ -1,29 +1,23 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Change your password</h2>
1
+ <h2 class="text-center">Change your password</h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
8
- <%= f.hidden_field :reset_password_token %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :reset_password_token %>
9
6
 
10
- <%= f.password_field :password,
11
- autofocus: true,
12
- autocomplete: "new-password",
13
- help: "(#{@minimum_password_length} characters minimum)",
14
- label: "New password" %>
15
- <%= f.password_field :password_confirmation,
16
- label: "Confirm new password",
17
- autocomplete: "off",
18
- class: "required" %>
19
- <%= f.form_group do %>
20
- <%= f.submit "Change my password", class: 'btn btn-primary btn-block btn-lg' %>
21
- <% end %>
22
- <% end %>
7
+ <%= f.password_field :password,
8
+ autofocus: true,
9
+ autocomplete: "new-password",
10
+ help: "(#{@minimum_password_length} characters minimum)",
11
+ label: "New password" %>
12
+ <%= f.password_field :password_confirmation,
13
+ label: "Confirm new password",
14
+ autocomplete: "off",
15
+ class: "required" %>
16
+ <%= f.form_group class: "d-grid" do %>
17
+ <%= f.submit "Change my password", class: "btn btn-primary btn-lg" %>
18
+ <% end %>
19
+ <% end %>
23
20
 
24
- <div class="text-center">
25
- <%= render "devise/shared/links" %>
26
- </div>
27
- </div>
28
- </div>
21
+ <div class="text-center">
22
+ <%= render "devise/shared/links" %>
29
23
  </div>
@@ -1,20 +1,13 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Forgot your password?</h2>
1
+ <h2 class="text-center">Forgot your password?</h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
8
- <br>
9
- <p class="text-left">Please enter your email address and we will send you a link to reset your password.</p>
10
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
11
- <%= f.form_group do %>
12
- <%= f.submit "Send me reset password instructions", class: 'btn btn-primary btn-block btn-lg' %>
13
- <% end %>
14
- <% end %>
15
- <div class="text-center">
16
- <%= render "devise/shared/links" %>
17
- </div>
18
- </div>
19
- </div>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <p class="text-left">Please enter your email address and we will send you a link to reset your password.</p>
6
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
+ <%= f.form_group class: "d-grid" do %>
8
+ <%= f.submit "Send me reset password instructions", class: "btn btn-primary btn-lg" %>
9
+ <% end %>
10
+ <% end %>
11
+ <div class="text-center">
12
+ <%= render "devise/shared/links" %>
20
13
  </div>
@@ -1,33 +1,27 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Edit <%= resource_name.to_s.humanize %></h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
6
- <%= render "devise/shared/error_messages", resource: resource %>
1
+ <h2 class="text-center">Edit <%= resource_name.to_s.humanize %></h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
3
+ <%= render "devise/shared/error_messages", resource: resource %>
7
4
 
8
- <%= f.email_field :email %>
5
+ <%= f.email_field :email %>
9
6
 
10
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
11
- <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
12
- <% end %>
7
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
8
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
9
+ <% end %>
13
10
 
14
- <%= f.password_field :password, autocomplete: "off", help: "leave blank if you don't want to change it" %>
15
- <%= f.password_field :password_confirmation, autocomplete: "off", class: "required" %>
16
- <%= f.password_field :current_password,
17
- autocomplete: "off",
18
- class: "required",
19
- help: "We need your current password to confirm your changes." %>
11
+ <%= f.password_field :password, autocomplete: "off", help: "leave blank if you don't want to change it" %>
12
+ <%= f.password_field :password_confirmation, autocomplete: "off", class: "required" %>
13
+ <%= f.password_field :current_password,
14
+ autocomplete: "off",
15
+ class: "required",
16
+ help: "We need your current password to confirm your changes." %>
20
17
 
21
- <%= f.form_group do %>
22
- <%= f.submit "Update", class: "btn btn-lg btn-block btn-primary" %>
23
- <% end %>
24
- <% end %>
18
+ <%= f.form_group class: "d-grid" do %>
19
+ <%= f.submit "Update", class: "btn btn-lg btn-primary" %>
20
+ <% end %>
21
+ <% end %>
25
22
 
26
- <h2>Cancel my account</h2>
23
+ <h2>Cancel my account</h2>
27
24
 
28
- <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), class: "btn btn-block btn-danger", data: { confirm: "Are you sure? You cannot undo this." }, method: :delete %></p>
25
+ <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), class: "btn btn-danger", data: { confirm: "Are you sure? You cannot undo this." }, method: :delete %></p>
29
26
 
30
- <%= link_to "Back", :back %>
31
- </div>
32
- </div>
33
- </div>
27
+ <%= link_to "Back", :back %>
@@ -1,25 +1,19 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Sign up</h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
6
- <%= render "devise/shared/error_messages", resource: resource %>
1
+ <h2 class="text-center">Sign up</h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
3
+ <%= render "devise/shared/error_messages", resource: resource %>
7
4
 
8
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
- <%= f.password_field :password,
10
- autocomplete: "new-password",
11
- help: "(#{@minimum_password_length} characters minimum)" %>
12
- <%= f.password_field :password_confirmation,
13
- autocomplete: "new-password",
14
- label_class: "required" %>
5
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
6
+ <%= f.password_field :password,
7
+ autocomplete: "new-password",
8
+ help: "(#{@minimum_password_length} characters minimum)" %>
9
+ <%= f.password_field :password_confirmation,
10
+ autocomplete: "new-password",
11
+ label_class: "required" %>
15
12
 
16
- <%= f.form_group do %>
17
- <%= f.submit "Sign up", class: "btn btn-primary btn-block btn-lg" %>
18
- <% end %>
19
- <% end %>
20
- <div class="text-center">
21
- <%= render "devise/shared/links" %>
22
- </div>
23
- </div>
24
- </div>
13
+ <%= f.form_group class: "d-grid" do %>
14
+ <%= f.submit "Sign up", class: "btn btn-primary btn-lg" %>
15
+ <% end %>
16
+ <% end %>
17
+ <div class="text-center">
18
+ <%= render "devise/shared/links" %>
25
19
  </div>
@@ -1,24 +1,18 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Log in</h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
6
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
- <%= f.password_field :password, autocomplete: "current-password", placeholder: 'Password' %>
1
+ <h2 class="text-center">Log in</h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
3
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
4
+ <%= f.password_field :password, autocomplete: "current-password", placeholder: "Password" %>
8
5
 
9
- <% if devise_mapping.rememberable? -%>
10
- <%= f.form_group do %>
11
- <%= f.check_box :remember_me %>
12
- <% end %>
13
- <% end -%>
6
+ <% if devise_mapping.rememberable? -%>
7
+ <%= f.form_group do %>
8
+ <%= f.check_box :remember_me %>
9
+ <% end %>
10
+ <% end -%>
14
11
 
15
- <%= f.form_group do %>
16
- <%= f.submit "Log in", class: "btn btn-primary btn-block btn-lg" %>
17
- <% end %>
18
- <% end %>
19
- <div class="text-center">
20
- <%= render "devise/shared/links" %>
21
- </div>
22
- </div>
23
- </div>
12
+ <%= f.form_group class: "d-grid" do %>
13
+ <%= f.submit "Log in", class: "btn btn-primary btn-lg" %>
14
+ <% end %>
15
+ <% end %>
16
+ <div class="text-center">
17
+ <%= render "devise/shared/links" %>
24
18
  </div>
@@ -1,20 +1,20 @@
1
- <%- if controller_name != 'sessions' %>
1
+ <%- if controller_name != "sessions" %>
2
2
  <%= link_to "Log in", new_session_path(resource_name) %><br />
3
3
  <% end -%>
4
4
 
5
- <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
5
+ <%- if devise_mapping.registerable? && controller_name != "registrations" %>
6
6
  <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
7
  <% end -%>
8
8
 
9
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
9
+ <%- if devise_mapping.recoverable? && controller_name != "passwords" && controller_name != "registrations" %>
10
10
  <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
11
  <% end -%>
12
12
 
13
- <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
13
+ <%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
14
14
  <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
15
  <% end -%>
16
16
 
17
- <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks" %>
18
18
  <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
19
  <% end -%>
20
20
 
@@ -1,20 +1,14 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">Resend unlock instructions</h2>
1
+ <h2 class="text-center">Resend unlock instructions</h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
8
5
 
9
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
10
- <%= f.form_group do %>
11
- <%= f.submit "Resend unlock instructions", class: "btn btn-primary btn-block btn-lg" %>
12
- <% end %>
13
- <% end %>
6
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
+ <%= f.form_group class: "d-grid" do %>
8
+ <%= f.submit "Resend unlock instructions", class: "btn btn-primary btn-lg" %>
9
+ <% end %>
10
+ <% end %>
14
11
 
15
- <div class="text-center">
16
- <%= render "devise/shared/links" %>
17
- </div>
18
- </div>
19
- </div>
12
+ <div class="text-center">
13
+ <%= render "devise/shared/links" %>
20
14
  </div>
@@ -1,23 +1,17 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.resend_confirmation_instructions') %></h2>
1
+ <h2 class="text-center"><%= t(".resend_confirmation_instructions") %></h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
8
5
 
9
- <%= f.email_field :email,
10
- autofocus: true,
11
- autocomplete: "email",
12
- value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
13
- <%= f.form_group do %>
14
- <%= f.submit t('.resend_confirmation_instructions'), class: 'btn btn-primary btn-lg btn-block' %>
15
- <% end %>
16
- <% end %>
6
+ <%= f.email_field :email,
7
+ autofocus: true,
8
+ autocomplete: "email",
9
+ value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
10
+ <%= f.form_group class: "d-grid" do %>
11
+ <%= f.submit t(".resend_confirmation_instructions"), class: "btn btn-primary btn-lg btn-block" %>
12
+ <% end %>
13
+ <% end %>
17
14
 
18
- <div class="text-center">
19
- <%= render "devise/shared/links" %>
20
- </div>
21
- </div>
22
- </div>
15
+ <div class="text-center">
16
+ <%= render "devise/shared/links" %>
23
17
  </div>
@@ -1,4 +1,4 @@
1
- <p><%= t('.greeting', recipient: @email) %></p>
1
+ <p><%= t(".greeting", recipient: @email) %></p>
2
2
 
3
- <p><%= t('.instruction') %></p>
4
- <p><%= link_to t('.action'), confirmation_url(@resource, confirmation_token: @token) %></p>
3
+ <p><%= t(".instruction") %></p>
4
+ <p><%= link_to t(".action"), confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -1,7 +1,7 @@
1
- <p><%= t('.greeting', recipient: @email) %></p>
1
+ <p><%= t(".greeting", recipient: @email) %></p>
2
2
 
3
3
  <% if @resource.try(:unconfirmed_email?) %>
4
- <p><%= t('.message', email: @resource.unconfirmed_email) %></p>
4
+ <p><%= t(".message", email: @resource.unconfirmed_email) %></p>
5
5
  <% else %>
6
- <p><%= t('.message', email: @resource.email) %></p>
6
+ <p><%= t(".message", email: @resource.email) %></p>
7
7
  <% end %>
@@ -1,3 +1,3 @@
1
- <p><%= t('.greeting', recipient: @resource.email) %></p>
1
+ <p><%= t(".greeting", recipient: @resource.email) %></p>
2
2
 
3
- <p><%= t('.message') %></p>
3
+ <p><%= t(".message") %></p>
@@ -1,8 +1,8 @@
1
- <p><%= t('.greeting', recipient: @resource.email) %></p>
1
+ <p><%= t(".greeting", recipient: @resource.email) %></p>
2
2
 
3
- <p><%= t('.instruction') %></p>
3
+ <p><%= t(".instruction") %></p>
4
4
 
5
- <p><%= link_to t('.action'), edit_password_url(@resource, reset_password_token: @token) %></p>
5
+ <p><%= link_to t(".action"), edit_password_url(@resource, reset_password_token: @token) %></p>
6
6
 
7
- <p><%= t('.instruction_2') %></p>
8
- <p><%= t('.instruction_3') %></p>
7
+ <p><%= t(".instruction_2") %></p>
8
+ <p><%= t(".instruction_3") %></p>
@@ -1,7 +1,7 @@
1
- <p><%= t('.greeting', recipient: @resource.email) %></p>
1
+ <p><%= t(".greeting", recipient: @resource.email) %></p>
2
2
 
3
- <p><%= t('.message') %></p>
3
+ <p><%= t(".message") %></p>
4
4
 
5
- <p><%= t('.instruction') %></p>
5
+ <p><%= t(".instruction") %></p>
6
6
 
7
- <p><%= link_to t('.action'), unlock_url(@resource, unlock_token: @token) %></p>
7
+ <p><%= link_to t(".action"), unlock_url(@resource, unlock_token: @token) %></p>
@@ -1,29 +1,23 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.change_your_password') %></h2>
1
+ <h2 class="text-center"><%= t(".change_your_password") %></h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
8
- <%= f.hidden_field :reset_password_token %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :reset_password_token %>
9
6
 
10
- <%= f.password_field :password,
11
- autofocus: true,
12
- autocomplete: "new-password",
13
- help: "t('devise.shared.minimum_password_length', count: @minimum_password_length)",
14
- label: t('.new_password') %>
15
- <%= f.password_field :password_confirmation,
16
- label: t('.confirm_new_password'),
17
- autocomplete: "off",
18
- class: "required" %>
19
- <%= f.form_group do %>
20
- <%= f.submit t('.change_my_password'), class: 'btn btn-primary btn-block btn-lg' %>
21
- <% end %>
22
- <% end %>
7
+ <%= f.password_field :password,
8
+ autofocus: true,
9
+ autocomplete: "new-password",
10
+ help: "t("devise.shared.minimum_password_length", count: @minimum_password_length)",
11
+ label: t(".new_password") %>
12
+ <%= f.password_field :password_confirmation,
13
+ label: t(".confirm_new_password"),
14
+ autocomplete: "off",
15
+ class: "required" %>
16
+ <%= f.form_group class: "d-grid" do %>
17
+ <%= f.submit t(".change_my_password"), class: "btn btn-primary btn-lg" %>
18
+ <% end %>
19
+ <% end %>
23
20
 
24
- <div class="text-center">
25
- <%= render "devise/shared/links" %>
26
- </div>
27
- </div>
28
- </div>
21
+ <div class="text-center">
22
+ <%= render "devise/shared/links" %>
29
23
  </div>
@@ -1,19 +1,12 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.forgot_your_password') %></h2>
1
+ <h2 class="text-center"><%= t(".forgot_your_password") %></h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
8
- <br>
9
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
10
- <%= f.form_group do %>
11
- <%= f.submit t('.send_me_reset_password_instructions'), class: 'btn btn-primary btn-block btn-lg' %>
12
- <% end %>
13
- <% end %>
14
- <div class="text-center">
15
- <%= render "devise/shared/links" %>
16
- </div>
17
- </div>
18
- </div>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
6
+ <%= f.form_group class: "d-grid" do %>
7
+ <%= f.submit t(".send_me_reset_password_instructions"), class: "btn btn-primary btn-lg" %>
8
+ <% end %>
9
+ <% end %>
10
+ <div class="text-center">
11
+ <%= render "devise/shared/links" %>
19
12
  </div>
@@ -1,33 +1,27 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center">t('.title', resource: resource_name.to_s.humanize)</h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
6
- <%= render "devise/shared/error_messages", resource: resource %>
1
+ <h2 class="text-center">t(".title", resource: resource_name.to_s.humanize)</h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
3
+ <%= render "devise/shared/error_messages", resource: resource %>
7
4
 
8
- <%= f.email_field :email %>
5
+ <%= f.email_field :email %>
9
6
 
10
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
11
- <div><%= t('.currently_waiting_confirmation_for_email', email: resource.unconfirmed_email) %></div>
12
- <% end %>
7
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
8
+ <div><%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %></div>
9
+ <% end %>
13
10
 
14
- <%= f.password_field :password, autocomplete: "off", help: t('.leave_blank_if_you_don_t_want_to_change_it') + " " + t('devise.shared.minimum_password_length', count: @minimum_password_length) %>
15
- <%= f.password_field :password_confirmation, autocomplete: "off", class: "required" %>
16
- <%= f.password_field :current_password,
17
- autocomplete: "off",
18
- class: "required",
19
- help: t('.we_need_your_current_password_to_confirm_your_changes') %>
11
+ <%= f.password_field :password, autocomplete: "off", help: t(".leave_blank_if_you_don_t_want_to_change_it") + " " + t("devise.shared.minimum_password_length", count: @minimum_password_length) %>
12
+ <%= f.password_field :password_confirmation, autocomplete: "off", class: "required" %>
13
+ <%= f.password_field :current_password,
14
+ autocomplete: "off",
15
+ class: "required",
16
+ help: t(".we_need_your_current_password_to_confirm_your_changes") %>
20
17
 
21
- <%= f.form_group do %>
22
- <%= f.submit t('.update'), class: "btn btn-lg btn-block btn-primary" %>
23
- <% end %>
24
- <% end %>
18
+ <%= f.form_group class: "d-grid" do %>
19
+ <%= f.submit t(".update"), class: "btn btn-lg btn-primary" %>
20
+ <% end %>
21
+ <% end %>
25
22
 
26
- <h2><%= t('.cancel_my_account') %></h2>
23
+ <h2><%= t(".cancel_my_account") %></h2>
27
24
 
28
- <p><%= t('.unhappy') %> <%= button_to t('.cancel_my_account'), registration_path(resource_name), class: "btn btn-block btn-danger", data: { confirm: t('.are_you_sure') }, method: :delete %></p>
25
+ <p><%= t(".unhappy") %> <%= button_to t(".cancel_my_account"), registration_path(resource_name), class: "btn btn-danger", data: { confirm: t(".are_you_sure") }, method: :delete %></p>
29
26
 
30
- <%= link_to t('devise.shared.links.back'), :back %>
31
- </div>
32
- </div>
33
- </div>
27
+ <%= link_to t("devise.shared.links.back"), :back %>
@@ -1,25 +1,19 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.sign_up') %></h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
6
- <%= render "devise/shared/error_messages", resource: resource %>
1
+ <h2 class="text-center"><%= t(".sign_up") %></h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
3
+ <%= render "devise/shared/error_messages", resource: resource %>
7
4
 
8
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
- <%= f.password_field :password,
10
- autocomplete: "new-password",
11
- help: t('devise.shared.minimum_password_length', count: @minimum_password_length) %>
12
- <%= f.password_field :password_confirmation,
13
- autocomplete: "new-password",
14
- label_class: "required" %>
5
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
6
+ <%= f.password_field :password,
7
+ autocomplete: "new-password",
8
+ help: t("devise.shared.minimum_password_length", count: @minimum_password_length) %>
9
+ <%= f.password_field :password_confirmation,
10
+ autocomplete: "new-password",
11
+ label_class: "required" %>
15
12
 
16
- <%= f.form_group do %>
17
- <%= f.submit t('.sign_up'), class: "btn btn-primary btn-block btn-lg" %>
18
- <% end %>
19
- <% end %>
20
- <div class="text-center">
21
- <%= render "devise/shared/links" %>
22
- </div>
23
- </div>
24
- </div>
13
+ <%= f.form_group class: "d-grid" do %>
14
+ <%= f.submit t(".sign_up"), class: "btn btn-primary btn-lg" %>
15
+ <% end %>
16
+ <% end %>
17
+ <div class="text-center">
18
+ <%= render "devise/shared/links" %>
25
19
  </div>
@@ -1,24 +1,18 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.sign_in') %></h2>
5
- <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
6
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
- <%= f.password_field :password, autocomplete: "current-password", placeholder: 'Password' %>
1
+ <h2 class="text-center"><%= t(".sign_in") %></h2>
2
+ <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
3
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
4
+ <%= f.password_field :password, autocomplete: "current-password", placeholder: "Password" %>
8
5
 
9
- <% if devise_mapping.rememberable? -%>
10
- <%= f.form_group do %>
11
- <%= f.check_box :remember_me %>
12
- <% end %>
13
- <% end -%>
6
+ <% if devise_mapping.rememberable? -%>
7
+ <%= f.form_group do %>
8
+ <%= f.check_box :remember_me %>
9
+ <% end %>
10
+ <% end -%>
14
11
 
15
- <%= f.form_group do %>
16
- <%= f.submit t('.sign_in'), class: "btn btn-primary btn-block btn-lg" %>
17
- <% end %>
18
- <% end %>
19
- <div class="text-center">
20
- <%= render "devise/shared/links" %>
21
- </div>
22
- </div>
23
- </div>
12
+ <%= f.form_group class: "d-grid" do %>
13
+ <%= f.submit t(".sign_in"), class: "btn btn-primary btn-lg" %>
14
+ <% end %>
15
+ <% end %>
16
+ <div class="text-center">
17
+ <%= render "devise/shared/links" %>
24
18
  </div>
@@ -1,25 +1,25 @@
1
- <%- if controller_name != 'sessions' %>
1
+ <%- if controller_name != "sessions" %>
2
2
  <%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
3
3
  <% end -%>
4
4
 
5
- <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
5
+ <%- if devise_mapping.registerable? && controller_name != "registrations" %>
6
6
  <%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
7
7
  <% end -%>
8
8
 
9
- <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
9
+ <%- if devise_mapping.recoverable? && controller_name != "passwords" && controller_name != "registrations" %>
10
10
  <%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br />
11
11
  <% end -%>
12
12
 
13
- <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br />
13
+ <%- if devise_mapping.confirmable? && controller_name != "confirmations" %>
14
+ <%= link_to t(".didn_t_receive_confirmation_instructions"), new_confirmation_path(resource_name) %><br />
15
15
  <% end -%>
16
16
 
17
- <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != "unlocks" %>
18
+ <%= link_to t(".didn_t_receive_unlock_instructions"), new_unlock_path(resource_name) %><br />
19
19
  <% end -%>
20
20
 
21
21
  <%- if devise_mapping.omniauthable? %>
22
22
  <%- resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
23
+ <%= link_to t(".sign_in_with_provider", provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
24
24
  <% end -%>
25
25
  <% end -%>
@@ -1,20 +1,14 @@
1
- <div class="devise-bootstrap-form">
2
- <div class="devise-bootstrap-form-row">
3
- <div class="devise-bootstrap-form-col">
4
- <h2 class="text-center"><%= t('.resend_unlock_instructions') %></h2>
1
+ <h2 class="text-center"><%= t(".resend_unlock_instructions") %></h2>
5
2
 
6
- <%= bootstrap_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
7
- <%= render "devise/shared/error_messages", resource: resource %>
3
+ <%= bootstrap_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
8
5
 
9
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
10
- <%= f.form_group do %>
11
- <%= f.submit t('.resend_unlock_instructions'), class: "btn btn-primary btn-block btn-lg" %>
12
- <% end %>
13
- <% end %>
6
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
+ <%= f.form_group class: "d-grid" do %>
8
+ <%= f.submit t(".resend_unlock_instructions"), class: "btn btn-primary btn-lg" %>
9
+ <% end %>
10
+ <% end %>
14
11
 
15
- <div class="text-center">
16
- <%= render "devise/shared/links" %>
17
- </div>
18
- </div>
19
- </div>
12
+ <div class="text-center">
13
+ <%= render "devise/shared/links" %>
20
14
  </div>
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
39
39
  spec.require_paths = ["lib"]
40
40
 
41
- spec.add_dependency "bootstrap_form", "~> 4.0"
41
+ spec.add_dependency "bootstrap_form", "~> 5.0"
42
42
  # Devise deprecated devise_error_messages! at 4.6.0, so for later versions
43
43
  # we add a new partial.
44
44
  spec.add_dependency "devise", ">= 4.6.0"
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in devise-bootstrap-form.gemspec
6
+ gemspec path: ".."
7
+
8
+ # Set a Rails version compatible with a Ruby version
9
+ gem "rails", "~> 5.2.0"
10
+
11
+ group :development do
12
+ gem "rubocop", require: false
13
+ gem "rubocop-rake", require: false
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in devise-bootstrap-form.gemspec
6
+ gemspec path: ".."
7
+
8
+ # Set a Rails version compatible with a Ruby version
9
+ gem "rails", "~> 6.0.0"
10
+
11
+ group :development do
12
+ gem "rubocop", require: false
13
+ gem "rubocop-rake", require: false
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in devise-bootstrap-form.gemspec
6
+ gemspec path: ".."
7
+
8
+ # Set a Rails version compatible with a Ruby version
9
+ gem "rails", "~> 6.1.0"
10
+
11
+ group :development do
12
+ gem "rubocop", require: false
13
+ gem "rubocop-rake", require: false
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in devise-bootstrap-form.gemspec
6
+ gemspec path: ".."
7
+
8
+ # Set a Rails version compatible with a Ruby version
9
+ gem "rails", "~> 7.0.1"
10
+
11
+ group :development do
12
+ gem "rubocop", require: false
13
+ gem "rubocop-rake", require: false
14
+ end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeviseBootstrapForm
4
- VERSION = "0.4.0"
4
+ # Bump major version if Bootstrap version changes our views.
5
+ VERSION = "1.0.0.alpha-1"
5
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-bootstrap-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0.alpha.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Larry Reid
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-03 00:00:00.000000000 Z
11
+ date: 2022-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap_form
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: devise
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +166,10 @@ files:
166
166
  - bin/console
167
167
  - bin/setup
168
168
  - devise-bootstrap-form.gemspec
169
+ - gemfiles/5.2.gemfile
170
+ - gemfiles/6.0.gemfile
171
+ - gemfiles/6.1.gemfile
172
+ - gemfiles/7.0.gemfile
169
173
  - lib/devise_bootstrap_form.rb
170
174
  - lib/devise_bootstrap_form/railtie.rb
171
175
  - lib/devise_bootstrap_form/version.rb
@@ -186,9 +190,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
190
  version: '2.6'
187
191
  required_rubygems_version: !ruby/object:Gem::Requirement
188
192
  requirements:
189
- - - ">="
193
+ - - ">"
190
194
  - !ruby/object:Gem::Version
191
- version: '0'
195
+ version: 1.3.1
192
196
  requirements: []
193
197
  rubygems_version: 3.2.32
194
198
  signing_key: