From 7a16e1b6581e72502f1fa37d65e8e65b97dbe40c Mon Sep 17 00:00:00 2001 From: jfefe Date: Fri, 15 Mar 2013 23:41:24 +0100 Subject: [PATCH] Show extrafield separator in propale --- htdocs/comm/propal.php | 51 +++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e17940379bf..eb4278cb528 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1360,11 +1360,20 @@ if ($action == 'create') foreach($extrafields->attribute_label as $key=>$label) { $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - print 'attribute_required[$key])) print ' class="fieldrequired"'; - print '>'.$label.''; - print $extrafields->showInputField($key,$value); - print ''."\n"; + + // Show separator only + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''; + print $extrafields->showInputField($key,$value); + print ''."\n"; + } } } @@ -1854,19 +1863,25 @@ else foreach($extrafields->attribute_label as $key=>$label) { $value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]); - print 'attribute_required[$key])) print ' class="fieldrequired"'; - print '>'.$label.''; - if ($action == 'edit_extras' && $user->rights->propal->creer) - { - print $extrafields->showInputField($key,$value); - } - else - { - print $extrafields->showOutputField($key,$value); - } - - print ''."\n"; + if ($extrafields->attribute_type[$key] == 'separate') + { + print $extrafields->showSeparator($key); + } + else + { + print 'attribute_required[$key])) print ' class="fieldrequired"'; + print '>'.$label.''; + if ($action == 'edit_extras' && $user->rights->propal->creer) + { + print $extrafields->showInputField($key,$value); + } + else + { + print $extrafields->showOutputField($key,$value); + } + print ''."\n"; + } } if(count($extrafields->attribute_label) > 0) {