protected function _render() { $utils = Utils::getInstance(); if ($utils->globals->session('send_operation') && $utils->globals->session('target_form') == $this->ref) { $this->_oNode->setAttribute('method', 'get'); $this->_oNode->setAttribute('action', '#'); DOMParser::replaceNodeContent($this->_getSendedMessage(), $this->_oNode); } else { if ($this->ignored !== $this->_getIgnoredInputs()) { $this->ignored = $this->_getIgnoredInputs(); $this->save(); } if ($utils->globals->has('send_operation', 'session') && $utils->globals->session('target_form') == $this->ref) { DOMNode::appendToNode($this->_getErrorMessage(), $this->_oNode); } $this->_oNode->setAttribute('method', 'post'); if ($this->_sLang) { $this->_oNode->setAttribute('action', '/' . $this->_sLang . '/form/' . $this->ref . '/send.html'); } else { $this->_oNode->setAttribute('action', '/form/' . $this->ref . '/send.html'); } } unset($_SESSION['target_form']); unset($_SESSION['send_operation']); }
protected function _render() { $this->_bTableMode = strtolower($this->_oNode->nodeName) == 'table'; $oListElementNode = $this->_bTableMode ? $this->_oNode->getElementsByTagName('tr')->item(0) : $this->_oNode->getElementsByTagName('li')->item(0); $sCode = ''; foreach ($this->content as $iIndex => $sListElementKey) { $oClonedListElementNode = $oListElementNode->cloneNode(true); foreach (DOMParser::findBricks($oClonedListElementNode) as $oSubBrickNode) { $oSubBrickNode->setAttribute('data-brick', $this->ref . '.' . $sListElementKey . '.' . $oSubBrickNode->getAttribute('data-brick')); $oSubBrickNode->setAttribute('data-list-ref', $this->ref); $oSubBrickNode->setAttribute('data-list-index', $iIndex + 1); } DOMParser::getNodeContent($oClonedListElementNode, $sClonedListElementNodeContent); if ($this->_bTableMode) { $sCode .= '<tr>' . $sClonedListElementNodeContent . '</tr>'; } else { $sCode .= '<li>' . $sClonedListElementNodeContent . '</li>'; } unset($oClonedListElementNode, $sClonedListElementNodeContent); } DOMParser::replaceNodeContent($sCode, $this->_oNode); $this->_clean(); }