<%= form_for(@simulator, html: {role: 'form'}, builder: CitizenBudgetModel::CitizenBudgetFormBuilder) do |f| %> <%= f.errors %> <%= f.translated_text_field :name %> <% if admin? %> <%= f.select :organization_id, CitizenBudgetModel::Organization.all.map{|o| [o.name, o.id]}, include_blank: true %> <% end %> <%= f.text_field :equation %> <% f.buttons do %> <% unless @simulator.new_record? || @simulator.active? %> <%= link_to([:activate, @simulator], class: 'btn btn-default', method: :post) do %> <%= _('Activate') %> <% end %> <% end %> <% end %> <% end %>