diff --git a/app/assets/images/facebook-logo.png b/app/assets/images/facebook-logo.png new file mode 100644 index 00000000..9495a3d5 Binary files /dev/null and b/app/assets/images/facebook-logo.png differ diff --git a/app/assets/stylesheets/sign_up.css b/app/assets/stylesheets/sign_up.css new file mode 100644 index 00000000..b0b27c89 --- /dev/null +++ b/app/assets/stylesheets/sign_up.css @@ -0,0 +1,51 @@ +.sign-up{ + margin: 150px auto 0; + position: relative; + text-align: center; + width: 500px; +} + +.sign-up .form{ + background-color: #FFFFFF; + box-shadow: 0 10px 20px #CBCBCB; + margin-bottom: 20px; + padding: 15px; +} + +.sign-up .login-logo{ + border-bottom: 1px solid #EDEDED; + margin: 0; + padding-bottom: 15px; +} + +.sign-up .option-block{ + margin-top: 15px; +} +.sign-up .or{ + margin-top: 15px; + margin-bottom: 15px; +} +.sign-up .or span{ + margin-left: 5px; + margin-right: 5px; +} + +.sign-up .or .left{ + margin-top: 10px; + width: 220px; + float: left; +} +.sign-up .or .right{ + margin-top: 10px; + width: 220px; + float: right; +} + +.line{ + border-bottom: 1px solid #EDEDED; +} + +.links{ + text-align: left; +} + diff --git a/app/controllers/basic_infos_controller.rb b/app/controllers/basic_infos_controller.rb new file mode 100644 index 00000000..665fe60c --- /dev/null +++ b/app/controllers/basic_infos_controller.rb @@ -0,0 +1,10 @@ +class BasicInfosController < ApplicationController + layout "devise" + def index + @url = "http://fb.tp.rulingcom.com/login?callback=http://harry.tp.rulingcom.com/facebook/register_fb?user="+current_user.id.to_s rescue nil + end + + def form_page + end + +end \ No newline at end of file diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 57aa5f7c..2016aa64 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -1,3 +1,8 @@ class RegistrationsController < Devise::RegistrationsController layout "devise" + protected + + def after_sign_up_path_for(resource) + basic_infos_path + end end \ No newline at end of file diff --git a/app/views/basic_infos/form_page.html.erb b/app/views/basic_infos/form_page.html.erb new file mode 100644 index 00000000..771cd869 --- /dev/null +++ b/app/views/basic_infos/form_page.html.erb @@ -0,0 +1 @@ +<%= stylesheet_link_tag "sign_up" %> \ No newline at end of file diff --git a/app/views/basic_infos/index.html.erb b/app/views/basic_infos/index.html.erb new file mode 100644 index 00000000..9ea22331 --- /dev/null +++ b/app/views/basic_infos/index.html.erb @@ -0,0 +1,18 @@ +<%= stylesheet_link_tag "sign_up" %> +
+
+
+ +
+ Form +
+
+ OR +
+
+ +
+
+ +
+
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 4cd9868a..c9e4a34e 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,21 +1,41 @@ -

Sign up

+<%= stylesheet_link_tag "sign_up" %> +
+
-<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> - <%= devise_error_messages! %> + <% flash.each do |key, msg| %> + <%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %> + <% end %> -
<%= f.label :email %>
- <%= f.email_field :email %>
- -
<%= f.label "Username" %>
- <%= f.text_field :user_id %>
+
+ +
+
-
<%= f.label :password %>
- <%= f.password_field :password %>
+ <%= form_for resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => 'content'} do |f| %> + +
+ <%= f.text_field :user_id, :placeholder => t("users.user_id"), :id=>"user_email" %> +
+ +
+ <%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %> +
+ +
+ <%= f.password_field :password, :placeholder => t(:dots), :id=>"confirm_user_password" %> +
+

+
+ <%= content_tag :button, t(:register), :type => :submit, :class => 'btn btn-primary' %> +
+ + <% end %> + +
+
+
-
<%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation %>
- -
<%= f.submit "Sign up" %>
-<% end %> - -<%= render :partial => "devise/shared/links" %> +
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 611000ad..1d277493 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,7 +17,8 @@ Orbit::Application.routes.draw do match '/purchase/:type', :to => CentralServerExchangeApp match 'load_orbit_bar' => 'pages#load_orbit_bar' - + get 'basic_infos' => "basic_infos#index" + get 'basic_infos/form' => "basic_infos#form_page" # routes for admin namespace :admin do match 'user_actions' => 'user_actions#index'