Permalink
Browse files

config register.

  • Loading branch information...
1 parent 66a078d commit 57470ecd47922d46bb4781c95d7aaecf0b97a858 @saberma committed Nov 14, 2012
@@ -13,6 +13,10 @@ class Shopqi::RegistrationsController < Devise::RegistrationsController
expose(:signup_source_options) { KeyValues::Shop::SignupSource.options }
+ def new
+ (render action: :forbid and return) unless Setting.can_register
+ end
+
def create
data = {errors: {}}
if is_code_valid? # 手机校验码(测试环境下不校验)
@@ -39,7 +39,7 @@
%li
%a(href="/examples/") 成功案例
%li(class=@current_faq)=link_to '常见问题', faq_path, class: 'top-nav'
- %li(class=@current_signup)=link_to '价格 & 注册', services_signup_path, class: 'top-nav'
+ %li(class=@current_signup)=link_to '注册', services_signup_path, class: 'top-nav'
%li.sub-nav
%ul.utilities
%li=link_to '主题外观', theme_store_url_with_port
@@ -0,0 +1,10 @@
+- @current_signup = :current
+
+#banner
+ .content
+ %h1(style="font-family:hevletica arial sans-serif") 注册
+ / .content
+/ #banner
+.content.subpage
+ %div(style="margin: 200px 0; text-align:center; font-size: 18px;")
+ 产品改版中,暂不开放注册,请见谅。
View
@@ -1,4 +1,5 @@
defaults: &defaults
+ can_register: true
mail:
from: "ShopQi<noreply@shopqi.com>"
support: "ShopQi Support<support@shopqi.com>"
@@ -25,6 +26,7 @@ test:
production:
<<: *defaults
+ can_register: false
domain:
#host: lvh.me
host: shopqi.com
View
@@ -85,10 +85,10 @@
get '/signup' , to: redirect('/services/signup')
get '/login' , to: 'home#login'
scope "/services/signup" do
- get '/' , to: 'home#signup' , as: :services_signup
# :confirmations, :omniauth_callbacks, :passwords, :registrations, :sessions, :unlocks
devise_for :user, skip: [:sessions, :confirmations, :passwords], skip_helpers: true
devise_scope :user do
+ get '/new/professional' , to: 'registrations#new' , as: :services_signup
get "/new/:plan" , to: "registrations#new" , as: :signup
get "/check_availability", to: "registrations#check_availability"
post "/user" , to: "registrations#create" , as: :signup_user

0 comments on commit 57470ec

Please sign in to comment.