Fixing style errors.

This commit is contained in:
stickler-ci 2020-08-27 08:47:57 +00:00
parent 4ef2644300
commit b0fe7bc2e0

View File

@ -388,13 +388,12 @@ if (empty($reshook) && $action == 'add')
if ($user->id != $object->userownerid) $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view. if ($user->id != $object->userownerid) $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view.
//Create eminder //Create eminder
if($addreminder == 'on'){ if ($addreminder == 'on'){
$actionCommReminder = new ActionCommReminder($db); $actionCommReminder = new ActionCommReminder($db);
if($offsetunit == 'minute'){ if ($offsetunit == 'minute'){
$dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'i'); $dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'i');
} elseif($offsetunit == 'hour'){ } elseif ($offsetunit == 'hour'){
$dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'h'); $dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'h');
} elseif ($offsetunit == 'day') { } elseif ($offsetunit == 'day') {
$dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'd'); $dateremind = dol_time_plus_duree($datep, -$offsetvalue, 'd');
@ -413,11 +412,11 @@ if (empty($reshook) && $action == 'add')
$actionCommReminder->offsetvalue = $offsetvalue; $actionCommReminder->offsetvalue = $offsetvalue;
$actionCommReminder->status = $actionCommReminder::STATUS_TODO; $actionCommReminder->status = $actionCommReminder::STATUS_TODO;
$actionCommReminder->fk_actioncomm = $object->id; $actionCommReminder->fk_actioncomm = $object->id;
if($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail; if ($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail;
$res = $actionCommReminder->create($user); $res = $actionCommReminder->create($user);
if($res <= 0){ if ($res <= 0){
// If error // If error
$db->rollback(); $db->rollback();
$langs->load("errors"); $langs->load("errors");
@ -1156,9 +1155,8 @@ if ($action == 'create')
print '</table>'; print '</table>';
if($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER)
{ {
//checkbox create reminder //checkbox create reminder
print '<br>'; print '<br>';
print '<tr><td>'.$langs->trans("AddReminder").'</td><td colspan="3"><input type="checkbox" id="addreminder" name="addreminder"></td></tr>'; print '<tr><td>'.$langs->trans("AddReminder").'</td><td colspan="3"><input type="checkbox" id="addreminder" name="addreminder"></td></tr>';
@ -1182,10 +1180,10 @@ if ($action == 'create')
//Reminder Type //Reminder Type
$TRemindTypes = array(); $TRemindTypes = array();
if(!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail'); if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail');
if(!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush'); if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush');
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderType").'</td><td colspan="3">'; print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderType").'</td><td colspan="3">';
print $form->selectarray('selectremindertype',$TRemindTypes); print $form->selectarray('selectremindertype', $TRemindTypes);
print '</td></tr>'; print '</td></tr>';
//Mail Model //Mail Model