metamaps--metamaps/app/views/people/edit.html.erb

32 lines
No EOL
1.5 KiB
Text

<%= 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" %>
<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" %>
<% 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 %>
<%= form.submit "Update", class: "update" %>
<% end %>