BUG 13507 "Campos hidden en grillas." SOLVED

- Campos hidden en grillas.
- Problema:
  Cuando se crean campos de tipo "hidden" en grillas, estos campos crean columnas y cuando eran mas campos de este tipo
  habia mas columnas viendose como un espacio en blanco.

  Solucion:
  Se agrega una condicion en donde se determina si el campo de tipo "hidden" se oculta la columna aplicando un estilo.

  {if ($field->type != "hidden")}
     ...
  {else}
     <td style="display: none;"></td>
  {/if}
  Este cambio estara disponible a partir de la version 2.5.2
This commit is contained in:
Luis Fernando Saisa Lopez
2013-11-15 15:48:32 -04:00
parent 32426ddb66
commit aaf54b09c6

View File

@@ -20,9 +20,15 @@
<table class="tableGrid" name="{$form->name}" id="{$form->name}" cellpadding="0" cellspacing="0" border="0">
<tr>
<td> </td>
{foreach from=$form->fields item=field}
<td class='vFormTitle'>{if (isset($field->required)&&$field->required&&$field->mode==='edit')}<font color="red">* </font>{/if}{$field->label}{$field->renderHint()}</td>
{if ($field->type != "hidden")}
<td class="vFormTitle">{if (isset($field->required) && $field->required && $field->mode == "edit")}<font color="red">* </font>{/if}{$field->label}{$field->renderHint()}</td>
{else}
<td style="display: none;"></td>
{/if}
{/foreach}
</tr>
{literal}
{section name=row loop=$form_rows}
@@ -33,9 +39,15 @@
{/if}
<td class='GridLabel'> {$smarty.section.row.index+1} </td>
{/literal}
{foreach from=$form->fields item=field}
<td style="white-space:nowrap;">{$field->field}</td>
{if ($field->type != "hidden")}
<td style="white-space: nowrap;">{$field->field}</td>
{else}
<td style="display: none;">{$field->field}</td>
{/if}
{/foreach}
{if $form->deleteRow == '1' }
<td align="center"><A class="GridLink" href="javascript:;" onclick="form_{$form->owner->id}.getElementByName('{$form->name}').deleteGridRow('[{literal}{$smarty.section.row.index+1}{/literal}]'); return false;">{$form->DeleteLabel}</A>&nbsp;</td>
{/if}