Class: DrgcmsFormFields::PasswordField
- Inherits:
-
DrgcmsField
- Object
- DrgcmsField
- DrgcmsFormFields::PasswordField
- Defined in:
- app/models/drgcms_form_fields.rb
Overview
Implementation of password DRG CMS form field.
Form options:
-
type:
password_field (required) -
name:
Field name (required) -
html:
html options which apply to password field (optional)
Form example:
20:
name: password
type: pasword_field
html:
size: 20
30:
name: password_confirmation
type: pasword_field
html:
size: 20
Instance Attribute Summary
Attributes inherited from DrgcmsField
Instance Method Summary collapse
-
#render ⇒ Object
Render password field html code.
Methods inherited from DrgcmsField
get_data, #hash_to_options, #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
#render ⇒ Object
Render password field html code
890 891 892 893 894 895 896 |
# File 'app/models/drgcms_form_fields.rb', line 890 def render return self if @readonly @yaml['html'] ||= {} record = record_text_for(@yaml['name']) @html << @parent.password_field(record, @yaml['name'], @yaml['html']) self end |