Skip to content

Commit

Permalink
touch up welcome page
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrippi committed Oct 20, 2011
1 parent c49c76e commit ed473e0
Show file tree
Hide file tree
Showing 9 changed files with 474 additions and 24 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ gem 'haml', '3.1.2'
gem 'mobile-fu'
gem 'sass', '3.1.7'
gem 'will_paginate', '3.0.pre2'
gem 'client_side_validations'

# web

Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ GEM
uuidtools
childprocess (0.2.2)
ffi (~> 1.0.6)
client_side_validations (3.1.0)
closure-compiler (1.1.4)
cloudfiles (1.4.10)
mime-types (>= 1.16)
Expand Down Expand Up @@ -486,6 +487,7 @@ DEPENDENCIES
capybara (~> 0.3.9)
carrierwave (= 0.5.2)
chef (= 0.9.12)
client_side_validations
cloudfiles (= 1.4.10)
cucumber-api-steps
cucumber-rails (= 0.3.2)
Expand Down
48 changes: 25 additions & 23 deletions app/views/invitations/edit.html.haml
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
= javascript_include_tag "validation"
= javascript_tag "Diaspora.Page = 'InvitationsEdit';"

:javascript
$(function() {
$("#user_username").focus();
});

.span-7.append-1.prepend-3
%br
%br
%br
%br
%h2
= t('.your_account_awaits')
%h1
= t('users.getting_started.welcome')
%h3.accept_invitation_text
= t('.accept_your_invitation')
- flash.each do |name, msg|
%p{:class => "login_#{name}"}= msg

= image_tag 'diaspora_collage.png', :style => "margin-left:-50px;"

.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
= form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put, :class => 'accept_invitation_form'}, :validate => true) do |f|
%fieldset
.clearfix
%b
= t('username')
= f.text_field :username, :title => t('registrations.new.enter_username')
.clearfix
%b
= t('email')
= f.email_field :email, :title => t('registrations.new.enter_email')
.clearfix
%b
= t('password')
= f.password_field :password, :title => t('registrations.new.enter_password')
.clearfix
%b
= 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')
.submit_field
= f.submit t('registrations.new.create_my_account'), :class => 'in_aspects'

1 change: 1 addition & 0 deletions config/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ javascripts:
jquery:
- public/javascripts/vendor/jquery162.min.js
main:
- public/javascripts/rails.validations.js
- public/javascripts/rails.js
- public/javascripts/vendor/jquery.tipsy.js
- public/javascripts/vendor/jquery.hotkeys.js
Expand Down
14 changes: 14 additions & 0 deletions config/initializers/client_side_validations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# ClientSideValidations Initializer

#require 'client_side_validations/simple_form' if defined?(::SimpleForm)
#require 'client_side_validations/formtastic' if defined?(::Formtastic)

# Uncomment the following block if you want each input field to have the validation messages attached.
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
unless html_tag =~ /^<label/
%{<div class="field_with_errors">#{html_tag}<label for="#{instance.send(:tag_id)}" class="message">#{instance.error_message.first}</label></div>}.html_safe
else
%{<div class="field_with_errors">#{html_tag}</div>}.html_safe
end
end

2 changes: 1 addition & 1 deletion config/locales/diaspora/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ en:

registrations:
new:
create_my_account: "Create my account"
create_my_account: "Create my account!"

join_the_movement: "Join the movement!"
sign_up_today: "Sign up today"
Expand Down
Binary file added public/images/diaspora_collage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ed473e0

Please sign in to comment.