Add selected checkbox on admin investment form
This commit is contained in:
@@ -51,7 +51,8 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
|
||||
|
||||
def budget_investment_params
|
||||
params.require(:budget_investment)
|
||||
.permit(:title, :description, :external_url, :heading_id, :administrator_id, :valuation_tag_list, :incompatible, valuator_ids: [])
|
||||
.permit(:title, :description, :external_url, :heading_id, :administrator_id, :valuation_tag_list, :incompatible,
|
||||
:selected, valuator_ids: [])
|
||||
end
|
||||
|
||||
def load_budget
|
||||
|
||||
@@ -61,15 +61,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<div class="row margin-top">
|
||||
<div class="small-12 medium-3 column">
|
||||
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
|
||||
<%= f.label :incompatible do %>
|
||||
<%= f.check_box :incompatible, title: t('admin.budget_investments.edit.compatibility'), label: false %>
|
||||
<span class="checkbox"><%= t("admin.budget_investments.edit.mark_as_incompatible") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column float-left">
|
||||
<h2 id="selected"><%= t("admin.budget_investments.edit.selection") %></h2>
|
||||
<%= f.label :selected do %>
|
||||
<%= f.check_box :selected, title: t('admin.budget_investments.edit.selection'), label: false %>
|
||||
<span class="checkbox"><%= t("admin.budget_investments.edit.mark_as_selected") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="margin-top">
|
||||
|
||||
@@ -166,7 +166,9 @@ en:
|
||||
edit:
|
||||
classification: Clasification
|
||||
compatibility: Compatibility
|
||||
mark_as_incompatible: Mark this investement project as incompatible
|
||||
mark_as_incompatible: Mark as incompatible
|
||||
selection: Selection
|
||||
mark_as_selected: Mark as selected
|
||||
assigned_valuators: Valuators
|
||||
select_heading: Select heading
|
||||
submit_button: Update
|
||||
|
||||
@@ -166,7 +166,9 @@ es:
|
||||
edit:
|
||||
classification: Clasificación
|
||||
compatibility: Compatibilidad
|
||||
mark_as_incompatible: Marcar esta propuesta de inversión como incompatible
|
||||
mark_as_incompatible: Marcar como incompatible
|
||||
selected: Selección
|
||||
mark_as_selected: Marcar como seleccionado
|
||||
assigned_valuators: Evaluadores
|
||||
select_heading: Seleccionar partida
|
||||
submit_button: Actualizar
|
||||
|
||||
Reference in New Issue
Block a user