<%= form_for(:ticket, :url => sale_event_ticket_path(@event), :remote => true) do |f| %>
  <span id="hidden_field"></span>
  <ul style="">
  <% @event.available_ticket_types.each do |ticket_type| %>
    <li style="font-size:150%; margin-bottom: 0.5em; list-style-type:none;">
      <%= check_box_tag "ticket_type[#{ticket_type.id}]", "1", @event.available_ticket_types.size == 1 %>
      <%= label_tag "ticket_type[#{ticket_type.id}]", ticket_type %>
    </li>
  <% end %>
  </ul>
  
  <div id="union_override">
  <%= link_to_function "Tvinga kårmedlemskap" do |page|
        page[:union_override_form].toggle();
      end %>
  </div>
     
  <div id="union_override_form" style="display:none; margin-top: 1em;">
    <%= select :student, :union, Student.unions, { :include_blank => true } %>
    
    <%#= check_box :union, :override %>
    <%#= label :union, :override, "Tvinga Lintek-medlemskap (ger rabatter)" %>
  </div>
  
  <p><%= f.submit "Registrera" %></p>
<% end %>

<%= form_for(:ticket, :url => sale_event_ticket_path(@event), :remote => true) do |f| %>
  <span id="hidden_field"></span>
  <ul style="">
  <% @event.available_ticket_types.each do |ticket_type| %>
    <li style="font-size:150%; margin-bottom: 0.5em; list-style-type:none;">
      <%= check_box_tag "ticket_type[#{ticket_type.id}]", "1", @event.available_ticket_types.size == 1 %>
      <%= label_tag "ticket_type[#{ticket_type.id}]", ticket_type %>
    </li>
  <% end %>
  </ul>
  
  <div id="union_override" style="display:none;">
  <%= link_to_function "Tvinga kårmedlemskap" do |page|
        page[:union_override_form].toggle();
      end %>
  </div>
     
  <div id="union_override_form" style="display:none; margin-top: 1em;">
    <%= select :student, :union, Student.unions, { :include_blank => true } %>
  </div>
  
  <p><%= f.submit "Registrera" %></p>
<% end %>

Hide Union override if union found
Hide Union override if union found
