public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     if ($this->getRequest()->isValidated()) {
         $view->getCommandList()->sendQuery($view->getModuleUrl('/MailQueue/read'));
     }
 }
Exemplo n.º 2
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['WanMode'] = $this->getPlatform()->getDatabase('configuration')->getProp('firewall', 'WanMode');
     $view['WanModeDatasource'] = array_map(function ($fmt) use($view) {
         return array($fmt, $view->translate($fmt . '_label'));
     }, $this->modes);
 }
Exemplo n.º 3
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['username'] = $this->getAdapter()->getKeyValue();
     $view['ChangePassword'] = $view->getModuleUrl('../ChangePassword');
     $defaults = array_merge(array('Company' => '', 'Department' => '', 'City' => '', 'Street' => '', 'PhoneNumber' => ''), $this->getPlatform()->getDatabase('configuration')->getKey('OrganizationContact'));
     $view['Default_Company'] = $defaults['Company'];
     $view['Default_Dept'] = $defaults['Department'];
     $view['Default_City'] = $defaults['City'];
     $view['Default_Street'] = $defaults['Street'];
     $view['Default_Phone'] = $defaults['PhoneNumber'];
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     $parent = $this->getParent();
     $dsMap = function ($x) use($parent, $view) {
         return array($x, sprintf("%s %s", $x, call_user_func(array($parent, 'getRoleText'), $view, $x)));
     };
     parent::prepareView($view);
     $view['PppoeInterfaceDatasource'] = array_map($dsMap, $this->getValidInterfaces());
 }
Exemplo n.º 5
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     $this->innerAction->prepareView($view);
     $this->plugins->prepareView($view->spawnView($this->plugins, TRUE));
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['username'] = $this->userName;
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['role'] = $this->getPlatform()->getDatabase('SESSION')->getProp(get_class($this->getParent()), 'role');
     $view['role_header'] = $view->translate($view['role'] . '_label');
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['message'] = $this->getMessageText($view);
 }
Exemplo n.º 9
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['ibay'] = $this->key;
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['values'] = $this->parameters->getArrayCopy();
     $view['actions'] = $this->getActionsText($view);
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $X2 = function ($x) use($view) {
         if ($x === '') {
             return array($x, $view->translate("NoSuccessor_label"));
         } else {
             return array($x, $x);
         }
     };
     $view['successorDatasource'] = array_map($X2, array_merge($this->getDeviceParts($this->parameters['device']), array('')));
     $view['message'] = $view->translate(sprintf("DeleteLogicalInterface_%s_message", $this->parameters['type']), \iterator_to_array($this->parameters));
 }
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     if ($this->getRequest()->isValidated()) {
         $view['roleDatasource'] = array_map(function ($fmt) use($view) {
             return array($fmt, $view->translate($fmt . '_label'));
         }, $this->getParent()->getInterfaceRoles());
         $parent = $this->getParent();
         $dsMap = function ($x) use($parent, $view) {
             return array($x, sprintf("%s %s", $x, call_user_func(array($parent, 'getRoleText'), $view, $x)));
         };
         $view['bondDatasource'] = array_map($dsMap, $this->getBondParts());
         $view['bondModeDatasource'] = array_map(function ($x) use($view) {
             return array($x, $view->translate("BondMode_{$x}_label"));
         }, $this->bondModeList);
         $view['bridgeDatasource'] = array_map($dsMap, $this->getBridgeParts());
         if ($this->getRequest()->isMutation()) {
             if ($this->parameters['type'] === 'xdsl') {
                 $view->getCommandList()->sendQuery($view->getModuleUrl('../SetPppoeParameters'));
             } else {
                 $view->getCommandList()->sendQuery($view->getModuleUrl('../SetIpAddress'));
             }
         } else {
             $view->getCommandList()->show();
         }
     }
     if (!$view['type']) {
         $view['type'] = 'bond';
     }
 }
Exemplo n.º 13
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view['messageCount'] = $this->messageCount;
 }
Exemplo n.º 14
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     $view->copyFrom($this->getCertDefaults());
 }
Exemplo n.º 15
0
 public function prepareView(\Nethgui\View\ViewInterface $view)
 {
     parent::prepareView($view);
     if ($this->getIdentifier() === 'create') {
         $view['OwnersDatasource'] = $this->getOwnersDatasource($view);
         $view->setTemplate('NethServer\\Template\\MailAccount\\SharedMailbox\\Edit');
         $view['domainAddressDatasource'] = $this->readDomainAddressDatasource($view);
     } elseif ($this->getIdentifier() === 'delete') {
         $view['__key'] = 'Name';
         // tell what is the key parameter
         $view->setTemplate('Nethgui\\Template\\Table\\Delete');
     } elseif ($this->getIdentifier() === 'update') {
         $view['OwnersDatasource'] = $this->getOwnersDatasource($view);
         $view['Others'] = $this->others;
         $view->setTemplate('NethServer\\Template\\MailAccount\\SharedMailbox\\Edit');
     }
     if ($this->getRequest()->isMutation()) {
         if ($this->getRequest()->isValidated() && $this->getIdentifier() === 'create' && $this->parameters['CreateAlias'] === 'enabled') {
             $view->getCommandList()->sendQuery($view->getModuleUrl('/MailAccount/Pseudonym'));
         }
     } else {
         $this->parameters['CreateAlias'] = 'enabled';
     }
 }