function render() { $this->view->headLink()->appendStylesheet('/css/express-table/style.css'); $formGroups = $this->_config->getFormGroups(); // print_r($formGroups); ?> <div style="text-align: center; width: 100%; padding-left: 20px" align="center" > <table class="statistics " style="width: 90%"> <?php $index = 0; foreach ($formGroups as $groups) { ?> <tr><th style="height: 5px"><?php echo $groups['label']; ?> </th></tr> <tr><td> <table class="hor-minimalist-b" style="width: 95%"> <?php foreach ($this->_config->getFormGroupElements(null, $index) as $elementid) { $prop = $this->_config->getPropByName($elementid); ?> <tr> <td style="text-align: left; width: 20%; max-width: 200px;text-transform: capitalize;font-weight: bold;;" ><?php echo $this->view->translate($prop->label); ?> </td> <td style="width: 10px"> : </td> <td style="text-align: left;" ><?php echo $this->_model->{$elementid}; ?> </td> </tr> <?php } ?> </table> </td></tr> <?php $index += 1; } ?> </table></div> <?php }
function render() { $this->view->headLink()->appendStylesheet('/css/express-table/style.css'); $formGroups = $this->_config->getFormGroups($this->_uiName); // print_r($formGroups); ?> <style > dt{ display:none; } </style> <form id='<?php echo $this->_form_id; ?> ' method="post" class='form-horizontal' role="form" action="<?php echo $this->view->url(); ?> " > <?php $index = 0; foreach ($formGroups as $groups) { ?> <fieldset> <h5><?php echo $groups['label']; ?> </h5> <?php foreach ($this->_config->getFormGroupElements($this->_uiName, $index) as $elementid) { $prop = $this->_config->getPropByName($elementid); $element = $this->getFormElement($elementid, $prop); $isRequired = true; if ($element instanceof Zend_Form_Element) { $isRequired = $element->isRequired(); } if (!$prop->isAllowEdit) { continue; } $style = ""; if ($prop->input == 'hidden') { $style = 'display: none;'; } ?> <div class="form-group"> <label for="<?php echo $elementid; ?> " class="col-sm-2 control-label"> <?php echo $this->view->translate($prop->label); ?> <?php if ($isRequired and $prop->modification == 'changeable') { echo "<span style='color: red;'>*<span>"; } ?> </label> <div class="col-sm-10"> <?php if (true == $this->_form->isEditForm()) { if ('readonly' == $prop->modification) { $value = $element->getValue(); echo $this->_config->fieldTranform($elementid, $value); echo "<input id='{$elementid}' name='{$elementid}' type='hidden' value='{$value}'>"; } else { echo $element; } } else { echo $element; } ?> </div> </div> <?php } ?> </fieldset> <?php $index += 1; } ?> </form> <?php $this->view->jQuery()->onLoadCaptureStart(); ?> $('form#<?php echo $this->_form_id; ?> ').find('dt').remove(); $('#SaveButton').unbind().bind('click',function(){ $('form#<?php echo $this->_form_id; ?> ').submit(); }); <?php $this->view->jQuery()->onLoadCaptureEnd(); ?> <?php }