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

48 lines
2.2 KiB
Text
Raw Normal View History

2012-09-24 01:30:48 +00:00
<%= form_for @group, url: group_url do |form| %>
<h3>Edit Group</h3>
<label for="group_name">Name</label>
<%= form.text_field :name, label: "Name", class: "name" %>
<label for="group_desc">Description</label>
<%= form.text_area :desc, label: "Description", class: "description", :rows => 5 %>
<label for="group_link">Link</label>
<%= form.text_field :link, label: "Link", class: "link" %>
2012-09-24 01:50:45 +00:00
<label for="group_city">City</label>
<%= form.text_field :city, class: "city" %>
<label for="group_province">Province/State</label>
<%= form.text_field :province, class: "province" %>
<label for="group_country">Country</label>
<%= form.text_field :country, class: "country" %>
<% if @ingroups1.count > 0 %>
<label for="ingroups1">Remove Parent Groups</label>
<%= select_tag "ingroups1", options_from_collection_for_select(@ingroups1, "id", "name"), { :multiple => true } %>
<% else %>
<div style="display:none">
<%= select_tag "ingroups1", options_from_collection_for_select(@ingroups1, "id", "name"), { :multiple => true } %>
</div>
<% end %>
<% if @outgroups1.count > 0 %>
<label for="outgroups1">Add Parent Groups</label>
<%= select_tag "outgroups1", options_from_collection_for_select(@outgroups1, "id", "name"), { :multiple => true } %>
<% else %>
<div style="display:none">
<%= select_tag "outgroups1", options_from_collection_for_select(@outgroups1, "id", "name"), { :multiple => true } %>
</div>
<% end %>
<% if @ingroups2.count > 0 %>
<label for="ingroups2">Remove Child Groups</label>
<%= select_tag "ingroups2", options_from_collection_for_select(@ingroups2, "id", "name"), { :multiple => true } %>
<% else %>
<div style="display:none">
<%= select_tag "ingroups2", options_from_collection_for_select(@ingroups2, "id", "name"), { :multiple => true } %>
</div>
<% end %>
<% if @outgroups2.count > 0 %>
<label for="outgroups2">Add Child Groups</label>
<%= select_tag "outgroups2", options_from_collection_for_select(@outgroups2, "id", "name"), { :multiple => true } %>
<% else %>
<div style="display:none">
<%= select_tag "outgroups2", options_from_collection_for_select(@outgroups2, "id", "name"), { :multiple => true } %>
</div>
<% end %>
2012-09-24 01:30:48 +00:00
<%= form.submit "Update", class: "update" %>
<% end %>