<%#
  # @file
  # Form for editing a map
  # Located at addresses /maps/:id/edit. In use.
  #%>
<%= form_for @map, url: map_url(@map) do |form| %>
  <h3>Edit Map</h3>
  <label for="map_name">Name</label>
  <%= form.text_field :name %>
  <label for="map_desc">Description</label>
  <%= form.text_area :desc, class: "description", :rows => 5 %>
  <% if @map.user == user %>
    <label for="map_perm">Permission</label>
    <%= form.select :permission, options_for_select(['commons', 'public', 'private'], @map.permission) %>
    <p>Topics and synapses you create newly on this map will be set by default to the permissions of your map.<br>Permissions of already created topics will not be changed to your new map permission.</p>
  <% end %>
  <%= form.submit "Update", class: "update" %>
<% end %>