示例#1
0
 public function _loginForm()
 {
     $card = html::card();
     $card->add(html::cardHeader(lucid::$app->i18n()->translate('navigation:authentication.view.login')));
     $card->add(html::cardBlock());
     $card->lastChild()->add(html::form('authform', '#!authentication.controller.process'));
     $form = $card->lastChild()->lastChild();
     $form->add(html::formGroup(lucid::$app->i18n()->translate('model:users:email'), html::input('email', 'email')->preAddon('@')));
     $form->add(html::formGroup(lucid::$app->i18n()->translate('model:users:password'), html::input('password', 'password')->preAddon(html::icon('lock'))));
     $form->add(html::submit(lucid::$app->i18n()->translate('button:login'))->pull('right'));
     $this->ruleset('login')->send($form->name);
     return $card;
 }