Added interface and methods for edit the name of a Budget::Group if the budget is still inthe drafting phase

This commit is contained in:
Raúl Fuentes
2018-02-13 13:51:47 +01:00
committed by Bertocq
parent 089cef8ead
commit 6d8d44a5e3
10 changed files with 62 additions and 19 deletions

View File

@@ -0,0 +1,6 @@
<% if @group.errors.any? %>
$("#group-form-<%= @group.id %>").html('<%= j render("admin/budgets/group_form", group: @group, budget: @group.budget, button_title: "admin.budgets.form.submit", id: "group-form-#{@group.id}", css_class: "group-toggle-#{@group.id}" ) %>');
<% else %>
$("#group-name-<%= @group.id %>").html('<%= @group.name %>')
$(".group-toggle-<%= @group.id %>").toggle()
<% end %>