diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index abf54329c6a..9cde868a97a 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1837,65 +1837,37 @@ else if ($action == 'edit_extras') { + print ''; print '
'; print ''; print ''; print ''; + print ''; } - // TODO : use showOptionals($extrafields) function - foreach($extrafields->attribute_label as $key=>$label) - { - $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - if ($extrafields->attribute_type[$key] == 'separate') - { - print $extrafields->showSeparator($key); - } - else - { - print 'attribute_required[$key])) print ' class="fieldrequired"'; - print '>'.$label.''."\n"; - } - } + print $object->showOptionals($extrafields,'edit'); if(count($extrafields->attribute_label) > 0) { if ($action == 'edit_extras' && $user->rights->propal->creer) { - print ''; - + print '
'; - - // Convert date into timestamp format - if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) - { - $value = isset($_POST["options_".$key])?dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]):$object->array_options['options_'.$key]; - } - - if ($action == 'edit_extras' && $user->rights->propal->creer) - { - print $extrafields->showInputField($key,$value); - } - else - { - print $extrafields->showOutputField($key,$value); - } - print '
'; + print '
'; print ''; - print ''; print '
'; + print ''; } else { if ($object->statut == 0 && $user->rights->propal->creer) { - print ''; + print ''; } } } } // Amount HT - print ''; + print ''; print ''; print '';
'.img_picto('','edit').' '.$langs->trans('Modify').'
'.img_picto('','edit').' '.$langs->trans('Modify').'
'.$langs->trans('AmountHT').'
'.$langs->trans('AmountHT').''.price($object->total_ht).''.$langs->trans("Currency".$conf->currency).'