Use a plain tab param

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.
This commit is contained in:
Senén Rodero Rodríguez
2023-11-27 11:53:05 +01:00
committed by Javi Martín
parent 6a64f38d17
commit 1fb351425f
4 changed files with 4 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
<%= form_for([:admin, feature], remote: remote?, html: { class: "featured-settings-form" }) do |f| %>
<%= f.hidden_field :tab, id: dom_id(feature, :tab), value: tab if tab %>
<%= hidden_field_tag :tab, tab if tab %>
<%= f.hidden_field :describedby, id: dom_id(feature, :describedby), value: describedby if describedby %>
<%= f.hidden_field :value, id: dom_id(feature, :value), value: (enabled? ? "" : "active") %>
<%= f.button text, options %>

View File

@@ -1,5 +1,5 @@
<%= form_for([:admin, setting]) do |f| %>
<%= f.hidden_field :tab, id: dom_id(setting, :tab), value: tab if tab %>
<%= hidden_field_tag :tab, tab if tab %>
<div class="small-12 medium-6 large-8 column">
<%= f.text_area :value,
label: false,