create : Fixed bug - display data entry form selection only when it's necessary

This commit is contained in:
Benjamin Renard 2010-11-18 11:17:46 +01:00
parent 6664d44e81
commit a4ae5741e0
2 changed files with 2 additions and 1 deletions

View file

@ -49,7 +49,7 @@ if(LSsession :: startLSsession()) {
$GLOBALS['Smarty'] -> assign('LSform_dataEntryForm',(string)$_REQUEST['LSform_dataEntryForm']); $GLOBALS['Smarty'] -> assign('LSform_dataEntryForm',(string)$_REQUEST['LSform_dataEntryForm']);
} }
$GLOBALS['Smarty'] -> assign('listAvailableDataEntryForm',array_merge(array(''=>''),LSform :: listAvailableDataEntryForm($LSobject))); $GLOBALS['Smarty'] -> assign('listAvailableDataEntryForm',LSform :: listAvailableDataEntryForm($LSobject));
$GLOBALS['Smarty'] -> assign('DataEntryFormLabel',_('Data entry form')); $GLOBALS['Smarty'] -> assign('DataEntryFormLabel',_('Data entry form'));
if ($form->validate()) { if ($form->validate()) {

View file

@ -4,6 +4,7 @@
{if !empty($listAvailableDataEntryForm)} {if !empty($listAvailableDataEntryForm)}
<p class='LSform_listAvailableDataEntryForm'><label>{$DataEntryFormLabel} <p class='LSform_listAvailableDataEntryForm'><label>{$DataEntryFormLabel}
<select id='LSform_listAvailableDataEntryForm'> <select id='LSform_listAvailableDataEntryForm'>
<option value=''>--</option>
{html_options options=$listAvailableDataEntryForm selected=$LSform_dataEntryForm} {html_options options=$listAvailableDataEntryForm selected=$LSform_dataEntryForm}
</select> </select>
</label> </label>