Permalink
Browse files

making RSVP work, got rid of Ajax form submission for now

  • Loading branch information...
1 parent 31c315f commit f5ec85355e18b781fe96eca77b5985202a943f84 @croaky croaky committed Feb 4, 2011
@@ -1,9 +1,6 @@
class UsersController < ApplicationController
def update
- if current_user.update_attributes(params[:user])
- render :partial => 'parties/thanks'
- else
- render :partial => 'parties/form'
- end
+ current_user.update_attributes(params[:user])
+ redirect_to party_path, :notice => "RSVP updated. It's only a party if you make it a party."
end
end
@@ -2,19 +2,19 @@
<header id="registration-banner">
<img src="/images/RSVP-banner.png" alt="registration-banner" width="422" height="145" />
</header>
- <%= semantic_form_for current_user, :remote => true,
+ <%= semantic_form_for current_user,
:html => { :id => "event-registration",
'data-type' => 'html' } do |form| %>
<ol class="form">
<%= form.input :description, :label => "Tell local students about yourself", :required => true %>
<li id="radio">
<label>Are you attending the after-party?<abbr title="required">*</abbr></label>
<p class="radio developer">
- <%= form.radio_button :partying, "Partying", :checked => "checked" %>
+ <%= form.radio_button :partying, true, %>
<%= form.label :partying, "Partying", :for => "user_partying_partying" %>
</p>
<p class="radio designer">
- <%= form.radio_button :partying, "Not Partying" %>
+ <%= form.radio_button :partying, false %>
<%= form.label :partying, "Not Partying", :for => "user_partying_not_partying" %>
</p>
</li>
@@ -3,7 +3,7 @@
<img src="/images/wreath-developers.png" alt="angel-investors" width="215" height="200" />
</div>
<div id="after-party-description">
- <%= link_to "http://maps.google.com/maps?cid=11425628393869581370" do %>
+ <%= link_to defined?(target) ? target : "http://maps.google.com/maps?cid=11425628393869581370" do %>
<h1>the after party</h1>
<h2>The Cavern Club</h2>
<h3>hard rock cafe faneuil hall</h3>
@@ -162,9 +162,8 @@
<hr class="bottom"/>
- <%= render 'parties/party' %>
+ <%= render 'parties/party', :target => party_path %>
- <hr class="top"/>
<section id="startup-tables">
<header id="startup-banner">
<img src="/images/startup_tables.png" alt="Startup Tables" width="422" height="130" />
@@ -945,7 +945,6 @@ ul.ui-menu {
margin-bottom: 20px;
}
}
-
}
.party-main {
.student {
@@ -956,4 +955,16 @@ ul.ui-menu {
}
}
}
+ #flash {
+ margin: 0;
+ #flash_notice {
+ background: none;
+ font-size: 16px;
+ text-align: center;
+ border: none;
+ color: #000;
+ margin: 0;
+ padding: 40px 0 0 0;
+ }
+ }
}

0 comments on commit f5ec853

Please sign in to comment.