Class: ODDB::View::User::RegisterDownloadForm

Inherits:
Form
  • Object
show all
Includes:
HtmlGrid::ErrorMessage, AutoFill
Defined in:
src/view/user/register_download.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :email,
  [0,1] =>  :salutation,
  [0,2] =>  :name_last,
  [0,3] =>  :name_first,
  [0,4] =>  :company_name,
  [0,5] =>  :address,
  [0,6] =>  :plz,
  [0,7] =>  :city,
  [0,8] =>  :phone,
  [0,9] =>  :business_area,
  [1,10]=>  :submit,
}
CSS_CLASS =
'component'
HTML_ATTRIBUTES =
{
  'style' =>  'width:30%',
}
EVENT =
:checkout
LABELS =
true
CSS_MAP =
{
  [0,0,4,11]  => 'list',
}
COMPONENT_CSS_MAP =
{
  [1,0,3,10]  => 'standard',
}
SYMBOL_MAP =
{
  :salutation     =>  HtmlGrid::Select,
  :business_area  => HtmlGrid::Select,
  :pass           => HtmlGrid::Pass,
  :set_pass_2     =>  HtmlGrid::Pass,
}
LEGACY_INTERFACE =
false

Constants included from FormMethods

ACCEPT_CHARSET, DEFAULT_CLASS, EVENT

Instance Method Summary (collapse)

Methods included from AutoFill

#email

Methods included from FormMethods

#delete_item, #delete_item_warn, #get_event_button, #post_event_button

Instance Method Details

- (Object) hidden_fields(context)



63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'src/view/user/register_download.rb', line 63

def hidden_fields(context)
   = super
  if(downloads = @session.user_input(:download))
    downloads.each { |key, val|
       << context.("download[#{key}]", val)
    }
  end
  if(months = @session.user_input(:months))
    months.each { |key, val|
       << context.("months[#{key}]", val)
    }
  end
  
end

- (Object) init



50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'src/view/user/register_download.rb', line 50

def init
  unless(@session.logged_in?)
    hash_insert_row(components, [0,1], :pass)
    components.store([3,1], :set_pass_2)
    css_map.store([0,11,4], 'list')
    component_css_map.store([1,10], 'standard')
  end
  super
  if(@session.error?)
    error = RuntimeError.new('e_need_all_input')
    __message(error, 'processingerror')
  end
end