From aa8f80c69484e0e39e86848b578a9e8ce4d71ff7 Mon Sep 17 00:00:00 2001 From: Rob Cutmore Date: Sat, 11 Jun 2016 12:30:26 -0400 Subject: [PATCH] Add selected group hint in campaign modal --- static/js/app/campaigns.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index f04e88ef..a6442b32 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -316,7 +316,7 @@ $(document).ready(function() { }); // Clear user input. - $("#groupSelect").val(""); + $("#groupSelect").typeahead('val', ""); return false; }); // Create the group typeahead objects @@ -351,7 +351,9 @@ $(document).ready(function() { } }) .bind('typeahead:select', function(ev, group) { - $("#groupSelect").typeahead('val', group.name) + // Add selected group. + $("#groupSelect").typeahead('val', group.name); + $("#groupForm").submit(); }) .bind('typeahead:autocomplete', function(ev, group) { $("#groupSelect").typeahead('val', group.name)