Skip to content

Commit

Permalink
Initialize tag_tree when switching group tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalis committed Nov 28, 2017
1 parent 7089223 commit 3a7bb37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/controllers/ops_controller/ops_rbac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,7 @@ def rbac_field_changed(rec_type)
page.replace(@refresh_div,
:partial => @refresh_partial,
:locals => {:type => "classifications", :action_url => 'rbac_group_field_changed'}) if @refresh_div

page.replace("customer_tags_div", :partial => "ops/rbac_group/customer_tags") if params[:use_filter_expression].present?

# Only update description field value if ldap group user field was selected
page << "$('#description').val('#{j_str(@edit[:new][:ldap_groups_user])}');" if params[:ldap_groups_user]

Expand Down Expand Up @@ -1152,10 +1150,10 @@ def rbac_group_get_form_vars

if params[:use_filter_expression]
@edit[:new][:use_filter_expression] = params[:use_filter_expression]
@group = MiqGroup.find_by(:id => @edit[:group_id])
rbac_group_right_tree(@edit[:new][:belongsto].keys)
if params[:use_filter_expression] == 'false'
@edit[:new][:use_filter_expression] = false
@group = MiqGroup.find_by(:id => @edit[:group_id])
rbac_group_right_tree(@edit[:new][:belongsto].keys)
elsif params[:use_filter_expression] == 'true'
@edit[:use_filter_expression] = true
end
Expand Down

0 comments on commit 3a7bb37

Please sign in to comment.