Class: ODDB::View::User::FiPiRadioButtons

Inherits:
HtmlGrid::List show all
Defined in:
src/view/user/fipi_offer_input.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :radio_button,
  [1,0] =>  :radio_text,
}
OFFSET_STEP =
[0,1]
OMIT_HEADER =
true
OMIT_HEAD_TAG =
true
SORT_HEADER =
false
SORT_REVERSE =
false
STRIPED_BG =
false

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Instance Method Details

- (Object) radio_button(model, session)



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

def radio_button(model, session)
  radio = HtmlGrid::InputRadio.new(model.name, model, session)
  radio.value = model.value
  radio.set_attribute('checked', model.checked?)
  radio
end

- (Object) radio_text(model, session)



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'src/view/user/fipi_offer_input.rb', line 29

def radio_text(model, session)
  case model.name[0,2]
  when 'fi'
    price = FI_UPLOAD_PRICES[:processing]
  when 'pi'
    price = PI_UPLOAD_PRICES[:processing]
  end
  if(model.value=='update_ywesee')
    @lookandfeel.lookup(model.value.intern, price.to_s)
  else
    @lookandfeel.lookup(model.value.intern, "0")
  end
end