Working and specced supplier signup
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require jquery.ui.all
|
||||
//= require bootstrap
|
||||
//= require_directory .
|
||||
//= require_self
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class ConfirmationsController < Devise::ConfirmationsController
|
||||
private
|
||||
|
||||
def after_confirmation_path_for(resource_name, resource)
|
||||
case resource_name
|
||||
when :supplier then supplier_settings_path
|
||||
else root_path
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -104,12 +104,12 @@ class Supplier
|
||||
end
|
||||
|
||||
# Send confirmation instructions by email
|
||||
def send_confirmation_instructions
|
||||
def send_confirmation_instructions(*args)
|
||||
self.confirmation_token = nil if reconfirmation_required?
|
||||
@reconfirmation_required = false
|
||||
|
||||
@bypass_postpone = true and generate_confirmation_token! if self.confirmation_token.blank?
|
||||
self.devise_mailer.confirmation_instructions(self).deliver
|
||||
self.devise_mailer.confirmation_instructions(self, confirmation_token).deliver
|
||||
end
|
||||
|
||||
def find_order(id)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
h2= t('devise.registrations.title')
|
||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls= f.text_field :name
|
||||
.control-group
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls= f.email_field :email
|
||||
.control-group
|
||||
= f.label :password, class: 'control-label'
|
||||
.controls= f.password_field :password
|
||||
.control-group
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.controls= f.password_field :password_confirmation
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.registrations.button'), class: 'btn btn-primary'
|
||||
= render "devise_links"
|
||||
Reference in New Issue
Block a user