public function __construct($parent, $name) { /* @var $session \Nette\Http\Session */ $session = $parent->context->session; $section = $session->getSection('confirm-dialog-' . $name); parent::__construct($section, $parent, $name); $this->parentPresenter = $parent; $this->modelLoader = $parent->context->modelLoader; $this->getFormElementPrototype()->addClass('ajax'); }
function createComponentConfirmForm() { $form = new ConfirmationDialog(); $form->addConfirmer('delete', array($this, 'deleteMenu'), array($this, 'questionDelete')); return $form; }
function createComponentConfirmForm() { $form = new ConfirmationDialog(); $form->addConfirmer('empty', array($this, 'emptyCart'), 'Opravdu chcete vysypat košík?'); return $form; }
/** * Funkce pro vytvoření komponenty potvrzovacího dialogu * @return \ConfirmationDialog */ protected function createComponentConfirmationDialog() { $form = new \ConfirmationDialog($this->getSession('confirmationDialog')); $translator = $this->translator; $form->addConfirmer('deleteDatasourceColumn', array($this, 'deleteDatasourceColumn'), function () use($translator) { $html = Html::el('div'); $html->setHtml('<h1>' . $translator->translate('Delete data field') . '</h1><p>' . $translator->translate('Do your really want to delete this data field?') . '</p>'); return $html; }); return $form; }
function createComponentConfirmForm() { $form = new ConfirmationDialog(); $form->addConfirmer('delete', array($this, 'deleteCategory'), 'Really delete category?'); return $form; }
function createComponentConfirmForm() { $form = new ConfirmationDialog(); $form->addConfirmer('delete', array($this, 'deleteRole'), 'Really delete role? User will be left without any privileges!!'); return $form; }