Esempio n. 1
0
 public function getLoginForm($returnUrl = null)
 {
     $form = new Form();
     $form->setMethod('POST');
     $form->setAction('/member/login');
     $form->disableValidation();
     if (!is_null($returnUrl)) {
         $rtn = new Hidden();
         $rtn->setName('rtn');
         $rtn->setValue($returnUrl);
         $form->addField($rtn);
     }
     $form->addField(Email::create('email', 'Email Address', true));
     $form->addField(Password::create('password', 'Password', true));
     $submit = new Submit();
     $submit->setClass('button pull-right');
     $submit->setValue('Login');
     $form->addField($submit);
     return $form;
 }
Esempio n. 2
0
 protected function resetPasswordForm($memberId, $key)
 {
     $form = new Form();
     $form->setMethod('POST');
     $form->setAction('/member/reset-password/' . $memberId);
     $form->enableValidation();
     $form->addField(Hidden::create('k', 'Key', true));
     $form->addField(Password::create('password', 'Your New Password', true));
     $submit = new Submit();
     $submit->setClass('button pull-right');
     $submit->setValue('Reset and Login');
     $form->setValues(['k' => $key]);
     $form->addField($submit);
     return $form;
 }