Changeset 17815
- Timestamp:
- 10/01/08 00:54:50 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.datamanager2/renderer/simple.php
r17814 r17815 237 237 { 238 238 return $this->_html; 239 } // end func toHtml239 } 240 240 241 241 /** … … 278 278 } 279 279 $this->_html = str_replace('{content}', $this->_html, $html); 280 280 281 // add a validation script 281 282 if ('' != ($script = $form->getValidationScript())) … … 295 296 { 296 297 $name = $header->getName(); 297 if (!empty($name) && isset($this->_templates[$name])) 298 if (!empty($name) 299 && isset($this->_templates[$name])) 298 300 { 299 301 $this->_html .= str_replace('{header}', $header->toHtml(), $this->_templates[$name]); … … 313 315 * @param string Error message associated with the element 314 316 * @param string Element type (optional) 315 * @access private â€317 * @access privateᅵ 316 318 * @see renderElement() 317 319 * @return string Html for element … … 369 371 else 370 372 { 371 //$html = preg_replace("/([ \t\n\r]*)?<!-- BEGIN error -->.*?<!-- END error -->([ \t\n\r]*)?/is", '', $html);372 373 373 $html = preg_replace("/([ \t\n\r]*)?<!-- BEGIN error -->.*?<!-- END error -->([ \t\n\r]*)?/is", '', $html); 374 374 } … … 410 410 $html = $this->_prepareTemplate($element->getName(), $element->getLabel(), $required, $error, $element->getType()); 411 411 $this->_html .= str_replace('{element}', $element->toHtml(), $html); 412 413 414 412 } 415 413 else if (!empty($this->_groupElementTemplate)) 416 414 { 417 418 415 $html = str_replace('{label}', $element->getLabel(), $this->_groupElementTemplate); 419 416 if ($required) … … 427 424 } 428 425 $this->_groupElements[] = str_replace('{element}', $element->toHtml(), $html); 429 430 426 } 431 427 else … … 478 474 //$this->_currentGroupTemplates[$this->_currentGroupName]['_groupElements'] = $this->_groupElements; 479 475 } 480 481 476 482 477 $this->_currentGroupTemplates[$name] = array … … 549 544 if ($currentGroupId > -1 ) 550 545 { 551 552 546 $this->_currentGroupName = $this->_currentGroups[$currentGroupId]; 553 547 $this->_currentGroupTemplates[$this->_currentGroupName]['_groupElements'][] = $html;
