<%= form_for [:admin, @investment.budget, @investment, @milestone] do |f| %>

  <%= f.hidden_field :title, value: l(Time.current, format: :datetime), maxlength: Budget::Investment::Milestone.title_max_length %>
  <%= f.text_area :description, rows: 5 %>
  <%= f.label :publication_date, t("admin.milestones.new.date") %>
  <%= f.text_field :publication_date,
                   value: @milestone.publication_date.present? ? l(@milestone.publication_date.to_date) : nil,
                   label: false,
                   class: "js-calendar-full" %>

  <%= render 'images/admin_image', imageable: @milestone, f: f %>

  <div class="documents">
    <%= render 'documents/nested_documents', documentable: @milestone, f: f %>
  </div>

  <%= f.submit nil, class: "button success" %>
<% end %>
