| ';
- print $form->editfieldkey("MailTitle", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string');
- print ' | ';
- print $form->editfieldval("MailTitle", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string');
- print ' |
';
- */
+ print '\n";
if (($object->statut == 1) && ($user->hasRight('mailing', 'valider') || $object->user_validation == $user->id)) {
@@ -1198,17 +1205,32 @@ if ($action == 'create') {
$linkback = '
'.$langs->trans("BackToList").'';
+ $morehtmlref = '
';
+ // Ref customer
+ $morehtmlref .= $form->editfieldkey("", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("", 'title', $object->title, $object, $user->hasRight('mailing', 'creer'), 'string', '', null, null, '', 1);
+ $morehtmlref .= '
';
+
$morehtmlright = '';
- if ($object->statut == 2) {
- $morehtmlright .= ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.') ';
+ $nbtry = $nbok = 0;
+ if ($object->statut == 2 || $object->statut == 3) {
+ $nbtry = $object->countNbOfTargets('alreadysent');
+ $nbko = $object->countNbOfTargets('alreadysentko');
+
+ $morehtmlright .= ' ('.$nbtry.'/'.$object->nbemail;
+ if ($nbko) {
+ $morehtmlright .= ' - '.$nbko.' '.$langs->trans("Error");
+ }
+ $morehtmlright .= ') ';
}
- dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', $morehtmlright);
+ dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
print '
';
+ print '
';
print '
';
- print '
';
+ print '';
/*
print '| '.$langs->trans("Ref").' | ';
@@ -1217,8 +1239,6 @@ if ($action == 'create') {
print '
';
*/
- // Topic
- print '| '.$langs->trans("MailTitle").' | '.$object->title.' |
';
// From
print '| '.$langs->trans("MailFrom").' | '.dol_print_email($object->email_from, 0, 0, 0, 0, 1).' |
';
// To
@@ -1249,6 +1269,22 @@ if ($action == 'create') {
}
print '';
+ print '
';
+ print '';
+
+
+ print '';
+ print '
';
+
+ print '
';
+
+ // Even if unsubscribe
+ print '| ';
+ print $form->editfieldkey("EvenUnsubscribe", 'evenunsubscribe', $object->evenunsubscribe, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'checkbox');
+ print ' | ';
+ print $form->editfieldval("EvenUnsubscribe", 'evenunsubscribe', $object->evenunsubscribe, $object, $user->hasRight('mailing', 'creer') && $object->statut < 3, 'checkbox');
+ print ' |
';
+
// Other attributes
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@@ -1259,30 +1295,32 @@ if ($action == 'create') {
print '
';
print '
';
+ print '';
+
+ print '';
print dol_get_fiche_end();
-
- print "
\n";
+ print "
\n";
print '