Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 1.92 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div class="nested-fields">
  2.   <fieldset>
  3.     <legend>Location</legend>
  4.     <p>
  5.       <%= f.label :location_type_id %><br />
  6.       <%= f.collection_select(:location_type_id, LocationType.all, :id, :location_type, :prompt => true) %>
  7.     </p>
  8.     <p>
  9.       <%= f.label :location_name %><br />
  10.       <%= f.text_field :location_name %>
  11.     </p>
  12.     <p>
  13.       <%= f.label :location_street1 %><br />
  14.       <%= f.text_field :location_street1 %>
  15.     </p>
  16.     <p>
  17.       <%= f.label :location_street2 %><br />
  18.       <%= f.text_field :location_street2 %>
  19.     </p>
  20.     <p>
  21.       <%= f.label :location_city %><br />
  22.       <%= f.text_field :location_city %>
  23.     </p>
  24.     <p>
  25.       <%= f.label :location_state %><br />
  26.       <%= f.text_field :location_state %>
  27.     </p>
  28.     <p>
  29.       <%= f.label :location_zip %><br />
  30.       <%= f.text_field :location_zip %>
  31.     </p>
  32.     <p>
  33.       <%= f.label :location_contact %><br />
  34.       <%= f.text_field :location_contact %>
  35.     </p>
  36.     <p>
  37.       <%= f.label :par_level_event %><br />
  38.       <%= f.number_field :par_level_event %>
  39.     </p>
  40.     <p>
  41.       <%= f.label :par_level_mct %><br />
  42.       <%= f.number_field :par_level_mct %>
  43.     </p>
  44.     <p>
  45.       <%= f.label :alert_amount %><br />
  46.       <%= f.number_field :alert_amount %>
  47.     </p>
  48.     <p>
  49.       <%= f.label :active %><br />
  50.       <%= f.check_box :active %>
  51.     </p>
  52.     <%= f.fields_for :location_alert_contacts do |builder| %>
  53.        <%= render "location_alert_contact_fields", :f => builder %>
  54.     <% end %>
  55.     <%= f.fields_for :patient_assignments do |builder| %>
  56.       <%= render "patient_assignment_fields", :f => builder, :devices => f.object.get_devices, :patients => f.object.get_patients %>
  57.     <% end %>
  58.     <p>
  59.       <%= link_to_add_association "Add Contact", f, :location_alert_contacts %> |
  60.       <%= link_to_add_association "Add Patient Assignment", f, :patient_assignments %>
  61.     </p>    
  62.     <%= link_to_remove_association "Remove Location", f %>
  63.   </fieldset>
  64. </div>