<div id="edit" style="display: none;">
  <%= form_tag({:controller => "post", :action => "update", :id => @post.id}, :id => "edit-form", :level => :member) do %>
    <%= hidden_field_tag "post[old_tags]", @post.cached_tags %>
    <table class="form">
      <tfoot>
        <tr>
          <td colspan="2"><%= submit_tag t('.save'), :tabindex => 11, :accesskey => "s" %></td>
        </tr>
      </tfoot>
      <tbody>
        <tr>
          <th width="15%">
            <label class="block" for="post_rating_questionable"><%= t('.rating') %></label>
            <% unless @current_user.is_privileged_or_higher? %>
              <p><%= t('.rating_info_html', :more => link_to(t('.help'), help_path("ratings"), :target => "_blank")) %></p>
            <% end %>
          </th>
          <td width="85%">
            <% if @post.is_rating_locked? %>
              <%= t('.rating_locked_info') %>
            <% else %>
              <label>
                <%= radio_button_tag "post[rating]", "Explicit", @post.rating == "e", :id => "post_rating_explicit", :tabindex => 1 %>
                <%= t('ratings.e') %>
              </label>

              <label>
                <%= radio_button_tag "post[rating]", "Questionable", @post.rating == "q", :id => "post_rating_questionable", :tabindex => 2 %>
                <%= t('ratings.q') %>
              </label>

              <label>
                <%= radio_button_tag "post[rating]", "Safe", @post.rating == "s", :id => "post_rating_safe", :tabindex => 3 %>
                <%= t('ratings.s') %>
              </label>
            <% end %>
          </td>
        </tr>
        <tr>
          <th><label><%= t('.parent') %></label></th>
          <td><%= text_field "post", "parent_id", :size => 10, :tabindex => 4 %></td>
        </tr>
          <tr>
            <th><label class="block" for="post_is_shown_in_index"><%= t('.shown_in_index') %></label></th>
            <td><%= check_box "post", "is_shown_in_index", :tabindex => 7 %></td>
          </tr>
        <% if @current_user.is_privileged_or_higher? %>
          <tr>
            <th><label class="block" for="post_is_note_locked"><%= t('.note_locked') %></label></th>
            <td><%= check_box "post", "is_note_locked", :tabindex => 7 %></td>
          </tr>
          <tr>
            <th><label class="block" for="post_is_rating_locked"><%= t('.rating_locked') %></label></th>
            <td><%= check_box "post", "is_rating_locked", :tabindex => 8 %></td>
          </tr>
        <% end %>
        <tr>
          <th><label class="block" for="post_source"><%= t('.source') %></label></th>
          <td><%= text_field "post", "source", :size => 40, :tabindex => 9 %></td>
        </tr>
          <tr>
            <th>
              <label class="block" for="post_tags"><%= t('.tags') %></label>
              <% unless @current_user.is_privileged_or_higher? %>
                <p><%= t('.tags_info_html', :more => link_to(t('.help'), help_path('tags'), :target => '_blank')) %></p>
              <% end %>
            </th>
            <td>
              <%= text_area "post", "tags", :readonly => !@post.can_be_seen_by?(@current_user), :size => "50x4", :value => tag_string(@tags[:include]), :tabindex => 10 %>
            <% if @post.can_be_seen_by?(@current_user) %>
              <%= link_to t(".related.tags"), "#", :data => { :toggle => "related-tags", :type => "all" } %> |
              <%= link_to t(".related.artists"), "#", :data => { :toggle => "related-tags", :type => "artist" } %> |
              <%= link_to t(".related.characters"), "#", :data => { :toggle => "related-tags", :type => "char" } %> |
              <%= link_to t(".related.copyrights"), "#", :data => { :toggle => "related-tags", :type => "copyright" } %> |
              <%= link_to t("post.upload.form.find_related.circles"), "#", :data => { :toggle => "related-tags", :type => "circle" } %>
              <% if CONFIG["enable_artists"] %>
                | <%= link_to t(".find_artists"), "#", :data => { :toggle => "related-tags", :type => "artist-url" } %>
              <% end %>
            <% end %>
            </td>
          </tr>
      </tbody>
    </table>
    <div>
      <h5><%= t('.related.tags').titleize %></h5>
      <div style="margin-bottom: 1em;" id="related"><em><%= t('.related.none') %></em></div>
    </div>
  <% end %>
</div>
