Sha256: 8cfd0d1fe6bf7c9f72ec532f24d616836cd53d49ab5a1abcff45ebb48b8708d7
Contents?: true
Size: 1.27 KB
Versions: 1
Compression:
Stored size: 1.27 KB
Contents
module Plugins module Core class TextCell < Plugins::Core::Cell def input render end def wysiwyg render end def multiline_input render end private def input_display @options[:input_options]&.[](:display) end def input_classes input_display&.[](:classes) end def input_styles input_display&.[](:styles) end def value data&.[]('text') || @options[:default_value] end def render_label_and_input render_label(:text) do render_input end end def render_label @options[:form].label 'data[text]', field.name, class: 'mdl-textfield__label' end def render_input @options[:form].text_field 'data[text]', value: value, placeholder: @options[:placeholder], class: 'mdl-textfield__input' end def render_wysiwyg @options[:form].cktext_area 'data[text]', value: value, class: "#{input_classes} ckeditor", ckeditor: input_styles end def render_multiline_input @options[:form].text_area 'data[text]', value: value , placeholder: @options[:placeholder], rows: input_display&.[](:rows) , class: 'mdl-textfield__input' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cortex-plugins-core-0.7.0 | app/cells/plugins/core/text_cell.rb |