<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,6 +8,7 @@ class SessionsController &lt; ApplicationController
   end
 
   def create
+    logger.warn &quot;XXX openid_url: #{params[:openid_url]}&quot;
     if using_open_id?
       open_id_authentication(params[:openid_url])
     else
@@ -26,7 +27,6 @@ class SessionsController &lt; ApplicationController
           @person.email_verified = true if global_prefs.email_verifications?
           @person.save
           if !@person.errors.empty?
-            @body = &quot;login single-col&quot;
             err_message = &quot;Your OpenID profile must provide&quot;
             err_message += &quot; nickname,&quot; if !@person.errors[:name].nil?
             err_message += &quot; email,&quot; if !@person.errors[:email].nil?
@@ -44,6 +44,7 @@ class SessionsController &lt; ApplicationController
   end
 
   def failed_login(message = &quot;Authentication failed.&quot;)
+    @body = &quot;login single-col&quot;
     flash.now[:error] = message
     render :action =&gt; 'new'
   end</diff>
      <filename>app/controllers/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
   &lt;h2&gt;Sign in&lt;/h2&gt;
 
   &lt;% form_tag session_path do -%&gt;
+&lt;span id=&quot;standard&quot;&gt;
     &lt;div class=&quot;form_row&quot;&gt;
       &lt;label for=&quot;email&quot;&gt;Email address&lt;/label&gt;
       &lt;%= text_field_tag 'email', params[:email],
@@ -14,12 +15,8 @@
       &lt;%= password_field_tag 'password', params[:password],
                                          :maxlength =&gt; Person::MAX_PASSWORD %&gt;
     &lt;/div&gt;
-
-    &lt;p&gt;
-      or use...
-    &lt;/p&gt;
-
-    &lt;div class=&quot;form_row&quot;&gt;
+&lt;/span&gt;
+    &lt;div class=&quot;form_row&quot; id=&quot;openid&quot;&gt;
       &lt;label for=&quot;openid_url&quot;&gt;OpenID&lt;/label&gt;
       &lt;%= text_field_tag &quot;openid_url&quot; %&gt;
     &lt;/div&gt;
@@ -31,11 +28,66 @@
 
     &lt;div class=&quot;form_row&quot;&gt;
       &lt;%= submit_tag 'Sign in', :class =&gt; &quot;button&quot; %&gt;
-      &lt;p&gt;or &lt;%= link_to &quot;Sign up&quot;, signup_path %&gt;&lt;/p&gt;
     &lt;/div&gt;
 
-    &lt;p class=&quot;form_row&quot;&gt;
-      &lt;%= link_to &quot;I forgot my password!&quot;, new_password_reminder_path %&gt;
-    &lt;/p&gt;
+&lt;div style=&quot;text-align: center; font-size: 12px; padding: 10px;&quot;&gt;
+  &lt;%= link_to &quot;...or Sign up&quot;, signup_path %&gt; ::
+  &lt;%= link_to &quot;I forgot my password!&quot;, new_password_reminder_path %&gt; ::
+    &lt;span id=&quot;noscript&quot; style=&quot;display:none;&quot;&gt;
+        &lt;span id=&quot;openid_link&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;show_openid(); return false;&quot;&gt;Login using OpenID&lt;/a&gt;&lt;/span&gt;
+        &lt;span id=&quot;standard_link&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;show_standard(); return false;&quot;&gt;Back to Regular Login&lt;/a&gt;&lt;/span&gt;
+    &lt;/span&gt;
+
+&lt;/div&gt;
   &lt;% end -%&gt;
 &lt;%- end -%&gt;
+&lt;script type='text/javascript'&gt;
+show_openid = function() {
+    $('openid').show();
+    $('standard').hide();
+    $('openid_link').hide();
+    $('standard_link').show();
+    createCookie('use_openid', 1, 30);
+    $('openid_url').value = 'http://';
+}
+show_standard = function() {
+    $('openid').hide();
+    $('standard').show();
+    $('openid_link').show();
+    $('standard_link').hide();
+    eraseCookie('use_openid');
+    $('openid_url').value = '';
+}
+$('openid').hide();
+$('standard_link').hide();
+$('noscript').show();
+
+if (readCookie('use_openid')){
+    show_openid();
+}
+
+function createCookie(name,value,days) {
+    if (days) {
+        var date = new Date();
+        date.setTime(date.getTime()+(days*24*60*60*1000));
+        var expires = &quot;; expires=&quot;+date.toGMTString();
+    }
+    else var expires = &quot;&quot;;
+    document.cookie = name+&quot;=&quot;+value+expires+&quot;; path=/&quot;;
+}
+
+function readCookie(name) {
+    var nameEQ = name + &quot;=&quot;;
+    var ca = document.cookie.split(';');
+    for(var i=0;i &lt; ca.length;i++) {
+        var c = ca[i];
+        while (c.charAt(0)==' ') c = c.substring(1,c.length);
+        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
+    }
+    return null;
+}
+
+function eraseCookie(name) {
+    createCookie(name,&quot;&quot;,-1);
+}
+&lt;/script&gt;</diff>
      <filename>app/views/sessions/new.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b8998ffa033cedf8573931a090c189b9f2a2c25c</id>
    </parent>
  </parents>
  <author>
    <name>Tom Brown</name>
    <login>herestomwiththeweather</login>
    <email>herestomwiththeweather@gmail.com</email>
  </author>
  <url>http://github.com/herestomwiththeweather/insoshi/commit/0c3e4ba7af7aeffc24236d7e4294552804db4efa</url>
  <id>0c3e4ba7af7aeffc24236d7e4294552804db4efa</id>
  <committed-date>2008-09-06T14:16:29-07:00</committed-date>
  <authored-date>2008-09-06T14:16:29-07:00</authored-date>
  <message>javascript to toggle between openid and old school login</message>
  <tree>cab2e3d0ce41ac14b6f2fb5ef291a5e7de881cc5</tree>
  <committer>
    <name>Tom Brown</name>
    <login>herestomwiththeweather</login>
    <email>herestomwiththeweather@gmail.com</email>
  </committer>
</commit>
