diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index 287fc595f03..e8d693aeea2 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -275,8 +275,6 @@ if ($result > 0) { print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder); print_liste_field_titre(''); - print_liste_field_titre(''); - print "\n"; // Line to add a new subscription @@ -313,8 +311,10 @@ if ($result > 0) { $type = array('email' => $langs->trans("EMail")); print $form->selectarray("typeid", $type, '', 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; } else { print ''; @@ -345,8 +345,9 @@ if ($result > 0) { } } print ''; - print ''; + $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); + print ''; print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; print ''; print ''; @@ -362,57 +363,9 @@ if ($result > 0) { $i++; } $db->free($resql); + } else { + print ''.$langs->trans("None").''; } - - // List of notifications enabled for fixed email - /* - foreach($conf->global as $key => $val) - { - if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue; - print ''; - $listtmp=explode(',',$val); - $first=1; - foreach($listtmp as $keyemail => $valemail) - { - if (! $first) print ', '; - $first=0; - $valemail=trim($valemail); - //print $keyemail.' - '.$valemail.' - '.$reg[1].'
'; - if (isValidEmail($valemail, 1)) - { - if ($valemail == '__SUPERVISOREMAIL__') print $valemail; - else print ' <'.$valemail.'>'; - } - else - { - $langs->load("errors"); - print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail).'; - } - } - print ''; - print ''; - $notifcode=preg_replace('/_THRESHOLD_.*$/','',$reg[1]); - $notifcodecond=preg_replace('/^.*_(THRESHOLD_)/','$1',$reg[1]); - $label=($langs->trans("Notify_".$notifcode)!="Notify_".$notifcode?$langs->trans("Notify_".$notifcode):$notifcode); - print $label; - if (preg_match('/^THRESHOLD_HIGHER_(.*)$/',$notifcodecond,$regcond) && ($regcond[1] > 0)) - { - print ' - '.$langs->trans("IfAmountHigherThan",$regcond[1]); - } - print ''; - print ''; - print $langs->trans("Email"); - print ''; - print ''.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).''; - print ''; - }*/ - - /*if ($user->admin) - { - print ''; - print '+ '.$langs->trans("SeeModuleSetup", $langs->transnoentitiesnoconv("Module600Name")).''; - print ''; - }*/ }