lib/cm_admin/models/form_field.rb in cm-admin-1.5.9 vs lib/cm_admin/models/form_field.rb in cm-admin-1.5.10
- old
+ new
@@ -4,11 +4,11 @@
module Models
class FormField
include Utils::Helpers
attr_accessor :field_name, :label, :header, :input_type, :collection, :disabled, :helper_method,
- :placeholder, :display_if, :html_attr, :target, :col_size, :ajax_url
+ :placeholder, :display_if, :html_attrs, :target, :col_size, :ajax_url
VALID_INPUT_TYPES = %i[
integer decimal string single_select multi_select date date_time text
single_file_upload multi_file_upload hidden rich_text check_box radio_button custom_string custom_date custom_single_select
].freeze
@@ -26,10 +26,10 @@
def set_default_values
self.disabled = lambda { |arg| return false } if display_if.nil?
self.label = self.field_name.to_s.titleize
self.input_type = :string
- self.html_attr = {}
+ self.html_attrs = {}
self.target = {}
self.col_size = nil
end
def set_default_placeholder