Max headings are updated when editing heading

The max headings label is updated automatically
when updating the heading. It is done via AJAX
and a refresh isn't needed.
This commit is contained in:
iagirre
2018-04-03 08:55:06 +02:00
committed by Raúl Fuentes
parent 1f0ee32998
commit f871868a2b
5 changed files with 21 additions and 6 deletions

View File

@@ -2,5 +2,6 @@
$("#group-form-<%= @group.id %>").html('<%= j render("admin/budgets/group_form", group: @group, budget: @group.budget, button_title: t("admin.budgets.form.submit"), id: "group-form-#{@group.id}", css_class: "group-toggle-#{@group.id}" ) %>');
<% else %>
$("#group-name-<%= @group.id %>").html('<%= @group.name %>')
$("#max-heading-label-<%=@group.id%>").html('<%= j render("admin/budgets/max_headings_label", current: @group.max_votable_headings, max: @group.headings.count, group: @group) %>')
$(".group-toggle-<%= @group.id %>").toggle()
<% end %>