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');
 }
示例#2
0
 function createComponentConfirmForm()
 {
     $form = new ConfirmationDialog();
     $form->addConfirmer('delete', array($this, 'deleteMenu'), array($this, 'questionDelete'));
     return $form;
 }
示例#3
0
 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;
 }
示例#5
0
 function createComponentConfirmForm()
 {
     $form = new ConfirmationDialog();
     $form->addConfirmer('delete', array($this, 'deleteCategory'), 'Really delete category?');
     return $form;
 }
示例#6
0
 function createComponentConfirmForm()
 {
     $form = new ConfirmationDialog();
     $form->addConfirmer('delete', array($this, 'deleteRole'), 'Really delete role? User will be left without any privileges!!');
     return $form;
 }