コード例 #1
0
 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
ファイル: AdminMenusPresenter.php プロジェクト: bazo/Mokuji
 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;
 }
コード例 #4
0
 /**
  * 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
ファイル: UsersUsersPresenter.php プロジェクト: bazo/Mokuji
 function createComponentConfirmForm()
 {
     $form = new ConfirmationDialog();
     $form->addConfirmer('delete', array($this, 'deleteRole'), 'Really delete role? User will be left without any privileges!!');
     return $form;
 }