add dates to signup
This commit is contained in:
parent
5a5f0585fb
commit
0605c1ea2f
@ -8,7 +8,7 @@ class ApplicationController < ActionController::Base
|
|||||||
protected
|
protected
|
||||||
|
|
||||||
def configure_permitted_parameters
|
def configure_permitted_parameters
|
||||||
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
|
devise_parameter_sanitizer.permit(:sign_up, keys: [:name , :arriving , :leaving])
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_not_authorized
|
def user_not_authorized
|
||||||
|
@ -23,7 +23,6 @@ class RegistrationsController < Devise::RegistrationsController
|
|||||||
|
|
||||||
def edit_email
|
def edit_email
|
||||||
build_resource
|
build_resource
|
||||||
puts "EDIT"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@ -32,7 +31,6 @@ class RegistrationsController < Devise::RegistrationsController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
puts "UPDATE"
|
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,7 +60,6 @@ class RegistrationsController < Devise::RegistrationsController
|
|||||||
|
|
||||||
# The path used after sign up.
|
# The path used after sign up.
|
||||||
def after_sign_up_path_for(resource)
|
def after_sign_up_path_for(resource)
|
||||||
puts "after sign up"
|
|
||||||
super(resource)
|
super(resource)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ class Member < ApplicationRecord
|
|||||||
|
|
||||||
validates :bio, length: { maximum: 1000 }
|
validates :bio, length: { maximum: 1000 }
|
||||||
validates :name , length: { minimum: 3 }
|
validates :name , length: { minimum: 3 }
|
||||||
|
validates_presence_of :arriving , :leaving
|
||||||
|
|
||||||
def admin
|
def admin
|
||||||
self.email == "torsten@villataika.fi"
|
self.email == "torsten@villataika.fi"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
.mb-4
|
.mb-4
|
||||||
= f.label :name, class: "block font-bold mb-2 text-gray-700 text-sm"
|
= f.label :name, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
= f.input :name,
|
= f.input :name,
|
||||||
placeholder: "Pekka Virtanen",
|
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"
|
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
|
.mb-4
|
||||||
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
@ -16,6 +16,14 @@
|
|||||||
autocomplete: "email",
|
autocomplete: "email",
|
||||||
placeholder: "user@example.com",
|
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"
|
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 :date, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
|
= f.date_field :arriving,
|
||||||
|
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 :date, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
|
= f.date_field :leaving,
|
||||||
|
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
|
.mb-4
|
||||||
= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm"
|
||||||
- if @minimum_password_length
|
- if @minimum_password_length
|
||||||
|
@ -18,6 +18,10 @@
|
|||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
Edit Profile
|
Edit Profile
|
||||||
|
|
||||||
|
= link_to edit_member_registration_path do
|
||||||
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
|
Change Password
|
||||||
|
|
||||||
= link_to new_story_path() do
|
= link_to new_story_path() do
|
||||||
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
|
||||||
New Story
|
New Story
|
||||||
|
Loading…
Reference in New Issue
Block a user