Class: ODDB::View::Hospitals::HospitalForm

Inherits:
HtmlGrid::Form
  • Object
show all
Includes:
Admin::AddressFormMethods
Defined in:
src/view/hospitals/hospital.rb

Constant Summary

COMPONENTS =
{
  [0,0] =>  :ean13,
  [0,1] =>  :name,
  [0,2] =>  :business_unit,
  [0,3] =>  :address_type,
  [0,4] =>  :title, 
  [0,5] =>  :contact, 
  [0,6] =>  :additional_lines, 
  [0,7] =>  :address, 
  [0,8] =>  :location,
  [0,9] =>  :canton,
  [0,10]  => :fon,
  [0,11]  => :fax,
  [1,12]  => :submit,
  [1,12,1]=>  :set_pass,
}
CSS_MAP =
{
  [0,0,2,13]  => 'list', 
  [0,6] => 'list top',
}
COMPONENT_CSS_MAP =
{
  [0,0,2,12]  => 'standard', 
}
EVENT =
:update
LABELS =
true
LEGACY_INTERFACE =
false
SYMBOL_MAP =
{
  :ean13  => HtmlGrid::Value,
}

Constants included from Admin::AddressFormMethods

COMPONENTS, COMPONENT_CSS_MAP, CSS_MAP, EVENT, LABELS, LEGACY_INTERFACE, SYMBOL_MAP

Instance Method Summary (collapse)

Methods included from Admin::AddressFormMethods

#init

Instance Method Details

- (Object) additional_lines(model)



98
99
100
# File 'src/view/hospitals/hospital.rb', line 98

def additional_lines(model)
  super(model.address(0))
end

- (Object) address(model)



101
102
103
# File 'src/view/hospitals/hospital.rb', line 101

def address(model)
  address_input(:address, model)
end

- (Object) address_input(symbol, model)



104
105
106
# File 'src/view/hospitals/hospital.rb', line 104

def address_input(symbol, model)
  HtmlGrid::InputText.new(symbol, model.address(0), @session, self)
end

- (Object) address_type(model)



110
111
112
113
# File 'src/view/hospitals/hospital.rb', line 110

def address_type(model)
  HtmlGrid::Select.new(:address_type, model.address(0), 
    @session, self)
end

- (Object) canton(model)



114
115
116
# File 'src/view/hospitals/hospital.rb', line 114

def canton(model)
  address_input(:canton, model)
end

- (Object) contact(model)



107
108
109
# File 'src/view/hospitals/hospital.rb', line 107

def contact(model)
  address_input(:contact, model)
end

- (Object) fax(model)



117
118
119
# File 'src/view/hospitals/hospital.rb', line 117

def fax(model)
  address_input(:fax, model)
end

- (Object) fon(model)



120
121
122
# File 'src/view/hospitals/hospital.rb', line 120

def fon(model)
  address_input(:fon, model)
end

- (Object) location(model)



126
127
128
# File 'src/view/hospitals/hospital.rb', line 126

def location(model)
  address_input(:location, model)
end

- (Object) set_pass(model)



129
130
131
132
133
134
# File 'src/view/hospitals/hospital.rb', line 129

def set_pass(model)
  button = HtmlGrid::Button.new(:set_pass, model, @session, self)
  script = 'this.form.event.value="set_pass"; this.form.submit();'
  button.set_attribute('onClick', script)
  button
end

- (Object) title(model)



123
124
125
# File 'src/view/hospitals/hospital.rb', line 123

def title(model)
  address_input(:title, model)
end