<% object_name ||= 'issue'; modul_uniq_id ||= ''; enable_editor ||= !in_mobile_view?; hidden_fields ||= [] %>
<%= fields_for object_name, issue do |f| %>
  <% project = f.object.try(:project) %>
  <div class="box">
    <h3 class="issue-static-attributes-heading icon icon-tracker module-heading"><%= l(:label_issue_static_attributes_heading) -%></h3>
    <% if issue.safe_attribute? 'subject' %>
    <p class="issue-subject-field" style="<%='display:none;' if hidden_fields.include?(:subject) %>">
      <%= label_for_field(:subject, {:required => true, :class => 'hidden'}) -%>
      <%= f.text_field :subject, :placeholder => :subject, :class => 'issue_subject', :tabindex => 10, :maxlength => 255 -%>
    </p>
    <% end %>
    <% if issue.safe_attribute? 'description' %>
      <p class="description" style="<%='display:none;' if hidden_fields.include?(:description) %>">
        <%= f.text_area( :description,
          :cols => 60,
          :rows => (issue.description.blank? ? 10 : [[10, issue.description.length / 50].max, 100].min),
          :accesskey => accesskey(:edit),
          :id => "#{modul_uniq_id}#{object_name}_description",
          :class => 'wiki-edit', :no_label => !in_mobile_view?, :tabindex => 20).html_safe %>
        <%= wikitoolbar_for("#{modul_uniq_id}#{object_name}_description", :attachment_reminder => true) if enable_editor %>
      </p>
    <% end %>

    <div class="splitcontent">

      <% if EasyIssueTimer.active?(project) && !hidden_fields.include?(:easy_issue_timer) && User.current.allowed_to?(:log_time, project) %>
        <div id="new_issue_start_issue_timer_checkbox" class="settings splitcontentleft">
          <p><%= check_box_tag(:easy_issue_timer_start_now, true, false) %><%= label_tag(:easy_issue_timer_start_now, l(:field_easy_issue_timer_start_now)) %></p>
        </div>
      <% end -%>

      <% if !in_mobile_view? && !hidden_fields.include?(:easy_is_repeating) %>
        <div id="edit_issue_repeat_options" class="settings tabular splitcontentleft">
          <%= render :partial => 'issues/edit_issue_repeat_options', :locals => { :issue => issue, :object_name => object_name } %>
        </div>
      <% end %>

    </div>

    <% if !hidden_fields.include?(:attachments) %>
      <div id="attachments-form" class="box">
        <%= toggling_container('issue-form-attachments', User.current, {:heading => l(:label_issue_attachments_heading), :wrapping_heading_element_classes => ' icon icon-attachment'}) do %>
          <p><%= render :partial => 'attachments/form', :locals => {:container => issue} %></p>
        <% end %>
      </div>
    <% else %>
      <% include_attachment_tags %>
    <% end %>

  </div>

<% end %>
