Allow enable 'hide_money' check on admin budget form
Add new 'hide_money' field to admin budget form. Only display new field 'hide_money' when voting style is 'approval'
This commit is contained in:
@@ -39,6 +39,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="hide_money" class="row expanded <%= hide_money_style %>">
|
||||
<div class="small-12 column">
|
||||
<p class="form-label"><%= t("admin.budgets.edit.hide_money") %></p>
|
||||
<p class="help-text"><%= t("admin.budgets.edit.hide_money_help_text") %></p>
|
||||
<%= f.check_box :hide_money %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% unless wizard? %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.select :phase, phases_select_options %>
|
||||
|
||||
@@ -34,4 +34,8 @@ class Admin::Budgets::FormComponent < ApplicationComponent
|
||||
def valuators
|
||||
@valuators ||= Valuator.includes(:user).order(description: :asc).order("users.email ASC")
|
||||
end
|
||||
|
||||
def hide_money_style
|
||||
"hide" if budget.voting_style == "knapsack"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user