Пример #1
0
 /**
  * @param UserEditForm $form
  */
 public function formSubmitted(UserEditForm $form)
 {
     try {
         $this->userManager->edit($form->getValues());
         $form->presenter->flashMessage('User was edited.', 'success');
     } catch (\Nette\InvalidArgumentException $ex) {
         $form->addError($ex->getMessage());
     }
 }
 /**
  * @see Form::readFormParameters()
  */
 public function readFormParameters()
 {
     parent::readFormParameters();
     if (isset($_POST['styleID'])) {
         $this->styleID = intval($_POST['styleID']);
     }
 }
Пример #3
0
<?php

require_once "config.php";
require_once RESACCMAN_BASE . "/classes/html/UserEditForm.php";
$form = new UserEditForm($u);
$form->printContent();
Пример #4
0
            $objControl->Blink();
        }
        return $blnToReturn;
    }
    // Button Event Handlers
    protected function btnSave_Click($strFormId, $strControlId, $strParameter)
    {
        // Delegate "Save" processing to the UserMetaControl
        $this->mctUser->SaveUser();
        $this->RedirectToListPage();
    }
    protected function btnDelete_Click($strFormId, $strControlId, $strParameter)
    {
        // Delegate "Delete" processing to the UserMetaControl
        $this->mctUser->DeleteUser();
        $this->RedirectToListPage();
    }
    protected function btnCancel_Click($strFormId, $strControlId, $strParameter)
    {
        $this->RedirectToListPage();
    }
    // Other Methods
    protected function RedirectToListPage()
    {
        QApplication::Redirect(__VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/user_list.php');
    }
}
// Go ahead and run this form object to render the page and its event handlers, implicitly using
// user_edit.tpl.php as the included HTML template file
UserEditForm::Run('UserEditForm');