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

  <%= f.text_field :name, maxlength: Budget.title_max_length %>

  <% Budget::PHASES.each do |phase| %>
    <div class="margin-top">
      <%= f.cktext_area "description_#{phase}", maxlength: Budget.description_max_length, ckeditor: { language: I18n.locale } %>
    </div>
  <% end %>

  <div class="row margin-top">
    <div class="small-12 medium-9 column">
      <%= f.select :phase, budget_phases_select_options %>
    </div>
    <div class="small-12 medium-3 column">
      <%= f.select :currency_symbol, budget_currency_symbol_select_options %>
    </div>
  </div>
  <div class="margin-top">
    <%= f.submit nil, class: "button success" %>
    <% if @budget.balloting_process? %>
      <div class="float-right">
        <%= link_to t("admin.budgets.winners.calculate"),
                    calculate_winners_admin_budget_path(@budget),
                    method: :put,
                    class: "button hollow" %>
      </div>
    <% end %>
  </div>
<% end %>
