lib/cm_admin/models/form_field.rb in cm-admin-2.3.4 vs lib/cm_admin/models/form_field.rb in cm-admin-2.4.0
- old
+ new
@@ -5,11 +5,11 @@
class FormField
include Utils::Helpers
attr_accessor :field_name, :label, :header, :input_type, :collection, :disabled, :helper_method,
:placeholder, :display_if, :html_attrs, :target, :col_size, :ajax_url, :helper_text,
- :image_preview
+ :image_preview, :can_create_new_entity
VALID_INPUT_TYPES = %i[
integer decimal string single_select multi_select date date_time text switch custom_single_select checkbox_group
single_file_upload multi_file_upload hidden rich_text check_box radio_button custom_string custom_date
radio_button_group
@@ -32,9 +32,10 @@
self.input_type = :string
self.html_attrs = {}
self.target = {}
self.col_size = nil
self.image_preview = false
+ self.can_create_new_entity = false
end
def set_default_placeholder
return unless placeholder.nil?