示例#1
0
 public function init()
 {
     parent::init();
     $this->addClass('btn-group');
     $this->addClass('pull-right');
     $this->attributes['role'] = 'group';
     $this->add(html::button(lucid::$app->i18n()->translate('button:cancel'), 'secondary', 'history.go(-1);'));
     $this->add(html::submit(lucid::$app->i18n()->translate('button:save')));
 }
示例#2
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;
 }