lib/cm_admin/models/nested_field.rb in cm-admin-2.3.2 vs lib/cm_admin/models/nested_field.rb in cm-admin-2.3.3
- old
+ new
@@ -2,11 +2,12 @@
module Models
class NestedField
# NestedField is like a container to hold Field and FormField object
- attr_accessor :field_name, :display_type, :fields, :associated_fields, :parent_field, :header, :label, :submit_text, :is_deletable, :is_creatable
+ attr_accessor :field_name, :display_type, :fields, :associated_fields, :parent_field,
+ :header, :label, :submit_text, :is_deletable, :is_creatable, :is_positionable
def initialize(field_name, attributes={})
@field_name = field_name
set_default_values
attributes.each do |key, value|
@@ -19,9 +20,10 @@
self.fields = []
self.associated_fields = []
self.submit_text = "+ Add #{@field_name.to_s.titleize}"
self.is_deletable = lambda { |arg| return true }
self.is_creatable = lambda { |arg| return true }
+ self.is_positionable = lambda { |arg| return false }
end
end
end
end
\ No newline at end of file