From 387fd0bc68ded26b830444771714a636d3924cf0 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Tue, 9 May 2017 12:55:29 +0200 Subject: [PATCH] allow to show add members section initially via param --- app/assets/javascripts/members_form.js | 4 ++++ app/views/members/index.html.erb | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/members_form.js b/app/assets/javascripts/members_form.js index f711209e1e..b765b55f91 100644 --- a/app/assets/javascripts/members_form.js +++ b/app/assets/javascripts/members_form.js @@ -48,6 +48,10 @@ jQuery(document).ready(function($) { if (jQuery("#errorExplanation").text() != "") { showAddMemberForm(); } + + if (jQuery('#add-member-button').attr('data-trigger-initially')) { + showAddMemberForm(); + } }); function toggleMemberFilter() { diff --git a/app/views/members/index.html.erb b/app/views/members/index.html.erb index d68643449e..d22d8b20f3 100644 --- a/app/views/members/index.html.erb +++ b/app/views/members/index.html.erb @@ -40,7 +40,12 @@ See doc/COPYRIGHT.rdoc for more details. <% end %> <% if authorize_for(:members, :new) %>
  • -