Use cms page for signup

This commit is contained in:
2015-03-19 13:46:47 +01:00
parent 0ceabcdac3
commit d4594f65f8
4 changed files with 10 additions and 13 deletions
@@ -7,6 +7,8 @@ class NewSuppliersController < ApplicationController
def new
@new_supplier = NewSupplier.new
@new_supplier.current_employee = current_employee
@page = Page.find_by_name_and_locale('suppliers-signup', I18n.locale.to_s)
@page ||= Page.new(title: 'Signup as a restaurant')
end
def create
@@ -18,6 +20,8 @@ class NewSuppliersController < ApplicationController
session[:supplier_id] = @new_supplier.supplier.try(:id)
redirect_to supplier_root_path(anchor: '/pages/introduction')
else
@page = Page.find_by_name_and_locale('suppliers-signup', I18n.locale.to_s)
@page ||= Page.new(title: 'Signup as a restaurant')
render 'new'
end
end
+4 -11
View File
@@ -1,15 +1,6 @@
h1.page-title= t 'devise.registrations.title'
h1.page-title== @page.title
.row
.small-12.columns
ul
li Its free!
li
span To try do the following
ul
li Create and setup a restaurant account
li Open the qr codes page displaying the qr-codes of your created tables
li Download the app on your phone to test as a user
li Scan a qr-code from you restaurant screen with your phone, and you can test ordering products!!!
.small-12.columns== @page.body
.row
.large-8.large-offset-1.columns
= form_for @new_supplier do |f|
@@ -38,4 +29,6 @@ h1.page-title= t 'devise.registrations.title'
.form-actions
= f.submit class: 'button'
.row
.small-12.columns== @page.footer
= render "devise/links", resource_name: :employee