Instead of using a setting nested param `setting[:tab]`. We only need the tab param when rendering settings in the administration section. This change will make it easier rendering the correct tab after updating settings.
12 lines
405 B
Plaintext
12 lines
405 B
Plaintext
var form = $("<%= j render Admin::Settings::FeaturedSettingsFormComponent.new(
|
|
@setting,
|
|
tab: params[:tab],
|
|
describedby: params[:setting][:describedby]
|
|
) %>");
|
|
|
|
$("#" + form.attr("id")).html(form.html()).find("[type='submit']").focus();
|
|
|
|
<% if @setting.prefix == "feature" || @setting.prefix == "process" %>
|
|
$("#side_menu").html("<%= j render Admin::MenuComponent.new %>").foundation();
|
|
<% end %>
|