bootstrap_views_generator 0.1.2 → 0.1.3
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 +4 -4
- data/README.md +6 -0
- data/bin/console +2 -2
- data/bootstrap_views_generator.gemspec +1 -0
- data/lib/bootstrap_views_generator/version.rb +1 -1
- data/lib/generators/bootstrap/devise_generator.rb +61 -0
- data/lib/generators/bootstrap/install_generator.rb +7 -1
- data/lib/generators/bootstrap/templates/devise/erb/confirmations/new.html.erb.tt +22 -0
- data/lib/generators/bootstrap/templates/devise/erb/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/bootstrap/templates/devise/erb/mailer/email_changed.html.erb +7 -0
- data/lib/generators/bootstrap/templates/devise/erb/mailer/password_change.html.erb +3 -0
- data/lib/generators/bootstrap/templates/devise/erb/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/bootstrap/templates/devise/erb/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/bootstrap/templates/devise/erb/passwords/edit.html.erb.tt +27 -0
- data/lib/generators/bootstrap/templates/devise/erb/passwords/new.html.erb.tt +25 -0
- data/lib/generators/bootstrap/templates/devise/erb/registrations/edit.html.erb.tt +42 -0
- data/lib/generators/bootstrap/templates/devise/erb/registrations/new.html.erb.tt +28 -0
- data/lib/generators/bootstrap/templates/devise/erb/sessions/new.html.erb.tt +34 -0
- data/lib/generators/bootstrap/templates/devise/erb/shared/_error_messages.html.erb +15 -0
- data/lib/generators/bootstrap/templates/devise/erb/shared/_links.html.erb +25 -0
- data/lib/generators/bootstrap/templates/devise/erb/unlocks/new.html.erb.tt +18 -0
- data/lib/generators/bootstrap/templates/devise/haml/confirmations/new.html.haml.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/haml/mailer/confirmation_instructions.html.haml +3 -0
- data/lib/generators/bootstrap/templates/devise/haml/mailer/email_changed.html.haml +7 -0
- data/lib/generators/bootstrap/templates/devise/haml/mailer/password_change.html.haml +2 -0
- data/lib/generators/bootstrap/templates/devise/haml/mailer/reset_password_instructions.html.haml +5 -0
- data/lib/generators/bootstrap/templates/devise/haml/mailer/unlock_instructions.html.haml +4 -0
- data/lib/generators/bootstrap/templates/devise/haml/passwords/edit.html.haml.tt +23 -0
- data/lib/generators/bootstrap/templates/devise/haml/passwords/new.html.haml.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/haml/registrations/edit.html.haml.tt +39 -0
- data/lib/generators/bootstrap/templates/devise/haml/registrations/new.html.haml.tt +19 -0
- data/lib/generators/bootstrap/templates/devise/haml/sessions/new.html.haml.tt +21 -0
- data/lib/generators/bootstrap/templates/devise/haml/shared/_error_messages.html.haml +7 -0
- data/lib/generators/bootstrap/templates/devise/haml/shared/_links.html.haml +19 -0
- data/lib/generators/bootstrap/templates/devise/haml/unlocks/new.html.haml.tt +14 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/confirmations/new.html.erb.tt +22 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/passwords/edit.html.erb.tt +18 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/passwords/new.html.erb.tt +21 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/registrations/edit.html.erb.tt +30 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/registrations/new.html.erb.tt +20 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/sessions/new.html.erb.tt +22 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/erb/unlocks/new.html.erb.tt +16 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/confirmations/new.html.haml.tt +16 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/passwords/edit.html.haml.tt +15 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/passwords/new.html.haml.tt +15 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/registrations/edit.html.haml.tt +26 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/registrations/new.html.haml.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/sessions/new.html.haml.tt +16 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/haml/unlocks/new.html.haml.tt +13 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/confirmations/new.html.slim.tt +16 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/passwords/edit.html.slim.tt +15 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/passwords/new.html.slim.tt +15 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/registrations/edit.html.slim.tt +26 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/registrations/new.html.slim.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/sessions/new.html.slim.tt +16 -0
- data/lib/generators/bootstrap/templates/devise/simple_form/slim/unlocks/new.html.slim.tt +13 -0
- data/lib/generators/bootstrap/templates/devise/slim/confirmations/new.html.slim.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/slim/mailer/confirmation_instructions.html.slim +3 -0
- data/lib/generators/bootstrap/templates/devise/slim/mailer/email_changed.html.slim +5 -0
- data/lib/generators/bootstrap/templates/devise/slim/mailer/password_change.html.slim +2 -0
- data/lib/generators/bootstrap/templates/devise/slim/mailer/reset_password_instructions.html.slim +5 -0
- data/lib/generators/bootstrap/templates/devise/slim/mailer/unlock_instructions.html.slim +4 -0
- data/lib/generators/bootstrap/templates/devise/slim/passwords/edit.html.slim.tt +22 -0
- data/lib/generators/bootstrap/templates/devise/slim/passwords/new.html.slim.tt +17 -0
- data/lib/generators/bootstrap/templates/devise/slim/registrations/edit.html.slim.tt +39 -0
- data/lib/generators/bootstrap/templates/devise/slim/registrations/new.html.slim.tt +19 -0
- data/lib/generators/bootstrap/templates/devise/slim/sessions/new.html.slim.tt +21 -0
- data/lib/generators/bootstrap/templates/devise/slim/shared/_error_messages.html.slim +7 -0
- data/lib/generators/bootstrap/templates/devise/slim/shared/_links.html.slim +19 -0
- data/lib/generators/bootstrap/templates/devise/slim/unlocks/new.html.slim.tt +14 -0
- metadata +66 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
- if controller_name != 'sessions'
|
|
2
|
+
= link_to 'Log in', new_session_path(resource_name)
|
|
3
|
+
%br
|
|
4
|
+
- if devise_mapping.registerable? && controller_name != 'registrations'
|
|
5
|
+
= link_to 'Sign up', new_registration_path(resource_name)
|
|
6
|
+
%br
|
|
7
|
+
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
|
8
|
+
= link_to 'Forgot your password?', new_password_path(resource_name)
|
|
9
|
+
%br
|
|
10
|
+
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
|
11
|
+
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
|
|
12
|
+
%br
|
|
13
|
+
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
|
14
|
+
= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
|
|
15
|
+
%br
|
|
16
|
+
- if devise_mapping.omniauthable?
|
|
17
|
+
- resource_class.omniauth_providers.each do |provider|
|
|
18
|
+
= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider)
|
|
19
|
+
%br
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
%h2.text-center= title("Resend unlock instructions")
|
|
3
|
+
<% else -%>
|
|
4
|
+
%h2.text-center Resend unlock instructions
|
|
5
|
+
<%- end %>
|
|
6
|
+
= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
|
|
7
|
+
= render 'devise/shared/error_messages', resource: resource
|
|
8
|
+
.field
|
|
9
|
+
= f.label :email
|
|
10
|
+
%br
|
|
11
|
+
= f.email_field :email, autofocus: true, autocomplete: 'email'
|
|
12
|
+
.form-group
|
|
13
|
+
= f.submit 'Resend unlock instructions'
|
|
14
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
<h2 class="text-center"><%%= title('Resend confirmation instructions') %></h2>
|
|
5
|
+
<% else -%>
|
|
6
|
+
<h2 class="text-center">Resend confirmation instructions</h2>
|
|
7
|
+
<%- end %>
|
|
8
|
+
<%%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
|
9
|
+
<%%= f.error_notification %>
|
|
10
|
+
<%%= f.full_error :confirmation_token %>
|
|
11
|
+
<div class="form-group">
|
|
12
|
+
<%%= f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), input_html: { autocomplete: "email" } %>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-group">
|
|
15
|
+
<%%= f.button :submit, 'Resend confirmation instructions', class: 'btn btn-primary btn-block btn-lg' %>
|
|
16
|
+
</div>
|
|
17
|
+
<%% end %>
|
|
18
|
+
<div class="text-center">
|
|
19
|
+
<%%= render 'devise/shared/links' %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
<h2 class="text-center"><%%= title('Change your password') %></h2>
|
|
3
|
+
<% else -%>
|
|
4
|
+
<h2 class="text-center">Change your password</h2>
|
|
5
|
+
<%- end %>
|
|
6
|
+
<%%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
|
7
|
+
<%%= f.error_notification %>
|
|
8
|
+
<%%= f.input :reset_password_token, as: :hidden %>
|
|
9
|
+
<%%= f.full_error :reset_password_token %>
|
|
10
|
+
<div class="form-group">
|
|
11
|
+
<%%= f.input :password, label: 'New password', required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" } %>
|
|
12
|
+
<%%= f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' } %>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-group">
|
|
15
|
+
<%%= f.button :submit, 'Change my password', class: 'btn btn-primary btn-block btn-lg' %>
|
|
16
|
+
</div>
|
|
17
|
+
<%% end %>
|
|
18
|
+
<%%= render 'devise/shared/links' %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
<h2 class="text-center"><%%= title('Forgot your password?') %></h2>
|
|
5
|
+
<% else -%>
|
|
6
|
+
<h2 class="text-center">Forgot your password?</h2>
|
|
7
|
+
<%- end %>
|
|
8
|
+
<%%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
|
9
|
+
<%%= f.error_notification %>
|
|
10
|
+
<div class="form-group">
|
|
11
|
+
<%%= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" } %>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="form-group">
|
|
14
|
+
<%%= f.button :submit, 'Send me reset password instructions', class: 'btn btn-primary btn-block btn-lg' %>
|
|
15
|
+
</div>
|
|
16
|
+
<%% end %>
|
|
17
|
+
<div class="text-center">
|
|
18
|
+
<%%= render 'devise/shared/links' %>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
<h2 class="text-center"><%%= title("Edit #{resource_name.to_s.humanize}") %></h2>
|
|
5
|
+
<% else -%>
|
|
6
|
+
<h2 class="text-center">Edit <%%= resource_name.to_s.humanize %></h2>
|
|
7
|
+
<%- end %>
|
|
8
|
+
<hr>
|
|
9
|
+
<%%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
|
10
|
+
<%%= f.error_notification %>
|
|
11
|
+
<div class="form-group">
|
|
12
|
+
<%%= f.input :email, required: true, autofocus: true %>
|
|
13
|
+
<%% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
|
14
|
+
<p>Currently waiting confirmation for: <%%= resource.unconfirmed_email %></p>
|
|
15
|
+
<%% end %>
|
|
16
|
+
<%%= f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' } %>
|
|
17
|
+
<%%= f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' } %>
|
|
18
|
+
<%%= f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' } %>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="form-group">
|
|
21
|
+
<%%= f.button :submit, 'Update', class: 'btn btn-primary btn-block btn-lg' %>
|
|
22
|
+
</div>
|
|
23
|
+
<%% end %>
|
|
24
|
+
<hr>
|
|
25
|
+
<h2>Cancel my account</h2>
|
|
26
|
+
<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>
|
|
27
|
+
<%%= link_to "Back", :back %>
|
|
28
|
+
<hr>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
<h2 class="text-center"><%%= title('Sign Up') %></h2>
|
|
5
|
+
<% else -%>
|
|
6
|
+
<h2 class="text-center">Sign Up</h2>
|
|
7
|
+
<%- end %>
|
|
8
|
+
<%%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
|
9
|
+
<%%= f.error_notification %>
|
|
10
|
+
<div class="form-group">
|
|
11
|
+
<%%= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }%>
|
|
12
|
+
<%%= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" } %>
|
|
13
|
+
<%%= f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" } %>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="form-group">
|
|
16
|
+
<%%= f.button :submit, 'Sign up', class: 'btn btn-primary btn-block btn-lg' %>
|
|
17
|
+
</div>
|
|
18
|
+
<%% end %>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-lg-4 col-md-6 ml-auto mr-auto">
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
<h2 class="text-center"><%%= title('Log In') %></h2>
|
|
5
|
+
<% else -%>
|
|
6
|
+
<h2 class="text-center">Log in</h2>
|
|
7
|
+
<%- end %>
|
|
8
|
+
<%%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
|
9
|
+
<div class="form-group">
|
|
10
|
+
<%%= f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' } %>
|
|
11
|
+
<%%= f.input :password, required: false, input_html: { autocomplete: 'current-password' } %>
|
|
12
|
+
<%%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="form-group">
|
|
15
|
+
<%%= f.button :submit, 'Log in', class: 'btn btn-primary btn-block btn-lg' %>
|
|
16
|
+
</div>
|
|
17
|
+
<%% end %>
|
|
18
|
+
<div class="text-center">
|
|
19
|
+
<%%= render 'devise/shared/links' %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
<h2 class="text-center"><%%= title("Resend unlock instructions") %></h2>
|
|
3
|
+
<% else -%>
|
|
4
|
+
<h2 class="text-center">Resend unlock instructions</h2>
|
|
5
|
+
<%- end %>
|
|
6
|
+
<%%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
|
7
|
+
<%%= f.error_notification %>
|
|
8
|
+
<%%= f.full_error :unlock_token %>
|
|
9
|
+
<div class="form-group">
|
|
10
|
+
<%%= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' } %>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="form-group">
|
|
13
|
+
<%%= f.button :submit, 'Resend unlock instructions', class: 'btn btn-primary btn-block btn-lg' %>
|
|
14
|
+
</div>
|
|
15
|
+
<%% end %>
|
|
16
|
+
<%%= render "devise/shared/links" %>
|
data/lib/generators/bootstrap/templates/devise/simple_form/haml/confirmations/new.html.haml.tt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
%h2.text-center= title('Resend confirmation instructions')
|
|
5
|
+
<% else -%>
|
|
6
|
+
%h2.text-center Resend confirmation instructions
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
= f.full_error :confirmation_token
|
|
11
|
+
.form-group
|
|
12
|
+
= f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), input_html: { autocomplete: "email" }
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Resend confirmation instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
.text-center
|
|
16
|
+
= render "devise/shared/links"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
%h2.text-center= title('Change your password')
|
|
3
|
+
<% else -%>
|
|
4
|
+
%h2.text-center Change your password
|
|
5
|
+
<%- end %>
|
|
6
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
|
7
|
+
= f.error_notification
|
|
8
|
+
= f.input :reset_password_token, as: :hidden
|
|
9
|
+
= f.full_error :reset_password_token
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :password, label: 'New password', required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
|
|
12
|
+
= f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' }
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Change my password', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
%h2.text-center= title('Forgot your password?')
|
|
5
|
+
<% else -%>
|
|
6
|
+
%h2.text-center Forgot your password?
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
|
|
12
|
+
.form-group
|
|
13
|
+
= f.button :submit, 'Send me reset password instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
14
|
+
.text-center
|
|
15
|
+
= render 'devise/shared/links'
|
data/lib/generators/bootstrap/templates/devise/simple_form/haml/registrations/edit.html.haml.tt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
%h2.text-center= title("Edit #{resource_name.to_s.humanize}")
|
|
5
|
+
<% else -%>
|
|
6
|
+
%h2.text-center Edit #{resource_name.to_s.humanize}
|
|
7
|
+
<%- end %>
|
|
8
|
+
%hr
|
|
9
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
|
10
|
+
= f.error_notification
|
|
11
|
+
.form-group
|
|
12
|
+
= f.input :email, required: true, autofocus: true
|
|
13
|
+
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
|
14
|
+
%p
|
|
15
|
+
Currently waiting confirmation for: #{resource.unconfirmed_email}
|
|
16
|
+
= f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' }
|
|
17
|
+
= f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' }
|
|
18
|
+
= f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' }
|
|
19
|
+
.form-group
|
|
20
|
+
= f.button :submit, 'Update', class: 'btn btn-primary btn-block btn-lg'
|
|
21
|
+
%hr
|
|
22
|
+
%h2 Cancel my account
|
|
23
|
+
%p
|
|
24
|
+
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}
|
|
25
|
+
= link_to "Back", :back
|
|
26
|
+
%hr
|
data/lib/generators/bootstrap/templates/devise/simple_form/haml/registrations/new.html.haml.tt
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
%h2.text-center= title("Sign Up")
|
|
5
|
+
<% else -%>
|
|
6
|
+
%h2.text-center Sign Up
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
|
|
12
|
+
= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
|
|
13
|
+
= f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" }
|
|
14
|
+
.form-group
|
|
15
|
+
= f.button :submit, 'Sign up', class: 'btn btn-primary btn-block btn-lg'
|
|
16
|
+
.text-center
|
|
17
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
%h2.text-center= title("Log in")
|
|
5
|
+
<% else -%>
|
|
6
|
+
%h2.text-center Log in
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
|
9
|
+
.form-group
|
|
10
|
+
= f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' }
|
|
11
|
+
= f.input :password, required: false, input_html: { autocomplete: 'current-password' }
|
|
12
|
+
= f.input :remember_me, as: :boolean if devise_mapping.rememberable?
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Log in', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
.text-center
|
|
16
|
+
= render "devise/shared/links"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
%h2.text-center= title("Resend unlock instructions")
|
|
3
|
+
<% else -%>
|
|
4
|
+
%h2.text-center Resend unlock instructions
|
|
5
|
+
<%- end %>
|
|
6
|
+
= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
|
|
7
|
+
= f.error_notification
|
|
8
|
+
= f.full_error :unlock_token
|
|
9
|
+
.form-group
|
|
10
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' }
|
|
11
|
+
.form-group
|
|
12
|
+
= f.button :submit, 'Resend unlock instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
13
|
+
= render 'devise/shared/links'
|
data/lib/generators/bootstrap/templates/devise/simple_form/slim/confirmations/new.html.slim.tt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Resend confirmation instructions')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Resend confirmation instructions
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
= f.full_error :confirmation_token
|
|
11
|
+
.form-group
|
|
12
|
+
= f.input :email, required: true, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), input_html: { autocomplete: "email" }
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Resend confirmation instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
.text-center
|
|
16
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
h2.text-center = title('Change your password')
|
|
3
|
+
<% else -%>
|
|
4
|
+
h2.text-center Change your password
|
|
5
|
+
<%- end %>
|
|
6
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
|
|
7
|
+
= f.error_notification
|
|
8
|
+
= f.input :reset_password_token, as: :hidden
|
|
9
|
+
= f.full_error :reset_password_token
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :password, label: 'New password', required: true, autofocus: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
|
|
12
|
+
= f.input :password_confirmation, label: 'Confirm your new password', required: true, input_html: { autocomplete: 'new-password' }
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Change my password', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Forgot your password?')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Forgot your password?
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
|
|
12
|
+
.form-group
|
|
13
|
+
= f.button :submit, 'Send me reset password instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
14
|
+
.text-center
|
|
15
|
+
= render 'devise/shared/links'
|
data/lib/generators/bootstrap/templates/devise/simple_form/slim/registrations/edit.html.slim.tt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title("Edit #{resource_name.to_s.humanize}")
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center = "Edit #{resource_name.to_s.humanize}"
|
|
7
|
+
<%- end %>
|
|
8
|
+
hr
|
|
9
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
|
10
|
+
= f.error_notification
|
|
11
|
+
.form-group
|
|
12
|
+
= f.input :email, required: true, autofocus: true
|
|
13
|
+
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
|
14
|
+
p = "Currently waiting confirmation for: #{resource.unconfirmed_email}"
|
|
15
|
+
= f.input :password, hint: "Leave it blank if you don't want to change it", required: false, input_html: { autocomplete: 'new-password' }
|
|
16
|
+
= f.input :password_confirmation, required: false, input_html: { autocomplete: 'new-password' }
|
|
17
|
+
= f.input :current_password, hint: 'We need your current password to confirm your changes', required: true, input_html: { autocomplete: 'current-password' }
|
|
18
|
+
.form-group
|
|
19
|
+
= f.button :submit, 'Update', class: 'btn btn-primary btn-block btn-lg'
|
|
20
|
+
hr
|
|
21
|
+
h2 Cancel my account
|
|
22
|
+
p
|
|
23
|
+
| Unhappy?
|
|
24
|
+
= button_to 'Cancel my account', registration_path(resource_name), class: 'btn btn-danger', data: { confirm: 'Are you sure? You cannot undo this.' }, method: :delete
|
|
25
|
+
= link_to 'Back', :back
|
|
26
|
+
hr
|
data/lib/generators/bootstrap/templates/devise/simple_form/slim/registrations/new.html.slim.tt
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Sign Up')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Sign Up
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
|
9
|
+
= f.error_notification
|
|
10
|
+
.form-group
|
|
11
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: "email" }
|
|
12
|
+
= f.input :password, required: true, hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length), input_html: { autocomplete: "new-password" }
|
|
13
|
+
= f.input :password_confirmation, required: true, input_html: { autocomplete: "new-password" }
|
|
14
|
+
.form-group
|
|
15
|
+
= f.button :submit, 'Sign up', class: 'btn btn-primary btn-block btn-lg'
|
|
16
|
+
.text-center
|
|
17
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Log in')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Log in
|
|
7
|
+
<%- end %>
|
|
8
|
+
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
|
9
|
+
.form-group
|
|
10
|
+
= f.input :email, required: false, autofocus: true, input_html: { autocomplete: 'email' }
|
|
11
|
+
= f.input :password, required: false, input_html: { autocomplete: 'current-password' }
|
|
12
|
+
= f.input :remember_me, as: :boolean if devise_mapping.rememberable?
|
|
13
|
+
.form-group
|
|
14
|
+
= f.button :submit, 'Log in', class: 'btn btn-primary btn-block btn-lg'
|
|
15
|
+
.text-center
|
|
16
|
+
= render "devise/shared/links"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
h2.text-center = title('Resend unlock instructions')
|
|
3
|
+
<% else -%>
|
|
4
|
+
h2.text-center Resend unlock instructions
|
|
5
|
+
<%- end %>
|
|
6
|
+
= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
|
|
7
|
+
= f.error_notification
|
|
8
|
+
= f.full_error :unlock_token
|
|
9
|
+
.form-group
|
|
10
|
+
= f.input :email, required: true, autofocus: true, input_html: { autocomplete: 'email' }
|
|
11
|
+
.form-group
|
|
12
|
+
= f.button :submit, 'Resend unlock instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
13
|
+
= render "devise/shared/links"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Resend confirmation instructions')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Resend confirmation instructions
|
|
7
|
+
<%- end %>
|
|
8
|
+
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= render "devise/shared/error_messages", resource: resource
|
|
10
|
+
.form-group
|
|
11
|
+
= f.label :email
|
|
12
|
+
br
|
|
13
|
+
= f.email_field :email, autofocus: true, class: 'form-control', value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
|
|
14
|
+
.form-group
|
|
15
|
+
= f.submit "Resend confirmation instructions", class: 'btn btn-primary btn-lg btn-block'
|
|
16
|
+
.text-center
|
|
17
|
+
= render 'devise/shared/links'
|
data/lib/generators/bootstrap/templates/devise/slim/mailer/reset_password_instructions.html.slim
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
p Hello #{@resource.email}!
|
|
2
|
+
p Someone has requested a link to change your password. You can do this through the link below.
|
|
3
|
+
p = link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
|
|
4
|
+
p If you didn't request this, please ignore this email.
|
|
5
|
+
p Your password won't change until you access the link above and create a new one.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<%- if options[:metatags] %>
|
|
2
|
+
h2.text-center = title('Change your password')
|
|
3
|
+
<% else -%>
|
|
4
|
+
h2.text-center Change your password
|
|
5
|
+
<%- end %>
|
|
6
|
+
= 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
|
|
9
|
+
.field
|
|
10
|
+
= f.label :password, 'New password'
|
|
11
|
+
br
|
|
12
|
+
- if @minimum_password_length
|
|
13
|
+
em = "(#{@minimum_password_length} characters minimum)"
|
|
14
|
+
br
|
|
15
|
+
= f.password_field :password, autofocus: true, autocomplete: 'new-password'
|
|
16
|
+
.field
|
|
17
|
+
= f.label :password_confirmation, 'Confirm new password'
|
|
18
|
+
br
|
|
19
|
+
= f.password_field :password_confirmation, autocomplete: 'off'
|
|
20
|
+
.actions
|
|
21
|
+
= f.submit 'Change my password'
|
|
22
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Forgot your password?')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Forgot your password?
|
|
7
|
+
<%- end %>
|
|
8
|
+
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
|
|
9
|
+
= render 'devise/shared/error_messages', resource: resource
|
|
10
|
+
br
|
|
11
|
+
p.text-left Please enter your email address and we will send you a link to reset your password.
|
|
12
|
+
.form-group
|
|
13
|
+
= f.email_field :email, autofocus: true, placeholder: 'Email Address', class: 'form-control'
|
|
14
|
+
.form-group
|
|
15
|
+
= f.submit 'Send me reset password instructions', class: 'btn btn-primary btn-block btn-lg'
|
|
16
|
+
.text-center
|
|
17
|
+
= render 'devise/shared/links'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title("Edit #{resource_name.to_s.humanize}")
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center = "Edit #{resource_name.to_s.humanize}"
|
|
7
|
+
<%- end %>
|
|
8
|
+
hr
|
|
9
|
+
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
|
10
|
+
= render 'devise/shared/error_messages', resource: resource
|
|
11
|
+
.form-group
|
|
12
|
+
= f.label :email
|
|
13
|
+
br
|
|
14
|
+
= f.email_field :email, class: 'form-control'
|
|
15
|
+
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
|
16
|
+
div = "Currently waiting confirmation for: #{resource.unconfirmed_email}"
|
|
17
|
+
.form-group
|
|
18
|
+
= f.label :password
|
|
19
|
+
i = "(Leave blank if you don't want to change it)"
|
|
20
|
+
br
|
|
21
|
+
= f.password_field :password, autocomplete: 'off', class: 'form-control'
|
|
22
|
+
.form-group
|
|
23
|
+
= f.label :password_confirmation
|
|
24
|
+
br
|
|
25
|
+
= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control'
|
|
26
|
+
.form-group
|
|
27
|
+
= f.label :current_password
|
|
28
|
+
i = "(We need your current password to confirm your changes)"
|
|
29
|
+
br
|
|
30
|
+
= f.password_field :current_password, autocomplete: 'off', class: 'form-control'
|
|
31
|
+
.form-group
|
|
32
|
+
= f.submit 'Update', class: 'btn btn-lg btn-block btn-primary'
|
|
33
|
+
hr
|
|
34
|
+
h2 Cancel my account
|
|
35
|
+
p
|
|
36
|
+
| Unhappy?
|
|
37
|
+
= button_to 'Cancel my account', registration_path(resource_name), class: 'btn btn-danger', data: { confirm: 'Are you sure? You cannot undo this.' }, method: :delete
|
|
38
|
+
= link_to 'Back', :back
|
|
39
|
+
hr
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Sign Up')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Sign Up
|
|
7
|
+
<%- end %>
|
|
8
|
+
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
|
9
|
+
= render "devise/shared/error_messages", resource: resource
|
|
10
|
+
.form-group
|
|
11
|
+
= f.email_field :email, autofocus: false, class: 'form-control', placeholder: "Email Address"
|
|
12
|
+
.form-group
|
|
13
|
+
= f.password_field :password, autocomplete: "off", class: 'form-control', placeholder: 'Password'
|
|
14
|
+
.form-group
|
|
15
|
+
= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control', placeholder: 'Confirm Password'
|
|
16
|
+
.form-group
|
|
17
|
+
= f.submit "Sign up", class: "btn btn-primary btn-block btn-lg"
|
|
18
|
+
.text-center
|
|
19
|
+
= render "devise/shared/links"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-lg-4.col-md-6.ml-auto.mr-auto
|
|
3
|
+
<%- if options[:metatags] %>
|
|
4
|
+
h2.text-center = title('Log in')
|
|
5
|
+
<% else -%>
|
|
6
|
+
h2.text-center Log in
|
|
7
|
+
<%- end %>
|
|
8
|
+
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
|
9
|
+
.form-group
|
|
10
|
+
= f.email_field :email, autofocus: true, placeholder: 'Email Address', class: 'form-control'
|
|
11
|
+
.form-group
|
|
12
|
+
= f.password_field :password, autocomplete: "off", placeholder: 'Password', class: 'form-control'
|
|
13
|
+
- if devise_mapping.rememberable?
|
|
14
|
+
.form-check
|
|
15
|
+
label.form-check-label
|
|
16
|
+
= f.check_box :remember_me, class: "form-check-input"
|
|
17
|
+
| Remember me
|
|
18
|
+
.form-group
|
|
19
|
+
= f.submit "Log in", class: "btn btn-primary btn-block btn-lg"
|
|
20
|
+
.text-center
|
|
21
|
+
= render "devise/shared/links"
|