Class: ODDB::View::Admin::ResellerRegistrationForm

Inherits:
Form
  • Object
show all
Includes:
HtmlGrid::ErrorMessage, ODDB::View::AdditionalInformation, FachinfoPdfMethods
Defined in:
src/view/admin/registration.rb

Constant Summary

COMPONENTS =
{
  [0,0]   => :iksnr,
  [2,0]   => :registration_date,
  [0,1]   => :company_name,
  [2,1]   => :revision_date,
  [0,2]   => :indication,
  [2,2]   => :inactive_date,
  [0,3]   => :fi_upload_instruction0,
  [1,3]   => :not_invoiceable,
  [2,3]   => :fachinfo_label,
  [3,3,0] =>  :fachinfo,
}
CSS_MAP =
{
  [0,0,4,3] =>  'list',
  [0,3]     =>  'list',
  [1,3]     =>  'list',
  [2,3,2]   => 'list',
}
DEFAULT_CLASS =
HtmlGrid::Value
LABELS =
true
SYMBOL_MAP =
{
  :expiration_date    =>  HtmlGrid::DateValue,
  :registration_date  => HtmlGrid::DateValue,
  :revision_date      => HtmlGrid::DateValue,
  :fachinfo_label     =>  HtmlGrid::LabelText,
  :fi_upload_instruction0=> HtmlGrid::LabelText,
}

Constants included from FachinfoPdfMethods

TAG_METHOD

Constants included from FormMethods

ACCEPT_CHARSET, DEFAULT_CLASS, EVENT

Instance Method Summary (collapse)

Methods included from FachinfoPdfMethods

#assign_fachinfo, #fachinfo_upload, #language_select

Methods included from ODDB::View::AdditionalInformation

#_fachinfo, #atc_ddd_link, #atc_description, #comarketing, #complementary_type, #compositions, #ddd_price, #deductible, #fachinfo, #feedback, #google_search, #ikscat, #limitation_link, #limitation_text, #minifi, #narcotic, #notify, #patent, #patinfo, #qty_unit, #square, #twitter_share

Methods included from PartSize

#comparable_size, #part_size

Methods included from Drugs::AtcDddLink

#atc_ddd_link

Methods included from FormMethods

#delete_item, #delete_item_warn, #get_event_button, #post_event_button

Instance Method Details

- (Object) init



348
349
350
351
352
# File 'src/view/admin/registration.rb', line 348

def init
  reorganize_components
  super
  error_message()
end

- (Object) not_invoiceable(model, session = @session)



372
373
374
375
376
377
# File 'src/view/admin/registration.rb', line 372

def not_invoiceable(model, session=@session)
  link = PointerLink.new(:e_company_not_invoiceable, 
                         model.company, @session, self)
  link.label = false
  link
end

- (Object) reorganize_components



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'src/view/admin/registration.rb', line 353

def reorganize_components
  if(@model.company.invoiceable?)
    components.update({
      [3,3,1] =>  :assign_fachinfo,
      [0,4]   => 'fi_upload_instruction1',
      [1,4]   => :language_select,
      [0,5]   => 'fi_upload_instruction2',
      [1,5]   => :fachinfo_upload,
      [0,6]   => 'fi_upload_instruction3',
      [1,6]   => :submit,
    })
    components.delete([1,3])
    css_map.update({
      [0,3]     =>  'list bold',
      [1,3]     =>  'list bg',
      [0,4,2,3] =>  'list bg',
    })
  end
end