Class: YDIM::Html::View::DebitorForm
- Inherits:
-
HtmlGrid::Form
- Object
- HtmlGrid::Form
- YDIM::Html::View::DebitorForm
- Defined in:
- lib/ydim/html/view/debitor.rb
Constant Summary collapse
- COMPONENTS =
{ [0,0] => :unique_id, [0,1] => :debitor_type, [0,2] => :name, [0,3] => :salutation, [0,4] => :contact, [0,5] => :contact_firstname, [0,6] => :contact_title, [0,7] => :address_lines, [0,8] => :location, [0,9] => :country, [0,10] => :emails, [0,11] => :phone, [1,12] => :submit, }
- FORM_ID =
'debitor'
- EVENT =
:update
- SYMBOL_MAP =
{ :debitor_type => HtmlGrid::Select, :unique_id => HtmlGrid::Value, :salutation => HtmlGrid::Select, }
Constants inherited from HtmlGrid::Form
HtmlGrid::Form::DEFAULT_CLASS, HtmlGrid::Form::LABELS
Instance Method Summary collapse
Methods inherited from HtmlGrid::Form
Instance Method Details
#emails(model, session = @session) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ydim/html/view/debitor.rb', line 42 def emails(model, session=@session) input = HtmlGrid::InputText.new(:emails, model, @session, self) if error = @session.error(:emails) input.value = error.value else input.value = model.emails.join(', ') end input.css_class = 'extralarge' input end |
#hidden_fields(context) ⇒ Object
52 53 54 |
# File 'lib/ydim/html/view/debitor.rb', line 52 def hidden_fields(context) super << context.hidden('unique_id', @model.unique_id) end |