Class: AgileFormFields::PasswordField
- Inherits:
-
AgileFormField
- Object
- AgileFormField
- AgileFormFields::PasswordField
- Defined in:
- app/models/agile_form_fields/password_field.rb
Overview
Implementation of password AgileRails 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 AgileFormField
Instance Method Summary collapse
-
#render ⇒ Object
Render password AgileRails form field code.
Methods inherited from AgileFormField
get_data, #hash_to_options, #html, #initialize, #options_to_hash, #record_text_for, #ro_standard, #set_css_code, #set_default_value, #set_initial_value, #set_style, #t
Constructor Details
This class inherits a constructor from AgileFormFields::AgileFormField
Instance Method Details
#render ⇒ Object
Render password AgileRails form field code
52 53 54 55 56 57 58 59 60 |
# File 'app/models/agile_form_fields/password_field.rb', line 52 def render return self if @readonly @yaml['html'] ||= {} @yaml['html']['size'] ||= @yaml['size'] record = record_text_for(@yaml['name']) @html += @env.password_field(record, @yaml['name'], @yaml['html']) self end |