class YDIM::Html::View::AutoInvoiceReminderComposite

Constants

COMPONENTS
COMPONENT_CSS_MAP
CSS_MAP
LABELS

Public Instance Methods

reminder_body(model) click to toggle source
# File lib/ydim/html/view/autoinvoice.rb, line 36
def reminder_body(model)
  input = HtmlGrid::Textarea.new(:reminder_body, model, @session, self)
  input.set_attribute('wrap', 'hard')
  input.set_attribute('cols', '72')
  input.set_attribute('style', 'font-family: fixed;')
  input.label = true
  input.unescaped = true
  value = model.reminder_body
  if(value.nil? || value.empty?)
    input.value = @session.state.format_invoice
  end
  input
end
reminder_date(model) click to toggle source
# File lib/ydim/html/view/autoinvoice.rb, line 49
def reminder_date(model)
  body = model.reminder_body.to_s.strip
  subject = model.reminder_subject.to_s.strip
  if(body.empty? || subject.empty? || !model.date)
    @lookandfeel.lookup(:reminder_none)
  else
    (model.date << 1).strftime(@lookandfeel.lookup(:reminder_date))
  end
end