-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for editing settings with simple form and rails 7.1
related to heartcombo/simple_form#1834 The previous html for editing a setting looked like this: <input class="string optional form--medium enhanced" type="text" name="setting[setting[36086]][value]" id="setting_setting_70243__value"> it now looks like: <input value="Job position" class="string required form--medium enhanced" type="text" name="setting[setting_36086][value]" id="setting_setting_36086_value">
- Loading branch information
Showing
12 changed files
with
18 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= f.input attr, as: :boolean, wrapper: :checkbox, label: label, hint: hint, wrapper_html: { class: "checkbox__single" } %> | ||
<%= f.input attr, as: :boolean, wrapper: :checkbox, label: label, hint: hint, input_html: { value: value }, wrapper_html: { class: "checkbox__single" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<% data = object.data_source.call if object.data_source %> | ||
<% if data.nil? %> | ||
<%= f.input attr.to_sym, :as => :radio_buttons, label: label, hint: hint %> | ||
<%= f.input attr.to_sym, :as => :radio_buttons, label: label, hint: hint, input_html: { value: value } %> | ||
<% else %> | ||
<%= f.input attr.to_sym, :as => :radio_buttons, collection: data, label: label, hint: hint %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= f.input attr, as: :text, label: label, hint: hint, input_html: { class: "wysiwyg source" } %> | ||
<%= f.input attr, as: :text, label: label, hint: hint, input_html: { value: value, class: "wysiwyg source" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<% data = object.data_source.call if object.data_source %> | ||
<% if data.nil? %> | ||
<%= f.input attr, as: :string, label: label, hint: hint, input_html: { class: "form--medium" } %> | ||
<%= f.input attr, as: :string, label: label, hint: hint, input_html: { value: value, class: "form--medium" } %> | ||
<% else %> | ||
<%= f.input attr.to_sym, :as => :select, collection: data, label: label, hint: hint, input_html: { class: "form--medium" } %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= f.input attr, as: :string, label: label, hint: hint, input_html: { class: "form--medium" } %> | ||
<%= f.input attr, as: :string, label: label, hint: hint, input_html: { value: value, class: "form--medium" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= f.input attr, as: :text, label: label, hint: hint, input_html: { class: "form--large" } %> | ||
<%= f.input attr, as: :text, label: label, hint: hint, input_html: { value: value, class: "form--large" } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters