Debug v18
This commit is contained in:
parent
470cad6335
commit
d4cda09794
9 changed files with 77 additions and 33 deletions
|
|
@ -1551,14 +1551,11 @@ if ($action == 'create') {
|
|||
|
||||
print '<div class="reminderparameters" style="display: none;">';
|
||||
|
||||
//print '<hr>';
|
||||
//print load_fiche_titre($langs->trans("AddReminder"), '', '');
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
//Reminder
|
||||
print '<tr><td class="titlefieldcreate nowrap">'.$langs->trans("ReminderTime").'</td><td colspan="3">';
|
||||
print '<input class="width50" type="number" name="offsetvalue" value="'.(GETPOSTISSET('offsetvalue') ? GETPOST('offsetvalue', 'int') : '15').'"> ';
|
||||
print '<input class="width50" type="number" name="offsetvalue" value="'.(GETPOSTISSET('offsetvalue') ? GETPOST('offsetvalue', 'int') : getDolGlobalInt('AGENDA_REMINDER_DEFAULT_OFFSET', 30)).'"> ';
|
||||
print $form->selectTypeDuration('offsetunit', 'i', array('y', 'm'));
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -1987,14 +1984,14 @@ if ($id > 0) {
|
|||
// update task list
|
||||
print "\n".'<script type="text/javascript" >';
|
||||
print '$(document).ready(function () {
|
||||
$("#projectid").change(function () {
|
||||
$("#projectid").change(function () {
|
||||
var url = "'.$url.'&projectid="+$("#projectid").val();
|
||||
$.get(url, function(data) {
|
||||
console.log($( data ).find("#fk_element").html());
|
||||
if (data) $("#fk_element").html( $( data ).find("#taskid").html() ).select2();
|
||||
})
|
||||
});
|
||||
})';
|
||||
})';
|
||||
print '</script>'."\n";
|
||||
|
||||
$formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $object->fk_element, 'fk_element', 24, 0, 0, 1, 0, 0, 'maxwidth500', $object->fk_project);
|
||||
|
|
@ -2049,12 +2046,12 @@ if ($id > 0) {
|
|||
} else {
|
||||
$checked = '';
|
||||
$actionCommReminder = new ActionCommReminder($db);
|
||||
$actionCommReminder->offsetvalue = 10;
|
||||
$actionCommReminder->offsetvalue = getDolGlobalInt('AGENDA_REMINDER_DEFAULT_OFFSET', 30);
|
||||
$actionCommReminder->offsetunit = 'i';
|
||||
$actionCommReminder->typeremind = 'email';
|
||||
}
|
||||
|
||||
print '<label for="addreminder">'.$langs->trans("AddReminder").'</label> <input type="checkbox" id="addreminder" name="addreminder" '.$checked.'><br>';
|
||||
print '<label for="addreminder">'.img_picto('', 'bell', 'class="pictofixedwidth"').$langs->trans("AddReminder").'</label> <input type="checkbox" id="addreminder" name="addreminder" '.$checked.'><br>';
|
||||
|
||||
print '<div class="reminderparameters" '.(empty($checked) ? 'style="display: none;"' : '').'>';
|
||||
|
||||
|
|
@ -2079,9 +2076,11 @@ if ($id > 0) {
|
|||
}
|
||||
|
||||
// Mail Model
|
||||
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
||||
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1);
|
||||
print '</td></tr>';
|
||||
if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) {
|
||||
print '<tr '.$hide.'><td class="titlefieldcreate nowrap">'.$langs->trans("EMailTemplates").'</td><td colspan="3">';
|
||||
print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
|
|
|||
|
|
@ -1377,6 +1377,7 @@ class FormTicket
|
|||
// If constant set, allow to send private messages as email
|
||||
if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) {
|
||||
print 'jQuery("#send_msg_email").click(function() {
|
||||
console.log("Click send_msg_email");
|
||||
if(jQuery(this).is(":checked")) {
|
||||
if (jQuery("#private_message").is(":checked")) {
|
||||
jQuery("#private_message").prop("checked", false).trigger("change");
|
||||
|
|
@ -1389,6 +1390,7 @@ class FormTicket
|
|||
});
|
||||
|
||||
jQuery("#private_message").click(function() {
|
||||
console.log("Click private_message");
|
||||
if (jQuery(this).is(":checked")) {
|
||||
if (jQuery("#send_msg_email").is(":checked")) {
|
||||
jQuery("#send_msg_email").prop("checked", false).trigger("change");
|
||||
|
|
@ -1444,7 +1446,12 @@ class FormTicket
|
|||
$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : (getDolGlobalInt('TICKETS_MESSAGE_FORCE_MAIL')?'checked':''));
|
||||
print '<input type="checkbox" name="send_email" value="1" id="send_msg_email" '.$checkbox_selected.'/> ';
|
||||
print '<label for="send_msg_email">'.$langs->trans('SendMessageByEmail').'</label>';
|
||||
$texttooltip = $langs->trans("TicketMessageSendEmailHelp", '{s1}');
|
||||
$texttooltip = $langs->trans("TicketMessageSendEmailHelp");
|
||||
if (empty($conf->global->TICKET_SEND_PRIVATE_EMAIL)) {
|
||||
$texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2b");
|
||||
} else {
|
||||
$texttooltip .= ' '.$langs->trans("TicketMessageSendEmailHelp2a", '{s1}');
|
||||
}
|
||||
$texttooltip = str_replace('{s1}', $langs->trans('MarkMessageAsPrivate'), $texttooltip);
|
||||
print ' '.$form->textwithpicto('', $texttooltip, 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -1906,6 +1906,15 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
$out .= '<table class="noborder centpercent">';
|
||||
|
||||
$out .= '<tr class="liste_titre">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<th class="liste_titre width50 middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</th>';
|
||||
}
|
||||
|
||||
if ($donetodo) {
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
}
|
||||
|
|
@ -1923,13 +1932,19 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
$out .= '<td class="liste_titre"></td>';
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
// Action column
|
||||
$out .= '<td class="liste_titre" align="middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</td>';
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<td class="liste_titre" align="middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</td>';
|
||||
}
|
||||
$out .= '</tr>';
|
||||
|
||||
$out .= '<tr class="liste_titre">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
}
|
||||
if ($donetodo) {
|
||||
$tmp = '';
|
||||
if (get_class($filterobj) == 'Societe') {
|
||||
|
|
@ -1952,7 +1967,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
$out .= getTitleFieldOfList("RelatedObjects", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
$out .= getTitleFieldOfList("ActionOnContact", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'tdoverflowmax125 ', 0, '', 0);
|
||||
$out .= getTitleFieldOfList("Status", 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
}
|
||||
$out .= '</tr>';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php';
|
||||
|
|
@ -1967,6 +1985,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
|
||||
$out .= '<tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<td></td>';
|
||||
}
|
||||
|
||||
// Done or todo
|
||||
if ($donetodo) {
|
||||
$out .= '<td class="nowrap">';
|
||||
|
|
@ -2127,8 +2150,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
// Status
|
||||
$out .= '<td class="nowrap center">'.$actionstatic->LibStatut($histo[$key]['percent'], 2, 0, $histo[$key]['datestart']).'</td>';
|
||||
|
||||
// Actions
|
||||
$out .= '<td></td>';
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<td></td>';
|
||||
}
|
||||
|
||||
$out .= "</tr>\n";
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -12516,6 +12516,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
|||
|
||||
$out .= '<tr class="liste_titre">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<th class="liste_titre width50 middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</th>';
|
||||
}
|
||||
|
||||
$out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n";
|
||||
|
||||
$out .= '<th class="liste_titre"><strong class="hideonsmartphone">'.$langs->trans("Search").' : </strong></th>';
|
||||
|
|
@ -12531,10 +12539,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
|||
$out .= '<input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'" placeholder="'.$langs->trans("Label").'">';
|
||||
$out .= '</th>';
|
||||
|
||||
$out .= '<th class="liste_titre width50 middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</th>';
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= '<th class="liste_titre width50 middle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
$out .= $searchpicto;
|
||||
$out .= '</th>';
|
||||
}
|
||||
|
||||
$out .= '</tr>';
|
||||
|
||||
|
||||
|
|
@ -12615,7 +12627,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
|||
|
||||
$out .= '</span>';
|
||||
// Date
|
||||
$out .= '<span class="time"><i class="fa fa-clock-o"></i> ';
|
||||
$out .= '<span class="time"><i class="fa fa-clock-o valignmiddle"></i> <span class="valignmiddle">';
|
||||
$out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel');
|
||||
if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) {
|
||||
$tmpa = dol_getdate($histo[$key]['datestart'], true);
|
||||
|
|
@ -12642,13 +12654,13 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
|||
if ($late) {
|
||||
$out .= img_warning($langs->trans("Late")).' ';
|
||||
}
|
||||
$out .= "</span>\n";
|
||||
$out .= "</span></span>\n";
|
||||
|
||||
// Ref
|
||||
$out .= '<h3 class="timeline-header">';
|
||||
|
||||
// Author of event
|
||||
$out .= '<div class="messaging-author inline-block">';
|
||||
$out .= '<div class="messaging-author inline-block tdoverflowmax150 valignmiddle marginrightonly">';
|
||||
if ($histo[$key]['userid'] > 0) {
|
||||
if (!isset($userGetNomUrlCache[$histo[$key]['userid']])) { // is in cache ?
|
||||
$userstatic->fetch($histo[$key]['userid']);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ if (empty($reshook) && isset($extrafields->attributes[$object->table_element]['l
|
|||
$keyforperm = 'ficheinter';
|
||||
}
|
||||
if (isset($user->rights->$keyforperm)) {
|
||||
$permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRights($keyforperm, 'write');
|
||||
$permok = $user->hasRight($keyforperm, 'creer') || $user->hasRight($keyforperm, 'create') || $user->hasRight($keyforperm, 'write');
|
||||
}
|
||||
if ($object->element == 'order_supplier') {
|
||||
if (empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2007-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
*
|
||||
|
|
@ -519,7 +519,7 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array('type'=>$type);
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
|
|
|
|||
|
|
@ -249,8 +249,10 @@ TicketAssignedEmailBody=You have been assigned the ticket #%s by %s
|
|||
TicketAssignedCustomerEmail=Your ticket has been assigned for processing.
|
||||
TicketAssignedCustomerBody=This is an automatic email to confirm your ticket has been assigned for processing.
|
||||
MarkMessageAsPrivate=Mark message as private
|
||||
TicketMessageSendEmailHelp=An email will be sent to all assigned contact (internal contacts, but also external contacts except if the option "%s" is checked)
|
||||
TicketMessagePrivateHelp=This message will not display to external users
|
||||
TicketMessageSendEmailHelp=An email will be sent to all assigned contact
|
||||
TicketMessageSendEmailHelp2a=(internal contacts, but also external contacts except if the option "%s" is checked)
|
||||
TicketMessageSendEmailHelp2b=(internal contacts, but also external contacts)
|
||||
TicketMessagePrivateHelp=This message will not be visible to external users
|
||||
TicketMessageRecipientsHelp=Recipient field completed with active contacts linked to the ticket
|
||||
TicketEmailOriginIssuer=Issuer at origin of the tickets
|
||||
InitialMessage=Initial Message
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ class MyObject extends CommonObject
|
|||
}
|
||||
|
||||
// Example to show how to set values of fields definition dynamically
|
||||
/*if ($user->hasRights->('mymodule', 'myobject', 'read')) {
|
||||
/*if ($user->hasRight('mymodule', 'myobject', 'read')) {
|
||||
$this->fields['myfield']['visible'] = 1;
|
||||
$this->fields['myfield']['noteditable'] = 0;
|
||||
}*/
|
||||
|
|
|
|||
|
|
@ -265,7 +265,6 @@ if (!empty($object->id)) {
|
|||
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep=now&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus);
|
||||
|
||||
|
||||
print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
|
||||
|
||||
// List of all actions
|
||||
|
|
|
|||
Loading…
Reference in a new issue