made signing up and accepting an invitation look a little nicer

This commit is contained in:
danielgrippi 2011-08-05 12:36:21 -07:00
parent c38c744156
commit 75c3107035
7 changed files with 102 additions and 69 deletions

View file

@ -1,50 +1,39 @@
= javascript_include_tag "validation"
:javascript
$(function() {
$('#user_new [title]').tipsy({trigger: 'focus', gravity: ($('html').attr('dir') == 'rtl') ? 'e' : 'w'});
$("#user_username").focus();
});
.span-12
.floating{:style =>"margin-top:50px"}
%h3
= t('registrations.new.sign_up_for_diaspora')
= form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put }) do |f|
%p
= f.label :username , t('username')
= f.text_field :username, :title => t('registrations.new.enter_username')
%p
= f.label :email , t('email')
= f.text_field :email, :title => t('registrations.new.enter_email')
%p
= f.label :password , t('password')
= f.password_field :password, :title => t('registrations.new.enter_password')
%p
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
= f.hidden_field :invitation_token
.span-7.append-1.prepend-3
%br
%br
%br
%br
%h2
= t('.your_account_awaits')
%h3.accept_invitation_text
= t('.accept_your_invitation')
= f.submit t('registrations.new.sign_up')
%br
= render :partial => "devise/shared/links"
.span-10.prepend-2.last
.span-10.last
.info_pane
%h2
= t('home.show.choice')
%p
= t('home.show.choice_explanation')
.span-10.last
.info_pane
%h2
= t('home.show.ownership')
%p
= t('home.show.ownership_explanation')
.span-10.last
.info_pane
%h2
= t('home.show.simplicity')
%p
= t('home.show.simplicity_explanation')
.span-10
%br
%br
%br
%br
= form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put, :class => 'accept_invitation_form'}) do |f|
%p
= f.label :username , t('username')
= f.text_field :username, :title => t('registrations.new.enter_username')
%p
= f.label :email , t('email')
= f.email_field :email, :title => t('registrations.new.enter_email')
%p
= f.label :password , t('password')
= f.password_field :password, :title => t('registrations.new.enter_password')
%p
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
= f.hidden_field :invitation_token
.submit_field
= f.submit t('registrations.new.create_my_account')

View file

@ -13,6 +13,6 @@
= f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again')
= f.hidden_field :invitation_token
= f.submit t('registrations.new.sign_up')
= f.submit t('registrations.new.create_my_account')
%br
= render :partial => "devise/shared/links"

View file

@ -2,28 +2,38 @@
:javascript
$(function() {
$('#user_new [title]').tipsy({trigger: 'focus', gravity: ($('html').attr('dir') == 'rtl')? 'e' : 'w'});
$("#user_username").focus();
});
.span-12.prepend-6.last
.floating
%h3
= t('.sign_up_for_diaspora')
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
%p
= f.label :username , t('username')
= f.text_field :username, :title => t('.enter_username')
%p
= f.label :email , t('email')
= f.text_field :email, :title => t('.enter_email')
%p
= f.label :password , t('password')
= f.password_field :password, :title => t('.enter_password')
%p
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('.enter_password_again')
.span-7.append-1.prepend-3
%br
%br
%br
%br
%h2
= t('.join_the_movement')
%h3.accept_invitation_text
= t('.sign_up_today')
= f.submit t('.sign_up')
.span-10
%br
%br
%br
%br
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => {:class => 'sign_up_form'}) do |f|
%p
= f.label :username , t('username')
= f.text_field :username, :title => t('.enter_username')
%p
= f.label :email , t('email')
= f.text_field :email, :title => t('.enter_email')
%p
= f.label :password , t('password')
= f.password_field :password, :title => t('.enter_password')
%p
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation, :title => t('.enter_password_again')
= f.submit t('.create_my_account')

View file

@ -300,7 +300,8 @@ en:
check_token:
not_found: "Invitation token not found"
edit:
sign_up: "sign_up"
your_account_awaits: "Your account awaits!"
accept_your_invitation: "Accept your invitation"
layouts:
header:
@ -562,8 +563,11 @@ en:
registrations:
new:
sign_up: "Sign up"
sign_up_for_diaspora: "Sign up for Diaspora"
create_my_account: "Create my account"
join_the_movement: "Join the movement!"
sign_up_today: "Sign up today"
enter_email: "Enter an email"
enter_username: "Pick a username (only letters, numbers, and underscores)"
enter_password: "Enter a password"

View file

@ -8,7 +8,7 @@ Feature: invitation acceptance
| Email | woot@sweet.com |
| user_password | secret |
| Password confirmation | secret |
And I press "Sign up"
And I press "Create my account"
Then I should be on the getting started page
And I should see "Welcome"
Then I follow "Edit Profile"
@ -32,7 +32,7 @@ Feature: invitation acceptance
| Email | woot@sweet.com |
| user_password | secret |
| Password confirmation | secret |
And I press "Sign up"
And I press "Create my account"
Then I should be on the getting started page
And I should see "Welcome"
Then I follow "Edit Profile"

View file

@ -7,7 +7,7 @@ Feature: new user registration
And I fill in "Email" with "ohai@example.com"
And I fill in "user_password" with "secret"
And I fill in "Password confirmation" with "secret"
And I press "Sign up"
And I press "Create my account"
Then I should be on the getting started page
And I should see "Welcome"
And I should see "Fill out your profile"

View file

@ -41,7 +41,7 @@ ul > li
form
:position relative
input,
textarea,
textarea
label
:font
:size auto
@ -3329,3 +3329,33 @@ ul#getting_started
:float left
.action_item
:padding-right 5px
.accept_invitation_form,
.sign_up_form
:min-height 350px
:font-size 16px
input[type='text'],
input[type='password'],
input[type='email']
:font-size 16px !important
:width 378px !important
p
:margin
:bottom 14px
.diaspora_id_text
:font-size 12px
:text-align right
:color #999
:margin
:top -8px
:padding 0
.submit_field
:text-align right
.accept_invitation_text
:font
:weight lighter