Fix upload settings redirection
This commit is contained in:
committed by
Javi Martín
parent
1fb351425f
commit
cb91a7421d
@@ -1,5 +1,6 @@
|
||||
<%= form_tag admin_update_content_types_path, method: :put, id: "edit_#{dom_id(setting)}" do %>
|
||||
<%= hidden_field_tag "id", setting.id, id: dom_id(setting, :id) %>
|
||||
<%= hidden_field_tag :tab, tab if tab %>
|
||||
|
||||
<div class="small-12 medium-6 large-8 column">
|
||||
<% group = setting.content_type_group %>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
class Admin::Settings::ContentTypesFormComponent < ApplicationComponent
|
||||
attr_reader :setting
|
||||
attr_reader :setting, :tab
|
||||
delegate :dom_id, to: :helpers
|
||||
|
||||
def initialize(setting)
|
||||
def initialize(setting, tab: nil)
|
||||
@setting = setting
|
||||
@tab = tab
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if setting.content_type? %>
|
||||
<%= render Admin::Settings::ContentTypesFormComponent.new(setting) %>
|
||||
<%= render Admin::Settings::ContentTypesFormComponent.new(setting, tab: tab) %>
|
||||
<% elsif setting.feature? %>
|
||||
<%= render Admin::Settings::FeaturedSettingsFormComponent.new(setting, tab: tab) %>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user