Skip to content

Commit

Permalink
third party chagnes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdonthemic committed Dec 4, 2011
1 parent 783e2f1 commit d484ce9
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/models/signup_complete_form.rb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,19 @@
class SignupCompleteForm
include ActiveModel::Validations
include ActiveModel::Conversion

attr_accessor :email, :name, :username, :uid, :provider
validates_presence_of :email, :name, :username, :uid, :provider
validates_format_of :email, :with => /\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\z/

def initialize(attributes = {})
attributes.each do |name, value|
send("#{name}=", value)
end
end

def persisted?
false
end

end
47 changes: 47 additions & 0 deletions app/views/sessions/signup_complete.html.erb
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,47 @@
<div class="page-heading"><h2 class="melbourne">Complete the Signup Process</h2></div>

<div style="margin:5px">

<div style="float:left; width:150px;padding-left:25px;padding-bottom:100px;padding-top:25px">
<img src="assets/<%= @signup_complete_form.provider %>_128.png">
</div>

<div style="float:left;width:500px;;padding-top:25px">

<p>Unfortunately <b><%= @signup_complete_form.provider %></b> doesn't provide us with all of your information during the signup process. Please enter your info to complete the signup process and create your account.</p>

<%= flash_messages %>
<% if @signup_complete_form.errors.any? %>
<div class="error" id="flash-error" style="margin-top:0px">
<% @signup_complete_form.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</div>
<% end %>

<div id="profile">
<%= form_for @signup_complete_form, :url => signup_complete_path do |f| %>
<%= f.hidden_field :uid %>
<%= f.hidden_field :provider %>

<label style="width:100px">Name:</label>
<%= f.text_field :name, :class => 'display', :readonly => true %>
<div class="spacer" style="width: 500px"></div>

<label style="width:100px">Username:</label>
<%= f.text_field :username, :class => 'display', :readonly => @username_read_only %>
<div class="spacer" style="width: 500px"></div>

<label style="width:100px">Email:</label>
<%= f.text_field :email, :class => 'display' %>
<div class="spacer" style="width: 500px"></div>

<div id="button-container" style="padding-left:5px;margin-bottom:100px">
<a class="button" onclick="document.forms[0].submit();"> <span>Submit</span></a>
</div>
<% end %>
</div>

</div>

<div>

0 comments on commit d484ce9

Please sign in to comment.