Class: DrgcmsFormFields::Comment

Inherits:
DrgcmsField show all
Defined in:
app/models/drgcms_form_fields/comment.rb

Overview

Implementation of comment DRG CMS form field. Comments may also be written on the place of form field.

Form options:

  • text: any text. Text will be translated if key is found in translations. (required)

  • type: comment (required)

Form example:

30:
  name: active
  type: check_box

Instance Attribute Summary

Attributes inherited from DrgcmsField

#js

Instance Method Summary collapse

Methods inherited from DrgcmsField

get_data, #hash_to_options, #html, #initialize, #record_text_for, #ro_standard, #set_initial_value, #set_style, #t

Constructor Details

This class inherits a constructor from DrgcmsFormFields::DrgcmsField

Instance Method Details

#renderObject

Render comment field html code



43
44
45
46
# File 'app/models/drgcms_form_fields/comment.rb', line 43

def render
  @html << t(@yaml['comment'], @yaml['comment'])
  self
end