Class: ODDB::View::Admin::SponsorForm

Inherits:
Form
  • Object
show all
Includes:
HtmlGrid::ErrorMessage
Defined in:
src/view/admin/sponsor.rb

Constant Summary

COMPONENTS =
{
  [0,0]   => :company_name,
  [0,1]   => :sponsor_until,
  [0,2]   =>  :emails,
  [0,3]   => :url_de,
  [0,4]   => :url_fr,
  [0,5]   => :logo_file,
  [0,6]   => :logo_fr,
  [1,7]   => :submit,
}
COMPONENT_CSS_MAP =
{
  [0,0,2,5] =>  'standard',
}
CSS_MAP =
{
  [0,0,2,8] =>  'list',
}
LABELS =
true
LEGACY_INTERFACE =
false
SYMBOL_MAP =
{
  :sponsor_until  => HtmlGrid::InputDate,
  :logo_file      => HtmlGrid::InputFile,
  :logo_fr        =>  HtmlGrid::InputFile,
}
TAG_METHOD =
:multipart_form

Constants included from FormMethods

ACCEPT_CHARSET, DEFAULT_CLASS, EVENT

Instance Method Summary (collapse)

Methods included from FormMethods

#delete_item, #delete_item_warn, #get_event_button, #post_event_button

Instance Method Details

- (Object) emails(model)



45
46
47
48
49
50
51
# File 'src/view/admin/sponsor.rb', line 45

def emails(model)
  input = HtmlGrid::InputText.new(:emails, model, @session, self)
  if emails = model.emails
    input.value = emails.join(', ')
  end
  input
end

- (Object) init



41
42
43
44
# File 'src/view/admin/sponsor.rb', line 41

def init
  super
  error_message()
end

- (Object) url(lang, model)



52
53
54
55
56
# File 'src/view/admin/sponsor.rb', line 52

def url(lang, model)
  input = HtmlGrid::InputText.new("urls[#{lang}]", model, @session, self)
  input.value = model.url(lang)
  input
end

- (Object) url_de(model)



57
58
59
# File 'src/view/admin/sponsor.rb', line 57

def url_de(model)
  url :de, model
end

- (Object) url_fr(model)



60
61
62
# File 'src/view/admin/sponsor.rb', line 60

def url_fr(model)
  url :fr, model
end