1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>
<div class="sf_admin_form">
<?php echo form_tag_for($form, '@groupasset') ?>
<?php echo $form->renderHiddenFields(false) ?>
<?php if ($form->hasGlobalErrors()): ?>
<?php echo $form->renderGlobalErrors() ?>
<?php endif; ?>
<?php
$infoGal='<table>';
foreach($form as $key=>$widget)
{
if($key=='listAsset'){
$listAsset = '<table>';
foreach($widget as $subKey=>$subForm){
//echo '<tr><td>'.$subKey.'</td>';
$listAsset.='<tr>';
$ob=$subForm->getObject() //********* cette ligne ne fonctionne pas *********/
if($subKey==1)
{
$listAsset.= '<td> </td>';
foreach($subForm as $field)
{
if(!$field->isHidden()) $listAsset.= '<td>'.$field->renderLabel().'</td>';
}
$listAsset.= '</tr>';
}
foreach($subForm as $field){
$listAsset.= '<td>'.$field->render().'<br>'.$field->renderError().'</td>';
}
$listAsset.= '</tr>';
}
$listAsset.= '</table>';
}
elseif(!$widget->isHidden())
{
$infoGal.= $widget->renderRow();
}
}
$infoGal.='</table>';
?>
<table>
<tr>
<td><?php echo $infoGal ?> </td>
<td><?php echo $listAsset ?></td>
</tr>
</table>
<?php include_partial('groupasset/form_actions', array('groupasset' => $groupasset, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
</form>
</div> |
Partager