Class: ODDB::View::PayPalForm

Inherits:
HtmlGrid::Form
  • Object
show all
Defined in:
src/view/centeredsearchform.rb

Constant Summary

CSS_CLASS =
'center'
COMPONENTS =
{
  [0,0] => :donation_logo,
}
FORM_ACTION =
'https://www.paypal.com/cgi-bin/webscr'
COMPONENT_CSS_MAP =
{
  [0,0] =>  'donate',
}
HTML_ATTRIBUTES =
{
  #'width'        =>  '100%',
}

Instance Method Summary (collapse)

Instance Method Details

- (Object) donation_logo(model, session)



41
42
43
44
45
46
47
# File 'src/view/centeredsearchform.rb', line 41

def (model, session)
  image = HtmlGrid::Input.new(:submit, model, session, self)
  image.attributes['src'] = @lookandfeel.resource_global(:paypal_donate)
  image.attributes['type'] = 'image'
  image.attributes['alt'] = "Make payments with PayPal - it's fast, free and secure!"
  image
end

- (Object) hidden_fields(context)



48
49
50
51
52
53
54
55
56
57
58
59
# File 'src/view/centeredsearchform.rb', line 48

def hidden_fields(context)
  ''<<
  context.('cmd', "_xclick")<<
  context.('business', "zdavatz@ywesee.com")<<
  context.('item_name', "ODDB.org")<<
  context.('image_url', "https://www.generika.cc/images/oddb_paypal.jpg")<<
  context.('no_note', "1")<<
  context.('return', @lookandfeel._event_url(:paypal_thanks))<<
  context.('cancel_return', @lookandfeel.base_url)<<
  context.('currency_code', "EUR")<<
  context.('tax', "0")
end