Add optional signup.

This commit is contained in:
Marin Jankovski 2012-11-06 14:30:48 +01:00
parent b07e1b3aed
commit 296cdd591f
14 changed files with 125 additions and 25 deletions

View file

@ -5,5 +5,5 @@
<br/>
<br/>
<%= f.submit "Reset password", :class => "primary btn" %>
<div class="right"> <%= render :partial => "devise/shared/links" %></div>
<div class="right"> <%= link_to "Sign in", new_session_path(resource_name), :class => "btn" %><br /></div>
<% end %>

View file

@ -1,18 +0,0 @@
<h2>Sign up</h2>
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
<%= devise_error_messages! %>
<div><%= f.label :email %><br />
<%= f.email_field :email %></div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<div><%= f.label :password_confirmation %><br />
<%= f.password_field :password_confirmation %></div>
<div><%= f.submit "Sign up", :class => "input_button" %></div>
<% end %>
<%= render :partial => "devise/shared/links" %>

View file

@ -0,0 +1,19 @@
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "login-box" }) do |f|
= image_tag "login-logo.png", :width => "304", :height => "66", :class => "login-logo", :alt => "Login Logo"
= devise_error_messages!
%div
= f.text_field :name, :class => "text top", :placeholder => "Name", :required => true
%div
= f.text_field :username, :class => "text middle", :placeholder => "Username", :required => true
%div
= f.email_field :email, :class => "text middle", :placeholder => "Email", :required => true
%div
= f.password_field :password, :class => "text middle", :placeholder => "Password", :required => true
%div
= f.password_field :password_confirmation, :class => "text bottom", :placeholder => "Confirm password", :required => true
%div
= f.submit "Sign up", :class => "primary btn wide"
%br
%hr
= link_to "Sign in", new_session_path(resource_name)
= link_to "Forgot your password?", new_password_path(resource_name), :class => "right"

View file

@ -13,7 +13,13 @@
%br/
= f.submit "Sign in", :class => "primary btn wide"
.right
= render :partial => "devise/shared/links"
= link_to "Forgot your password?", new_password_path(resource_name), :class => "btn"
%br/
%br/
- if Gitlab.config.gitlab.signup_enabled
%hr/
Don't have an account?
= link_to "Sign up", new_registration_path(resource_name)
.clearfix
- if devise_mapping.omniauthable? && resource_class.omniauth_providers.present?
%div

View file

@ -6,7 +6,10 @@
%h2{style: "color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "}
Hi #{@user['name']}!
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
Administrator created account for you. Now you are a member of company GitLab application.
- if Gitlab.config.gitlab.signup_enabled
Account has been created successfully.
- else
Administrator created account for you. Now you are a member of company GitLab application.
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
%tr
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}
@ -15,8 +18,9 @@
login..........................................
%code= @user['email']
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 16px;font-family: Helvetica, Arial, sans-serif; "}
password..................................
%code= @password
- unless Gitlab.config.gitlab.signup_enabled
password..................................
%code= @password
%p{style: "color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 28px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "}
= link_to "Click here to login", root_url
%td{style: "font-size: 1px; line-height: 1px;", width: "21"}