Add max votable headings to groups
This commit is contained in:
@@ -17,7 +17,7 @@ class Admin::BudgetGroupsController < Admin::BaseController
|
||||
private
|
||||
|
||||
def budget_group_params
|
||||
params.require(:budget_group).permit(:name)
|
||||
params.require(:budget_group).permit(:name, :max_votable_headings)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -8,6 +8,19 @@
|
||||
maxlength: 50,
|
||||
placeholder: t("admin.budgets.form.group"),
|
||||
class: "input-group-field" %>
|
||||
|
||||
<% if group.persisted? %>
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.label :name, t("admin.budgets.form.max_votable_headings") %>
|
||||
|
||||
<%= f.select :max_votable_headings,
|
||||
(1..group.headings.count),
|
||||
label: false,
|
||||
placeholder: t("admin.budgets.form.max_votable_headings"),
|
||||
class: "input-group-field" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="input-group-button">
|
||||
<%= f.submit button_title, class: "button success" %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user