Simplify attributes in settings forms
Rails automatically assigns that id and that URL to forms for existing records.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%= form_for(feature, url: admin_setting_path(feature), html: { id: "edit_#{dom_id(feature)}" }) do |f| %>
|
||||
<%= form_for([:admin, feature]) do |f| %>
|
||||
<%= f.hidden_field :tab, value: tab if tab %>
|
||||
<%= f.hidden_field :value, id: dom_id(feature), value: (feature.enabled? ? "" : "active") %>
|
||||
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? "disable" : "enable"}"),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}" }) do |f| %>
|
||||
<%= form_for([:admin, setting]) do |f| %>
|
||||
<%= f.hidden_field :tab, value: tab if defined?(tab) %>
|
||||
<div class="small-12 medium-6 large-8 column">
|
||||
<%= f.text_area :value, label: false, id: dom_id(setting), lines: 1 %>
|
||||
|
||||
Reference in New Issue
Block a user