Permalink
Browse files

third party chagnes

  • Loading branch information...
1 parent 783e2f1 commit d484ce916cc11ce3030aeeaff47930a998c490c3 @jeffdonthemic jeffdonthemic committed Dec 4, 2011
Showing with 66 additions and 0 deletions.
  1. +19 −0 app/models/signup_complete_form.rb
  2. +47 −0 app/views/sessions/signup_complete.html.erb
View
19 app/models/signup_complete_form.rb
@@ -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
View
47 app/views/sessions/signup_complete.html.erb
@@ -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.