Merge pull request #4601 from consul/budgets_hide_money

Add hide money option for approval budgets
This commit is contained in:
Senén Rodero
2022-03-30 09:58:29 +02:00
committed by GitHub
41 changed files with 482 additions and 72 deletions

View File

@@ -109,6 +109,7 @@
//= require cookies
//= require columns_selector
//= require budget_edit_associations
//= require budget_hide_money
//= require datepicker
//= require_tree ./admin
//= require_tree ./sdg
@@ -167,6 +168,7 @@ var initialize_modules = function() {
App.AdminBudgetsWizardCreationStep.initialize();
App.AdminMachineLearningScripts.initialize();
App.BudgetEditAssociations.initialize();
App.BudgetHideMoney.initialize();
App.Datepicker.initialize();
App.SDGRelatedListSelector.initialize();
App.SDGManagementRelationSearch.initialize();

View File

@@ -0,0 +1,17 @@
(function() {
"use strict";
App.BudgetHideMoney = {
initialize: function() {
$("#budget_voting_style").on({
change: function() {
if ($(this).val() === "approval") {
$("#hide_money").removeClass("hide");
} else {
$("#budget_hide_money").prop("checked", false);
$("#hide_money").addClass("hide");
}
}
});
}
};
}).call(this);