Module: ODDB::View::User::AutoFill

Included in:
Drugs::RegisterDownloadForm, RegisterDownloadForm, RegisterPowerUserForm
Defined in:
src/view/user/autofill.rb

Instance Method Summary (collapse)

Instance Method Details

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



8
9
10
11
12
13
14
15
16
17
# File 'src/view/user/autofill.rb', line 8

def (model, session=@session)
  input = HtmlGrid::InputText.new(:email, @session.user, @session, self)
  url = @lookandfeel._event_url(:ajax_autofill, {:email => nil})
  if(@session.logged_in?)
    input.set_attribute('disabled', true)
  else
    input.set_attribute('onChange', "autofill(this.form, 'email', '#{url}');")
  end
  input
end