Allow the name of the custom fields form to be changed
This commit is contained in:
parent
8c3a799e9f
commit
42a6807597
@ -3,7 +3,7 @@
|
|||||||
- ordered_custom_fields = form.object.send(:"ordered_#{collection_name}")
|
- ordered_custom_fields = form.object.send(:"ordered_#{collection_name}")
|
||||||
- field_klass = "#{form.object.class.name}#{collection_name.classify}".gsub(/CustomField$/, 'Field').constantize
|
- field_klass = "#{form.object.class.name}#{collection_name.classify}".gsub(/CustomField$/, 'Field').constantize
|
||||||
|
|
||||||
= form.foldable_inputs :name => :custom_fields, :class => 'editable-list fields' do
|
= form.foldable_inputs :name => defined?(form_name) ? form_name : :custom_fields, :class => 'editable-list fields' do
|
||||||
|
|
||||||
%script{ :type => 'text/x-mustache-template', :name => 'template', :'data-base-input-name' => "#{form.object.class.name.underscore}[#{collection_name}_attributes]" }
|
%script{ :type => 'text/x-mustache-template', :name => 'template', :'data-base-input-name' => "#{form.object.class.name.underscore}[#{collection_name}_attributes]" }
|
||||||
%li{ :class => "item {{behaviour_flag}} {{new_record_flag}} {{errors_flag}} {{required_flag}}" }
|
%li{ :class => "item {{behaviour_flag}} {{new_record_flag}} {{errors_flag}} {{required_flag}}" }
|
||||||
|
Loading…
Reference in New Issue
Block a user