<%= content_tag "div", "Thank you for registering for our newsletter",
                       :class => "success" unless @signup.new_record? %>
<%= error_messages_for :signup %>
<% form_for :signup, @signup do |f| %>
    <label for="signup_name">Full name:</label>
    <%= f.text_field :name %><br />

    <label for="signup_email">Email:</label>
    <%= f.text_field :email %><br />

    <label for="signup_email_confirmation">Confirm Email:</label>
    <%= f.text_field :email_confirmation %><br />

    <label for="signup_dob">Date of Birth:</label>
    <%= f.date_select :dob, :order => [:day, :month, :year],
                           :start_year => (Time.now - 18.years).year,
                           :end_year => 1930 %><br />

    <label for="signup_country">Country:</label>
    <%= f.country_select :country, ["United States", "Canada"] %><br />

    <label for="signup_terms">I Accept the Terms &amp; Conditions:</label>
    <%= f.check_box :terms %><BR clear=left>
    
    <h3>My interests include:</h3>
    <% ["Swimming", "Jogging", "Tennis"].each do |interest|%>
        <label><%= interest %></label>
        <%= check_box_tag "signup[interests][]", interest,
                (params[:signup] && params[:signup][:interests]) ?
                 params[:signup][:interests].include?(interest) : false %>
        <br />
    <% end %>

    <%= submit_tag "Signup", :style => "margin-left: 26ex;" %>
<% end if @signup.new_record? %>