2012-09-24 01:30:48 +00:00
|
|
|
<%= form_for @person, url: person_url do |form| %>
|
|
|
|
<h3>Edit Person</h3>
|
|
|
|
<label for="person_name">Name</label>
|
|
|
|
<%= form.text_field :name, label: "Name", class: "name" %>
|
|
|
|
<label for="person_desc">Description</label>
|
|
|
|
<%= form.text_area :desc, label: "Description", class: "description", :rows => 5 %>
|
|
|
|
<label for="person_link">Link</label>
|
|
|
|
<%= form.text_field :link, label: "Link", class: "link" %>
|
2012-09-24 01:50:45 +00:00
|
|
|
<label for="person_city">City</label>
|
|
|
|
<%= form.text_field :city, class: "city" %>
|
|
|
|
<label for="person_province">Province/State</label>
|
|
|
|
<%= form.text_field :province, class: "province" %>
|
|
|
|
<label for="person_country">Country</label>
|
|
|
|
<%= form.text_field :country, class: "country" %>
|
2012-09-30 03:45:14 +00:00
|
|
|
<% if @ingroups.count > 0 %>
|
|
|
|
<label for="ingroups">Remove From Groups</label>
|
|
|
|
<%= select_tag "ingroups", options_from_collection_for_select(@ingroups, "id", "name"), { :multiple => true } %>
|
|
|
|
<% else %>
|
|
|
|
<div style="display:none">
|
|
|
|
<%= select_tag "ingroups", options_from_collection_for_select(@ingroups, "id", "name"), { :multiple => true } %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% if @outgroups.count > 0 %>
|
|
|
|
<label for="outgroups">Add To Groups</label>
|
|
|
|
<%= select_tag "outgroups", options_from_collection_for_select(@outgroups, "id", "name"), { :multiple => true } %>
|
|
|
|
<% else %>
|
|
|
|
<div style="display:none">
|
|
|
|
<%= select_tag "outgroups", options_from_collection_for_select(@outgroups, "id", "name"), { :multiple => true } %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2012-09-24 01:30:48 +00:00
|
|
|
<%= form.submit "Update", class: "update" %>
|
|
|
|
<% end %>
|