mod/edit/set/all/formgroup.rb in card-1.98.3 vs mod/edit/set/all/formgroup.rb in card-1.99.0

- old
+ new

@@ -1,23 +1,23 @@ format :html do - # a formgroup has a label, an editor and help text + # a formgroup has a label, an input and help text def formgroup title, opts={}, &block wrap_with :div, formgroup_div_args(opts[:class]) do formgroup_body title, opts, &block end end def formgroup_body title, opts, &block - label = formgroup_label opts[:editor], title - editor_body = editor_wrap opts[:editor], &block + label = formgroup_label opts[:input], title + editor_body = editor_wrap opts[:input], &block help_text = formgroup_help_text opts[:help] "#{label}<div>#{help_text} #{editor_body}</div>" end - def formgroup_label editor_type, title + def formgroup_label input, title return if voo&.hide?(:title) || title.blank? - label_type = editor_type || :content + label_type = input || :content form.label label_type, title end def formgroup_div_args html_class div_args = { class: ["form-group", html_class].compact.join(" ") }