| ';
print $langs->trans("NotificationEMailFrom").' | ';
print '';
-print '';
+print img_picto('', 'email', 'class="pictofixedwidth"');
+print '';
if (!empty($conf->global->NOTIFICATION_EMAIL_FROM) && !isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) {
print ' '.img_warning($langs->trans("ErrorBadEMail"));
}
@@ -390,6 +391,7 @@ foreach ($listofnotifiedevents as $notifiedevent) {
print ' | '.$notifiedevent['code'].' | ';
print ''.$label.' | ';
print '';
+ $inputfieldalreadyshown = 0;
// Notification with threshold
foreach ($conf->global as $key => $val) {
if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
@@ -413,24 +415,36 @@ foreach ($listofnotifiedevents as $notifiedevent) {
}
print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").' '.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
print ' ';
+
+ $inputfieldalreadyshown++;
}
// New entry input fields
- $s = ''; // Do not use type="email" here, we must be able to enter a list of email with , separator.
- print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").' '.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
+ if (empty($inputfieldalreadyshown) || !preg_match('/^HOLIDAY/', $notifiedevent['code'])) {
+ $s = ''; // Do not use type="email" here, we must be able to enter a list of email with , separator.
+ print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients").' '.$langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
+ }
print ' | ';
print '';
+ $labelfortrigger = 'AmountHT';
// Notification with threshold
+ $inputfieldalreadyshown = 0;
foreach ($conf->global as $key => $val) {
if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifiedevent['code'].'_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
continue;
}
- print $langs->trans("AmountHT").' >= ';
- print ' ';
+ if (!preg_match('/^HOLIDAY/', $notifiedevent['code'])) {
+ print $langs->trans($labelfortrigger).' >= ';
+ print ' ';
+
+ $inputfieldalreadyshown++;
+ }
}
// New entry input fields
- print $langs->trans("AmountHT").' >= ';
+ if (!preg_match('/^HOLIDAY/', $notifiedevent['code'])) {
+ print $langs->trans($labelfortrigger).' >= ';
+ }
print ' | ';
print '';
|