first commit, largely copied volunteers
This commit is contained in:
20
app/views/devise/confirmations/new.html.haml
Normal file
20
app/views/devise/confirmations/new.html.haml
Normal file
@ -0,0 +1,20 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center Resend Confirmation Instructions
|
||||
= form_for(resource, as: resource_name,
|
||||
url: confirmation_path(resource_name),
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" ,
|
||||
method: :post }) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.email_field :email, |
|
||||
autofocus: true, |
|
||||
autocomplete: "email", |
|
||||
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), |
|
||||
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" |
|
||||
.mb-4
|
||||
= f.submit "Resend Confirmation Info", |
|
||||
class: "button bg-cyan-700 hover:bg-cyan-500 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" |
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
14
app/views/devise/mailer/confirmation_instructions.html.haml
Normal file
14
app/views/devise/mailer/confirmation_instructions.html.haml
Normal file
@ -0,0 +1,14 @@
|
||||
%p
|
||||
Welcome #{@resource.name}!
|
||||
|
||||
%p You can confirm your stay through the link below:
|
||||
%p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token)
|
||||
|
||||
Remember you can change the dates later, under the Settings.
|
||||
|
||||
You can also set a profile and picture to tell others about yourself.
|
||||
And once at the Hub, you can add pictures and stories to share with others.
|
||||
|
||||
Looking forward to seeing you in person
|
||||
|
||||
The hub team
|
8
app/views/devise/mailer/email_changed.html.haml
Normal file
8
app/views/devise/mailer/email_changed.html.haml
Normal file
@ -0,0 +1,8 @@
|
||||
%p
|
||||
Hello #{@email}!
|
||||
- if @resource.try(:unconfirmed_email?)
|
||||
%p
|
||||
We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email}.
|
||||
- else
|
||||
%p
|
||||
We're contacting you to notify you that your email has been changed to #{@resource.email}.
|
3
app/views/devise/mailer/password_change.html.haml
Normal file
3
app/views/devise/mailer/password_change.html.haml
Normal file
@ -0,0 +1,3 @@
|
||||
%p
|
||||
Hello #{@resource.email}!
|
||||
%p We're contacting you to notify you that your password has been changed.
|
@ -0,0 +1,6 @@
|
||||
%p
|
||||
Hello #{@resource.email}!
|
||||
%p Someone has requested a link to change your password. You can do this through the link below.
|
||||
%p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token)
|
||||
%p If you didn't request this, please ignore this email.
|
||||
%p Your password won't change until you access the link above and create a new one.
|
5
app/views/devise/mailer/unlock_instructions.html.haml
Normal file
5
app/views/devise/mailer/unlock_instructions.html.haml
Normal file
@ -0,0 +1,5 @@
|
||||
%p
|
||||
Hello #{@resource.email}!
|
||||
%p Your account has been locked due to an excessive number of unsuccessful sign in attempts.
|
||||
%p Click the link below to unlock your account:
|
||||
%p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token)
|
32
app/views/devise/passwords/edit.html.haml
Normal file
32
app/views/devise/passwords/edit.html.haml
Normal file
@ -0,0 +1,32 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h2.font-hairline.mb-6.text-center Change Your Password
|
||||
= form_for(resource,
|
||||
as: resource_name,
|
||||
html: { method: :put, class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" },
|
||||
url: password_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
= f.hidden_field :reset_password_token
|
||||
.mb-4
|
||||
= f.label :password, "New Password",
|
||||
class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
- if @minimum_password_length
|
||||
%small
|
||||
%em.text-gray-600
|
||||
(#{@minimum_password_length} characters minimum)
|
||||
= f.password_field :password, |
|
||||
autofocus: true, |
|
||||
autocomplete: "new-password", |
|
||||
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
|
||||
.mb-4
|
||||
= f.label :password_confirmation,
|
||||
"Confirm New Password",
|
||||
class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :password_confirmation, |
|
||||
autocomplete: "off", |
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.submit "Change My Password", |
|
||||
class: "button bg-cyan-700 hover:bg-cyan-500 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full"
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
17
app/views/devise/passwords/new.html.haml
Normal file
17
app/views/devise/passwords/new.html.haml
Normal file
@ -0,0 +1,17 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center Forgot your password?
|
||||
= form_for(resource, as: resource_name,
|
||||
html: { method: :post,
|
||||
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" } ,
|
||||
url: password_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.email_field :email, autofocus: true, autocomplete: "email", |
|
||||
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" |
|
||||
.mb-4
|
||||
= f.submit "Send Password Reset Info", |
|
||||
class: "button bg-cyan-700 hover:bg-cyan-500 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full" |
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
32
app/views/devise/registrations/edit.html.haml
Normal file
32
app/views/devise/registrations/edit.html.haml
Normal file
@ -0,0 +1,32 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center.text-2xl
|
||||
Change password
|
||||
= form_for(resource, as: resource_name,
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
|
||||
method: :put } ,
|
||||
url: registration_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
||||
%div
|
||||
Currently waiting confirmation for: #{resource.unconfirmed_email}
|
||||
.mb-4
|
||||
= f.label :new_password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :password, autocomplete: "new-password", class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :password_confirmation, |
|
||||
autocomplete: "new-password", |
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" |
|
||||
.mb-4
|
||||
= f.label :current_password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :current_password, |
|
||||
autocomplete: "current-password", |
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" |
|
||||
.actions
|
||||
= f.submit "Update", class: "button bg-cyan-700 hover:bg-cyan-500 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
|
||||
.flex.justify-between
|
||||
%p
|
||||
%span= button_to "Delete my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete , class: button_classes
|
||||
%button{class: button_classes}
|
||||
= link_to "Back", :back
|
32
app/views/devise/registrations/edit_email.html.haml
Normal file
32
app/views/devise/registrations/edit_email.html.haml
Normal file
@ -0,0 +1,32 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center.text-2xl
|
||||
Change your email
|
||||
.text-center.text-lg
|
||||
(requires confirmation)
|
||||
= form_for(resource, as: resource_name,
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md",
|
||||
method: :put } ,
|
||||
url: registration_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
= f.label :new_email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
%br/
|
||||
= f.email_field :email, |
|
||||
autofocus: true, |
|
||||
autocomplete: "email", |
|
||||
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" |
|
||||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
||||
%div
|
||||
Currently waiting confirmation for: #{resource.unconfirmed_email}
|
||||
.mb-4
|
||||
= f.label :current_password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :current_password, |
|
||||
autocomplete: "current-password", |
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" |
|
||||
.actions
|
||||
= f.submit "Update", class: "button bg-cyan-700 hover:bg-cyan-500 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
|
||||
|
||||
= link_to :back do
|
||||
%button{class: button_classes}
|
||||
Back
|
51
app/views/devise/registrations/new.html.haml
Normal file
51
app/views/devise/registrations/new.html.haml
Normal file
@ -0,0 +1,51 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center.text-2xl Confirm your stay
|
||||
= form_for(resource, as: resource_name,
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" } ,
|
||||
url: registration_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
Please read the
|
||||
= link_to "house rules" , "/house_rules" , class: "underline"
|
||||
if you haven't yet, and let us know of
|
||||
any alergies (food?) or medical conditions (ADHD?) beforehand.
|
||||
.mb-4
|
||||
= f.label :name, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.input :name,
|
||||
placeholder: "Pekka",
|
||||
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.email_field :email,
|
||||
autocomplete: "email",
|
||||
placeholder: "user@example.com",
|
||||
class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
- if @minimum_password_length
|
||||
%small
|
||||
%em.text-gray-600
|
||||
(#{@minimum_password_length} characters minimum)
|
||||
= f.password_field :password,
|
||||
autocomplete: "new-password",
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.password_field :password_confirmation,
|
||||
autocomplete: "new-password",
|
||||
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
|
||||
.mt-4
|
||||
- challenge = rand(8)
|
||||
= simple_fields_for :bot do |n|
|
||||
= n.input :fudder , as: :hidden , input_html: { value: "#{challenge*2}" }
|
||||
= n.input :challenge, placeholder: "Anti bot question: #{challenge} + #{challenge + 1} == " ,
|
||||
class: " border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full"
|
||||
.my-4
|
||||
= f.submit "Sign Up",
|
||||
class: "button bg-cyan-700 hover:bg-cyan-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full"
|
||||
%p
|
||||
After submitting you will receive a confirmation email.
|
||||
Your place will be ensured once you have confirmed your email.
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
26
app/views/devise/sessions/new.html.haml
Normal file
26
app/views/devise/sessions/new.html.haml
Normal file
@ -0,0 +1,26 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs.md:max-w-md
|
||||
%h1.font-hairline.mb-6.text-center Log In
|
||||
= form_for(resource, url: session_path(resource_name),
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" },
|
||||
as: resource_name ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
= f.label :email, class: "block text-gray-700 text-sm font-bold mb-2"
|
||||
= f.email_field :email, autofocus: true, autocomplete: "email",
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight foucs:outline-none focus:shadow-outline"
|
||||
.mb-4
|
||||
= f.label :password, class: "block text-gray-700 text-sm font-bold mb-2"
|
||||
= f.password_field :password,
|
||||
autocomplete: "current-password",
|
||||
class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
|
||||
- if devise_mapping.rememberable?
|
||||
.mb-4
|
||||
= f.check_box :remember_me, class: "mr-2 leading-tight"
|
||||
= f.label :remember_me,
|
||||
class: "align-baseline inline-block text-gray-700 text-sm"
|
||||
.mb-4
|
||||
= f.submit "Log in",
|
||||
class: "button bg-cyan-700 hover:bg-cyan-500 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline w-full"
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
9
app/views/devise/shared/_error_messages.html.haml
Normal file
9
app/views/devise/shared/_error_messages.html.haml
Normal file
@ -0,0 +1,9 @@
|
||||
- if resource.errors.any?
|
||||
#error_explanation
|
||||
%h2.bg-red-100.border-l-4.border-red-500.mb-4.p-4.text-red-700.font-bold
|
||||
= I18n.t("errors.messages.not_saved",
|
||||
count: resource.errors.count,
|
||||
resource: resource.class.model_name.human.downcase)
|
||||
%ul
|
||||
- resource.errors.full_messages.each do |message|
|
||||
%li= message
|
2
app/views/devise/shared/_form_footer.html.haml
Normal file
2
app/views/devise/shared/_form_footer.html.haml
Normal file
@ -0,0 +1,2 @@
|
||||
%p.text-center.text-gray-500.text-xs
|
||||
Be a member of Hub Feenix
|
20
app/views/devise/shared/_links.html.haml
Normal file
20
app/views/devise/shared/_links.html.haml
Normal file
@ -0,0 +1,20 @@
|
||||
- if controller_name != 'sessions'
|
||||
= link_to "Log in", new_session_path(resource_name), |
|
||||
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" |
|
||||
%br/
|
||||
- if devise_mapping.registerable? && controller_name != 'registrations'
|
||||
= link_to "Sign up", new_registration_path(resource_name), |
|
||||
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" |
|
||||
%br/
|
||||
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
|
||||
= link_to "Forgot Password?", new_password_path(resource_name), |
|
||||
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" |
|
||||
%br/
|
||||
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||
= link_to "Didn't receive confirmation info?", new_confirmation_path(resource_name), |
|
||||
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" |
|
||||
%br/
|
||||
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
||||
= link_to "Didn't receive unlock info?", new_unlock_path(resource_name), |
|
||||
class: "inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800" |
|
||||
%br/
|
19
app/views/devise/unlocks/new.html.haml
Normal file
19
app/views/devise/unlocks/new.html.haml
Normal file
@ -0,0 +1,19 @@
|
||||
.flex.justify-center
|
||||
.w-full.max-w-xs
|
||||
%h1.font-hairline.mb-6.text-center Resend Unlock Info
|
||||
= form_for(resource, as: resource_name,
|
||||
html: { class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md" ,
|
||||
method: :post }
|
||||
url: unlock_path(resource_name) ) do |f|
|
||||
= render "devise/shared/error_messages", resource: resource
|
||||
.mb-4
|
||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||
= f.email_field :email, |
|
||||
autofocus: true, |
|
||||
autocomplete: "email", |
|
||||
class: "appearance-none border leading-tight focus:outline-none px-3 py-2 rounded shadow focus:shadow-outline text-gray-700 w-full" |
|
||||
.mb-4
|
||||
= f.submit "Resend unlock instructions", |
|
||||
class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" |
|
||||
= render "devise/shared/links"
|
||||
= render "devise/shared/form_footer"
|
Reference in New Issue
Block a user