Class: ODDB::View::Admin::LoginForm

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

Constant Summary

COMPONENTS =
{
  [0,0]   =>  :email,
  [0,1]   =>  :pass,
  [1,2,0] =>  :remember_me,
  [1,2,1] =>  'remember_me',
  [1,3]   =>  :submit,
  [1,4] =>  :password_lost,
}
CSS_MAP =
{
  [0,0,2,5] =>  'list',
}
CSS_CLASS =
'component'
EVENT =
:login
LABELS =
true
SYMBOL_MAP =
{
  :pass        => HtmlGrid::Pass,
}
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Instance Method Details

- (Object) email(model)



32
33
34
35
36
37
# File 'src/view/admin/loginform.rb', line 32

def (model)
  input = HtmlGrid::InputText.new(:email, model, @session, self)
  input.css_id = 'email'
  self.onload = "document.getElementById('email').focus();"
  input
end

- (Object) remember_me(model)



38
39
40
41
42
43
# File 'src/view/admin/loginform.rb', line 38

def remember_me(model)
  box = HtmlGrid::InputCheckbox.new(:remember_me, model, @session, self)
  box.set_attribute 'checked', @session.cookie_set_or_get(:remember_me)
  box.label = false
  box
end