Class: ODDB::View::Admin::SelectIndicationForm

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

Constant Summary

CSS_CLASS =
'composite'
COMPONENTS =
{
  [0,0]     =>  :selection_list,
  [0,1,0]   => :pointer,
  [0,1,1]   => :user_input,
  [0,1,2]   =>  :user_input_hint,
  [0,2]     =>  :submit,
}
LABELS =
false
SYMBOL_MAP =
{
  :user_input_hint =>  HtmlGrid::Text,
}
EVENT =
:update

Instance Method Summary (collapse)

Instance Method Details

- (Object) init



24
25
26
27
28
29
30
31
32
33
34
# File 'src/view/admin/selectindication.rb', line 24

def init
  if(@model.selection.empty?)
    @components = {
      [0,0,0] =>  :pointer,
      [0,0,1] =>  :user_input,
      [0,0,2] =>  :user_input_hint,
      [0,1]   => :submit,
    }
  end
  super
end

- (Object) pointer(model, session)



35
36
37
# File 'src/view/admin/selectindication.rb', line 35

def pointer(model, session)
  HtmlGrid::InputRadio.new(:pointer, model.new_indication, session, self)
end

- (Object) selection_list(model, session)



38
39
40
# File 'src/view/admin/selectindication.rb', line 38

def  selection_list(model, session)
  SelectionList.new(model.selection, session, self)
end

- (Object) user_input(model, session)



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

def user_input(model, session)
  model.user_input[:indication]
end