Merge remote-tracking branch 'upstream/develop' into patch-2
This commit is contained in:
commit
0c2a77cb53
34
ChangeLog
34
ChangeLog
@ -22,21 +22,51 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
FIX: #10381
|
FIX: #10381
|
||||||
FIX: #10460 compatibility with MariaDB 10.4
|
FIX: #10460 compatibility with MariaDB 10.4
|
||||||
FIX: #10485
|
FIX: #10485
|
||||||
|
FIX: #10638
|
||||||
|
FIX: Accountancy - Adding transaction with multicompany uses all the time 1st entity
|
||||||
|
FIX: actioncomm export: ORDER BY clause is in wrong export property + event type filter does not work
|
||||||
FIX: add fk_unit on addline action
|
FIX: add fk_unit on addline action
|
||||||
|
FIX: adding css by page if url is externam
|
||||||
|
FIX: Bad link in menu manager
|
||||||
FIX: better test on fetch
|
FIX: better test on fetch
|
||||||
|
FIX: can't add lines on invoices
|
||||||
|
FIX: Check for old picture name if the new one was not found
|
||||||
|
FIX: could not create several superadmin in transversal mode
|
||||||
|
FIX: creation of menu entry with parent id not int
|
||||||
|
FIX: creation of new left menu entry
|
||||||
FIX: Default language of company is not set
|
FIX: Default language of company is not set
|
||||||
|
FIX: error on setup of password if pass generators have a .old file.
|
||||||
FIX: error report not returned
|
FIX: error report not returned
|
||||||
FIX: expedition: reset status on rollback + replace hardcoded status with const
|
FIX: expedition: reset status on rollback + replace hardcoded status with const
|
||||||
|
FIX: fetch module / pos source
|
||||||
|
FIX: fk_default_warehouse missing in group by
|
||||||
|
FIX: function sendEmailsReminder isn't completely developed, then MAIN_FEATURES_LEVEL must be 2 to "use" it
|
||||||
|
FIX: if empty error message, we just see "error" displayed
|
||||||
|
FIX: label of bank account
|
||||||
FIX: line edit template: keep fk_parent_line
|
FIX: line edit template: keep fk_parent_line
|
||||||
|
FIX: Mark credit note as available for credit note in other currency
|
||||||
|
FIX: missing access security checking with multicompany
|
||||||
|
FIX: missing entity filter in function "build_filterField()" (export module)
|
||||||
|
FIX: missing $ismultientitymanaged for previous/next ref
|
||||||
FIX: Missing province in export of invoice
|
FIX: Missing province in export of invoice
|
||||||
FIX: must fetch member in current entity
|
FIX: must fetch member in current entity
|
||||||
|
FIX: positive values creating diff on addline rounding
|
||||||
|
FIX: positive values IN supplier credit notes creating diff on addline rounding
|
||||||
FIX: Price in combo list of service does not use the correct price level
|
FIX: Price in combo list of service does not use the correct price level
|
||||||
FIX: supplier invoice payment total doesnt care about deposit or credit
|
FIX: project_title for display of getNomUrl()
|
||||||
|
FIX: same thing here
|
||||||
|
FIX: Show button POS Ticket only if invoice was generated by POS
|
||||||
|
FIX: supplier invoice payment total doesn't care about deposit or credit
|
||||||
FIX: supplier invoice product stats total ht is line total not invoice total
|
FIX: supplier invoice product stats total ht is line total not invoice total
|
||||||
|
FIX: The notes was also copied on invoice
|
||||||
|
FIX: Transaction on leave approval and decrease ko if setup not complete
|
||||||
FIX: Translation not loaded by scheduled jobs
|
FIX: Translation not loaded by scheduled jobs
|
||||||
|
FIX: [URGENT] broken feature, "$usercancreate" is for Dolibarr 9
|
||||||
|
FIX: we want to be able to reopen fourn credit note
|
||||||
|
FIX: wrong feature2 when user rights "group_advance" is used
|
||||||
FIX: wrong merged conflict
|
FIX: wrong merged conflict
|
||||||
FIX: wrong tests on fetch
|
FIX: wrong tests on fetch
|
||||||
NEW: Add protection to avoid packaging if files non indexed exists into
|
NEW: Add protection to avoid packaging if files non indexed exists
|
||||||
|
|
||||||
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
***** ChangeLog for 9.0.0 compared to 8.0.0 *****
|
||||||
For Users:
|
For Users:
|
||||||
|
|||||||
@ -682,7 +682,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
dol_fiche_head();
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Type of event
|
// Type of event
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
@ -849,7 +849,7 @@ if ($action == 'create')
|
|||||||
print '<br><hr><br>';
|
print '<br><hr><br>';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
if ($conf->societe->enabled)
|
if ($conf->societe->enabled)
|
||||||
{
|
{
|
||||||
@ -1078,7 +1078,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("Action"), 0, 'action');
|
dol_fiche_head($head, 'card', $langs->trans("Action"), 0, 'action');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Ref").'</td><td colspan="3">'.$object->id.'</td></tr>';
|
||||||
@ -1259,7 +1259,7 @@ if ($id > 0)
|
|||||||
print '<br><hr><br>';
|
print '<br><hr><br>';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
if ($conf->societe->enabled)
|
if ($conf->societe->enabled)
|
||||||
{
|
{
|
||||||
@ -1455,7 +1455,7 @@ if ($id > 0)
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Affichage fiche action en mode visu
|
// Affichage fiche action en mode visu
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
@ -1558,7 +1558,7 @@ if ($id > 0)
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
if ($conf->societe->enabled)
|
if ($conf->societe->enabled)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -166,7 +166,7 @@ if ($object->id > 0)
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Affichage fiche action en mode visu
|
// Affichage fiche action en mode visu
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
@ -237,7 +237,7 @@ if ($object->id > 0)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield centpercent">';
|
||||||
|
|
||||||
// Build file list
|
// Build file list
|
||||||
$filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1);
|
$filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1);
|
||||||
|
|||||||
@ -60,7 +60,7 @@ class FormProjets
|
|||||||
* @param int $maxlength Maximum length of label
|
* @param int $maxlength Maximum length of label
|
||||||
* @param int $option_only Return only html options lines without the select tag
|
* @param int $option_only Return only html options lines without the select tag
|
||||||
* @param int $show_empty Add an empty line
|
* @param int $show_empty Add an empty line
|
||||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
* @param int $discard_closed Discard closed projects (0=Keep, 1=hide completely, 2=Disable)
|
||||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||||
* @param int $disabled Disabled
|
* @param int $disabled Disabled
|
||||||
* @param int $mode 0 for HTML mode and 1 for JSON mode
|
* @param int $mode 0 for HTML mode and 1 for JSON mode
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT . "/core/class/html.form.class.php";
|
require_once DOL_DOCUMENT_ROOT . "/core/class/html.form.class.php";
|
||||||
require_once DOL_DOCUMENT_ROOT . "/core/class/html.formmail.class.php";
|
require_once DOL_DOCUMENT_ROOT . "/core/class/html.formmail.class.php";
|
||||||
|
require_once DOL_DOCUMENT_ROOT . "/core/class/html.formprojet.class.php";
|
||||||
|
|
||||||
if (!class_exists('FormCompany')) {
|
if (!class_exists('FormCompany')) {
|
||||||
include DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
include DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
|
||||||
@ -103,7 +104,7 @@ class FormTicket
|
|||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->action = 'add_ticket';
|
$this->action = 'add';
|
||||||
|
|
||||||
$this->withcompany = 1;
|
$this->withcompany = 1;
|
||||||
$this->withfromsocid = 0;
|
$this->withfromsocid = 0;
|
||||||
@ -258,6 +259,14 @@ class FormTicket
|
|||||||
print '<td><input type="hidden" name="contactid" value="' . $user->contactid . '"/></td>';
|
print '<td><input type="hidden" name="contactid" value="' . $user->contactid . '"/></td>';
|
||||||
print '<td><input type="hidden" name="type" value="Z"/></td></tr>';
|
print '<td><input type="hidden" name="type" value="Z"/></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify thirdparty at creation
|
||||||
|
if (empty($this->ispublic))
|
||||||
|
{
|
||||||
|
print '<tr><td><label for="notify_tiers_at_create">' . $langs->trans("TicketNotifyTiersAtCreation") . '</label></td><td>';
|
||||||
|
print '<input type="checkbox" id="notify_tiers_at_create" name="notify_tiers_at_create"'.($this->withnotifytiersatcreate?' checked="checked"':'').'>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TITLE
|
// TITLE
|
||||||
@ -305,14 +314,6 @@ class FormTicket
|
|||||||
$this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
$this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Notify thirdparty at creation
|
|
||||||
if (empty($this->ispublic))
|
|
||||||
{
|
|
||||||
print '<tr><td><label for="notify_tiers_at_create">' . $langs->trans("TicketNotifyTiersAtCreation") . '</label></td><td>';
|
|
||||||
print '<input type="checkbox" id="notify_tiers_at_create" name="notify_tiers_at_create"'.($this->withnotifytiersatcreate?' checked="checked"':'').'>';
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// TITLE
|
// TITLE
|
||||||
if ($this->withtitletopic) {
|
if ($this->withtitletopic) {
|
||||||
print '<tr><td><label for="subject"><span class="fieldrequired">' . $langs->trans("Subject") . '</span></label></td><td>';
|
print '<tr><td><label for="subject"><span class="fieldrequired">' . $langs->trans("Subject") . '</span></label></td><td>';
|
||||||
@ -331,19 +332,30 @@ class FormTicket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MESSAGE
|
// MESSAGE
|
||||||
$msg = GETPOST('message', 'alpha') ? GETPOST('message', 'alpha') : '';
|
$msg = GETPOSTISSET('message') ? GETPOST('message', 'none') : '';
|
||||||
print '<tr><td><label for="message"><span class="fieldrequired">' . $langs->trans("Message") . '</span></label></td><td>';
|
print '<tr><td><label for="message"><span class="fieldrequired">' . $langs->trans("Message") . '</span></label></td><td>';
|
||||||
|
|
||||||
// If public form, display more information
|
// If public form, display more information
|
||||||
if ($this->ispublic) {
|
$toolbarname = 'dolibarr_notes';
|
||||||
|
if ($this->ispublic)
|
||||||
|
{
|
||||||
|
$toolbarname = 'dolibarr_details';
|
||||||
print '<div class="warning">' . ($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')) . '</div>';
|
print '<div class="warning">' . ($conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe')) . '</div>';
|
||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
$uselocalbrowser = true;
|
$uselocalbrowser = true;
|
||||||
$doleditor = new DolEditor('message', GETPOST('message', 'alpha'), '100%', 230, 'dolibarr_details', 'In', true, $uselocalbrowser);
|
$doleditor = new DolEditor('message', $msg, '100%', 230, $toolbarname, 'In', true, $uselocalbrowser);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if (! empty($conf->projet->enabled) && ! $this->ispublic)
|
||||||
|
{
|
||||||
|
$formproject=new FormProjets($this->db);
|
||||||
|
print '<tr><td><label for="project"><span class="">' . $langs->trans("Project") . '</span></label></td><td>';
|
||||||
|
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Attached files
|
// Attached files
|
||||||
if (!empty($this->withfile)) {
|
if (!empty($this->withfile)) {
|
||||||
// Define list of attached files
|
// Define list of attached files
|
||||||
@ -408,7 +420,7 @@ class FormTicket
|
|||||||
if ($withdolfichehead) dol_fiche_end();
|
if ($withdolfichehead) dol_fiche_end();
|
||||||
|
|
||||||
print '<center>';
|
print '<center>';
|
||||||
print '<input class="button" type="submit" name="add_ticket" value="' . $langs->trans(($this->withthreadid > 0 ? "SendResponse" : "NewTicket")) . '" />';
|
print '<input class="button" type="submit" name="add" value="' . $langs->trans(($this->withthreadid > 0 ? "SendResponse" : "NewTicket")) . '" />';
|
||||||
|
|
||||||
if ($this->withcancel) {
|
if ($this->withcancel) {
|
||||||
print " ";
|
print " ";
|
||||||
@ -818,7 +830,6 @@ class FormTicket
|
|||||||
|
|
||||||
print '<table class="border" width="' . $width . '">';
|
print '<table class="border" width="' . $width . '">';
|
||||||
|
|
||||||
|
|
||||||
// External users can't send message email
|
// External users can't send message email
|
||||||
if ($user->rights->ticket->write && !$user->socid) {
|
if ($user->rights->ticket->write && !$user->socid) {
|
||||||
print '<tr><td width="30%"></td><td colspan="2">';
|
print '<tr><td width="30%"></td><td colspan="2">';
|
||||||
@ -952,9 +963,11 @@ class FormTicket
|
|||||||
$defaultmessage=preg_replace("/^\n+/", "", $defaultmessage);
|
$defaultmessage=preg_replace("/^\n+/", "", $defaultmessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td><label for="message"><span class="fieldrequired">' . $langs->trans("Message") . '</span></label></td><td>';
|
print '<tr><td class="tdtop"><label for="message"><span class="fieldrequired">' . $langs->trans("Message") . '</span></label></td><td>';
|
||||||
|
//$toolbarname = 'dolibarr_details';
|
||||||
|
$toolbarname = 'dolibarr_notes';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
$doleditor = new DolEditor('message', $defaultmessage, '100%', 350, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
|
$doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
if ($user->rights->ticket->write && !$user->socid) {
|
if ($user->rights->ticket->write && !$user->socid) {
|
||||||
@ -1014,17 +1027,15 @@ class FormTicket
|
|||||||
print $out;
|
print $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="3">';
|
print '</table>';
|
||||||
print '<center>';
|
|
||||||
print '<input class="button" type="submit" name="btn_add_message" value="' . $langs->trans("AddMessage") . '" />';
|
|
||||||
|
|
||||||
|
print '<center><br>';
|
||||||
|
print '<input class="button" type="submit" name="btn_add_message" value="' . $langs->trans("AddMessage") . '" />';
|
||||||
if ($this->withcancel) {
|
if ($this->withcancel) {
|
||||||
print " ";
|
print " ";
|
||||||
print "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $langs->trans("Cancel") . "\">";
|
print "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $langs->trans("Cancel") . "\">";
|
||||||
}
|
}
|
||||||
print "</center>\n";
|
print "</center>\n";
|
||||||
print '</td></tr>';
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
print "<!-- End form TICKET -->\n";
|
print "<!-- End form TICKET -->\n";
|
||||||
|
|||||||
@ -915,21 +915,26 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
/**
|
/**
|
||||||
* Gives the last date of activation
|
* Gives the last date of activation
|
||||||
*
|
*
|
||||||
* @return timestamp Date of last activation
|
* @return timestamp|string Date of last activation
|
||||||
*/
|
*/
|
||||||
public function getLastActivationDate()
|
public function getLastActivationDate()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
$err = 0;
|
||||||
|
|
||||||
$sql = "SELECT tms FROM ".MAIN_DB_PREFIX."const";
|
$sql = "SELECT tms FROM ".MAIN_DB_PREFIX."const";
|
||||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
|
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
|
||||||
$sql.= " AND entity IN (0, ".$conf->entity.")";
|
$sql.= " AND entity IN (0, ".$conf->entity.")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
|
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql)
|
||||||
|
{
|
||||||
$err++;
|
$err++;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$obj=$this->db->fetch_object($resql);
|
$obj=$this->db->fetch_object($resql);
|
||||||
if ($obj) {
|
if ($obj) {
|
||||||
return $this->db->jdate($obj->tms);
|
return $this->db->jdate($obj->tms);
|
||||||
@ -949,15 +954,20 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
$err = 0;
|
||||||
|
|
||||||
$sql = "SELECT tms, note FROM ".MAIN_DB_PREFIX."const";
|
$sql = "SELECT tms, note FROM ".MAIN_DB_PREFIX."const";
|
||||||
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
|
$sql.= " WHERE ".$this->db->decrypt('name')." = '".$this->db->escape($this->const_name)."'";
|
||||||
$sql.= " AND entity IN (0, ".$conf->entity.")";
|
$sql.= " AND entity IN (0, ".$conf->entity.")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
|
dol_syslog(get_class($this)."::getLastActiveDate", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql)
|
||||||
|
{
|
||||||
$err++;
|
$err++;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$obj=$this->db->fetch_object($resql);
|
$obj=$this->db->fetch_object($resql);
|
||||||
$tmp=array();
|
$tmp=array();
|
||||||
if ($obj->note) {
|
if ($obj->note) {
|
||||||
|
|||||||
@ -218,7 +218,7 @@ class modTicket extends DolibarrModules
|
|||||||
'type' => 'left',
|
'type' => 'left',
|
||||||
'titre' => 'NewTicket',
|
'titre' => 'NewTicket',
|
||||||
'mainmenu' => 'ticket',
|
'mainmenu' => 'ticket',
|
||||||
'url' => '/ticket/new.php?action=create_ticket',
|
'url' => '/ticket/card.php?action=create',
|
||||||
'langs' => 'ticket',
|
'langs' => 'ticket',
|
||||||
'position' => 102,
|
'position' => 102,
|
||||||
'enabled' => '$conf->ticket->enabled',
|
'enabled' => '$conf->ticket->enabled',
|
||||||
|
|||||||
@ -13,30 +13,23 @@ $form= new Form($db);
|
|||||||
|
|
||||||
print '<div class="tagtable centpercent noborder allwidth">';
|
print '<div class="tagtable centpercent noborder allwidth">';
|
||||||
|
|
||||||
if($mode == 'edit' )
|
print '<form method="POST" class="tagtable centpercent noborder allwidth">';
|
||||||
{
|
|
||||||
print '<form class="tagtr liste_titre">';
|
print '<div class="tagtr liste_titre">';
|
||||||
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
|
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
|
||||||
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
|
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
|
||||||
print '<div class="tagtd liste_titre center">'.$langs->trans('Busy').'</div>';
|
print '<div class="tagtd liste_titre center">'.$langs->trans('Busy').'</div>';
|
||||||
print '<div class="tagtd liste_titre center">'.$langs->trans('Mandatory').'</div>';
|
print '<div class="tagtd liste_titre center">'.$langs->trans('Mandatory').'</div>';
|
||||||
print '<div class="tagtd liste_titre"></div>';
|
print '<div class="tagtd liste_titre"></div>';
|
||||||
print '</form>';
|
print '</div>';
|
||||||
}
|
|
||||||
else
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||||
{
|
print '<input type="hidden" name="id" value="'.$element_id.'" />';
|
||||||
print '<form class="tagtr liste_titre">';
|
print '<input type="hidden" name="action" value="update_linked_resource" />';
|
||||||
print '<div class="tagtd liste_titre">'.$langs->trans('Resource').'</div>';
|
print '<input type="hidden" name="resource_type" value="'.$resource_type.'" />';
|
||||||
print '<div class="tagtd liste_titre">'.$langs->trans('Type').'</div>';
|
|
||||||
print '<div class="tagtd liste_titre center">'.$langs->trans('Busy').'</div>';
|
|
||||||
print '<div class="tagtd liste_titre center">'.$langs->trans('Mandatory').'</div>';
|
|
||||||
print '<div class="tagtd liste_titre"></div>';
|
|
||||||
print '</form>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if( (array) $linked_resources && count($linked_resources) > 0)
|
if( (array) $linked_resources && count($linked_resources) > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach ($linked_resources as $linked_resource)
|
foreach ($linked_resources as $linked_resource)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -46,20 +39,17 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
|
|
||||||
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
|
if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid'))
|
||||||
{
|
{
|
||||||
|
print '<div class="tagtr oddeven">';
|
||||||
print '<form class="tagtr oddeven" action="'.$_SERVER["PHP_SELF"].'?element='.$element.'&element_id='.$element_id.'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'" />';
|
|
||||||
print '<input type="hidden" name="action" value="update_linked_resource" />';
|
|
||||||
print '<input type="hidden" name="resource_type" value="'.$resource_type.'" />';
|
|
||||||
print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />';
|
print '<input type="hidden" name="lineid" value="'.$linked_resource['rowid'].'" />';
|
||||||
|
print '<input type="hidden" name="element" value="'.$element.'" />';
|
||||||
|
print '<input type="hidden" name="element_id" value="'.$element_id.'" />';
|
||||||
|
|
||||||
print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>';
|
print '<div class="tagtd">'.$object_resource->getNomUrl(1).'</div>';
|
||||||
print '<div class="tagtd">'.$object_resource->type_label.'</div>';
|
print '<div class="tagtd">'.$object_resource->type_label.'</div>';
|
||||||
print '<div class="tagtd center">'.$form->selectyesno('busy', $linked_resource['busy']?1:0, 1).'</div>';
|
print '<div class="tagtd center">'.$form->selectyesno('busy', $linked_resource['busy']?1:0, 1).'</div>';
|
||||||
print '<div class="tagtd center">'.$form->selectyesno('mandatory', $linked_resource['mandatory']?1:0, 1).'</div>';
|
print '<div class="tagtd center">'.$form->selectyesno('mandatory', $linked_resource['mandatory']?1:0, 1).'</div>';
|
||||||
print '<div class="tagtd right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
print '<div class="tagtd right"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
||||||
print '</form>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -67,7 +57,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
if ($linked_resource['rowid'] == GETPOST('lineid'))
|
||||||
$style='style="background: orange;"';
|
$style='style="background: orange;"';
|
||||||
|
|
||||||
print '<form class="tagtr oddeven" '.$style.'>';
|
print '<div class="tagtr oddeven" '.$style.'>';
|
||||||
|
|
||||||
print '<div class="tagtd">';
|
print '<div class="tagtd">';
|
||||||
print $object_resource->getNomUrl(1);
|
print $object_resource->getNomUrl(1);
|
||||||
@ -95,20 +85,22 @@ if( (array) $linked_resources && count($linked_resources) > 0)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<form class="tagtr oddeven">';
|
print '<div class="tagtr oddeven">';
|
||||||
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
|
print '<div class="tagtd opacitymedium">'.$langs->trans('NoResourceLinked').'</div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
print '<div class="tagtd opacitymedium"></div>';
|
print '<div class="tagtd opacitymedium"></div>';
|
||||||
print '</form>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -761,7 +761,6 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif($action == 'TASK_MODIFY')
|
elseif($action == 'TASK_MODIFY')
|
||||||
{
|
{
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
@ -773,7 +772,6 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif($action == 'TASK_DELETE')
|
elseif($action == 'TASK_DELETE')
|
||||||
{
|
{
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
|
|||||||
@ -333,10 +333,6 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'TICKET_MARK_READ':
|
|
||||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'TICKET_CLOSE':
|
case 'TICKET_CLOSE':
|
||||||
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
dol_syslog("Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -154,7 +154,6 @@ TicketMarkedAsRead=Ticket has been marked as read
|
|||||||
TicketReadOn=Read on
|
TicketReadOn=Read on
|
||||||
TicketCloseOn=Clotured on
|
TicketCloseOn=Clotured on
|
||||||
MarkAsRead=Mark ticket as read
|
MarkAsRead=Mark ticket as read
|
||||||
TicketMarkedAsReadButLogActionNotSaved=Ticket marked as closed but no action saved
|
|
||||||
TicketHistory=Ticket history
|
TicketHistory=Ticket history
|
||||||
AssignUser=Assign to user
|
AssignUser=Assign to user
|
||||||
TicketAssigned=Ticket is now assigned
|
TicketAssigned=Ticket is now assigned
|
||||||
@ -179,7 +178,6 @@ ConfirmCloseAticket=Confirm ticket closing
|
|||||||
ConfirmDeleteTicket=Please confirm ticket deleting
|
ConfirmDeleteTicket=Please confirm ticket deleting
|
||||||
TicketDeletedSuccess=Ticket deleted with success
|
TicketDeletedSuccess=Ticket deleted with success
|
||||||
TicketMarkedAsClosed=Ticket marked as closed
|
TicketMarkedAsClosed=Ticket marked as closed
|
||||||
TicketMarkedAsClosedButLogActionNotSaved=Ticket marked as closed but no log saved !
|
|
||||||
TicketDurationAuto=Calculated duration
|
TicketDurationAuto=Calculated duration
|
||||||
TicketDurationAutoInfos=Duration calculated automatically from intervention related
|
TicketDurationAutoInfos=Duration calculated automatically from intervention related
|
||||||
TicketUpdated=Ticket updated
|
TicketUpdated=Ticket updated
|
||||||
@ -226,14 +224,12 @@ Unread=Unread
|
|||||||
#
|
#
|
||||||
# Logs
|
# Logs
|
||||||
#
|
#
|
||||||
TicketLogMesgReadBy=Ticket read by %s
|
TicketLogMesgReadBy=Ticket %s read by %s
|
||||||
NoLogForThisTicket=No log for this ticket yet
|
NoLogForThisTicket=No log for this ticket yet
|
||||||
TicketLogAssignedTo=Ticket assigned to %s
|
TicketLogAssignedTo=Ticket %s assigned to %s
|
||||||
TicketAssignedButLogActionNotSaved=Ticket assigned but no log saved !
|
TicketLogPropertyChanged=Ticket %s modified: classification from %s to %s
|
||||||
TicketLogPropertyChanged=Change classification: from %s to %s
|
TicketLogClosedBy=Ticket %s closed by %s
|
||||||
TicketLogClosedBy=Ticket closed by %s
|
TicketLogReopen=Ticket %s re-opened
|
||||||
TicketLogProgressSetTo=Progress change to %s percent
|
|
||||||
TicketLogReopen=Ticket re-opened
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Public pages
|
# Public pages
|
||||||
|
|||||||
@ -95,3 +95,4 @@ InternalURLOfPage=Internal URL of page
|
|||||||
ThisPageIsTranslationOf=This page/container is a translation of
|
ThisPageIsTranslationOf=This page/container is a translation of
|
||||||
ThisPageHasTranslationPages=This page/container has translation
|
ThisPageHasTranslationPages=This page/container has translation
|
||||||
NoWebSiteCreateOneFirst=No website has been created yet. Create one first.
|
NoWebSiteCreateOneFirst=No website has been created yet. Create one first.
|
||||||
|
GoTo=Go to
|
||||||
@ -238,7 +238,7 @@ else
|
|||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||||
|
|||||||
@ -3037,7 +3037,7 @@ div.pagination li.paginationafterarrows {
|
|||||||
box-shadow: unset;
|
box-shadow: unset;
|
||||||
-webkit-box-shadow: unset;
|
-webkit-box-shadow: unset;
|
||||||
}
|
}
|
||||||
.oddeven, .evenodd, .impair, .nohover .impair:hover, tr.impair td.nohover
|
.oddeven, .evenodd, .impair, .nohover .impair:hover, tr.impair td.nohover, .tagtr.oddeven
|
||||||
{
|
{
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
@ -3051,7 +3051,7 @@ div.pagination li.paginationafterarrows {
|
|||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
.oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover {
|
.oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven {
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
color: #202020;
|
color: #202020;
|
||||||
@ -3117,7 +3117,7 @@ div.liste_titre_bydiv {
|
|||||||
/*width: calc(100% - 1px); 1px more, i don't know why so i remove */
|
/*width: calc(100% - 1px); 1px more, i don't know why so i remove */
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
}
|
}
|
||||||
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
|
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr, tagtr.liste_titre
|
||||||
{
|
{
|
||||||
height: 26px !important;
|
height: 26px !important;
|
||||||
}
|
}
|
||||||
@ -3128,11 +3128,10 @@ div.colorback /* for the form "assign user" on time spent view */
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
|
div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, .tagtr.liste_titre, .tagtr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
|
||||||
{
|
{
|
||||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||||
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
|
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
|
||||||
/* border-bottom: 1px solid #ddd; */
|
|
||||||
|
|
||||||
color: rgb(<?php echo $colortexttitle; ?>);
|
color: rgb(<?php echo $colortexttitle; ?>);
|
||||||
font-family: <?php print $fontlist ?>;
|
font-family: <?php print $fontlist ?>;
|
||||||
@ -3257,19 +3256,24 @@ div.tabBar .noborder {
|
|||||||
/* Prepare to remove class pair - impair */
|
/* Prepare to remove class pair - impair */
|
||||||
|
|
||||||
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
|
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
|
||||||
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre) {
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
|
||||||
|
{
|
||||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
}
|
}
|
||||||
.noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre),
|
||||||
|
.noborder .oddeven.tagtr:nth-child(even):not(:last-child) .tagtd:not(.liste_titre)
|
||||||
|
{
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
|
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
|
||||||
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre)
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
|
||||||
{
|
{
|
||||||
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
@ -3277,7 +3281,9 @@ div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody >
|
|||||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
}
|
}
|
||||||
.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre),
|
||||||
|
.noborder .oddeven.tagtr:nth-child(odd):not(:last-child) .tagtd:not(.liste_titre)
|
||||||
|
{
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2765,6 +2765,10 @@ table.liste th, table.noborder th, table.noborder tr.liste_titre td {
|
|||||||
table.noborder td, div.noborder form, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td {
|
table.noborder td, div.noborder form, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td {
|
||||||
padding: 4px 6px 4px 6px; /* t r b l */
|
padding: 4px 6px 4px 6px; /* t r b l */
|
||||||
}
|
}
|
||||||
|
form.tagtable {
|
||||||
|
padding: unset !important;
|
||||||
|
border: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
table.liste td, table.noborder td, div.noborder form div {
|
table.liste td, table.noborder td, div.noborder form div {
|
||||||
padding: 8px 6px 8px 6px; /* t r b l */
|
padding: 8px 6px 8px 6px; /* t r b l */
|
||||||
@ -3079,11 +3083,11 @@ div.liste_titre_bydiv {
|
|||||||
padding: 2px 0px 2px 0;
|
padding: 2px 0px 2px 0;
|
||||||
width: calc(100% - 1px);
|
width: calc(100% - 1px);
|
||||||
}
|
}
|
||||||
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr
|
tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable.tr, tagtr.liste_titre
|
||||||
{
|
{
|
||||||
height: 26px !important;
|
height: 26px !important;
|
||||||
}
|
}
|
||||||
div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
|
div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, .tagtr.liste_titre, .tagtr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr
|
||||||
{
|
{
|
||||||
background: rgb(<?php echo $colorbacktitle1; ?>);
|
background: rgb(<?php echo $colorbacktitle1; ?>);
|
||||||
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
|
font-weight: <?php echo $useboldtitle?'bold':'normal'; ?>;
|
||||||
@ -3211,28 +3215,42 @@ div .tdtop {
|
|||||||
|
|
||||||
/* Prepare to remove class pair - impair */
|
/* Prepare to remove class pair - impair */
|
||||||
|
|
||||||
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(even):not(.liste_titre), .liste > tbody > tr:nth-of-type(even):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(even):not(.liste_titre)
|
||||||
|
{
|
||||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklineimpair1; ?>) 85%, rgb(<?php echo $colorbacklineimpair2; ?>) 100%);
|
||||||
}
|
}
|
||||||
.noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(even):not(:last-child) td:not(.liste_titre),
|
||||||
|
.noborder .tagtr:nth-child(even):not(:last-child) .oddeven.tagtd:not(.liste_titre)
|
||||||
|
{
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) > .border > tbody > tr:nth-of-type(odd):not(.liste_titre), .liste > tbody > tr:nth-of-type(odd):not(.liste_titre),
|
||||||
|
div:not(.fichecenter):not(.fichehalfleft):not(.ficheaddleft) .oddeven.tagtr:nth-of-type(odd):not(.liste_titre)
|
||||||
|
{
|
||||||
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: linear-gradient(to bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -o-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -moz-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -webkit-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
background: -ms-linear-gradient(bottom, rgb(<?php echo $colorbacklinepair1; ?>) 85%, rgb(<?php echo $colorbacklinepair2; ?>) 100%);
|
||||||
}
|
}
|
||||||
.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre) {
|
.noborder > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(:last-child) td:not(.liste_titre),
|
||||||
|
.noborder .tagtr:nth-child(odd):not(:last-child) .oddeven.tagtd:not(.liste_titre)
|
||||||
|
{
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.noborder li:nth-child(even):not(.liste_titre) {
|
||||||
|
background-color: rgb(<?php echo $colorbacklinepair2; ?>) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boxes
|
* Boxes
|
||||||
|
|||||||
@ -49,8 +49,11 @@ $id = GETPOST('id', 'int');
|
|||||||
$track_id = GETPOST('track_id', 'alpha', 3);
|
$track_id = GETPOST('track_id', 'alpha', 3);
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$projectid = GETPOST('projectid', 'int');
|
$projectid = GETPOST('projectid', 'int');
|
||||||
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|
||||||
|
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of ticket. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of ticket. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('ticketcard','globalcard'));
|
$hookmanager->initHooks(array('ticketcard','globalcard'));
|
||||||
|
|
||||||
@ -155,11 +158,9 @@ if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') &
|
|||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
if ($ret > 0) {
|
if ($ret > 0) {
|
||||||
$log_action = $langs->trans('TicketLogPropertyChanged', $oldvalue_label, $newvalue_label);
|
$log_action = $langs->trans('TicketLogPropertyChanged', $oldvalue_label, $newvalue_label);
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages($langs->trans('TicketUpdated'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketUpdated'), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$action = 'view';
|
$action = 'view';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +184,28 @@ $page_title = $actionobject->getTitle($action);
|
|||||||
|
|
||||||
llxHeader('', $page_title, $help_url);
|
llxHeader('', $page_title, $help_url);
|
||||||
|
|
||||||
|
if ($action == 'create')
|
||||||
|
{
|
||||||
|
$formticket = new FormTicket($db);
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans('NewTicket'), '', 'title_ticket');
|
||||||
|
|
||||||
|
$formticket->withfromsocid = $socid ? $socid : $user->societe_id;
|
||||||
|
$formticket->withfromcontactid = $contactid ? $contactid : '';
|
||||||
|
$formticket->withtitletopic = 1;
|
||||||
|
$formticket->withnotifytiersatcreate = ($notifyTiers?1:0);
|
||||||
|
$formticket->withusercreate = 1;
|
||||||
|
$formticket->withref = 1;
|
||||||
|
$formticket->fk_user_create = $user->id;
|
||||||
|
$formticket->withfile = 2;
|
||||||
|
$formticket->withextrafields = 1;
|
||||||
|
$formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid'));
|
||||||
|
if (empty($defaultref)) {
|
||||||
|
$defaultref = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$formticket->showForm(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'add_message' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'add_message' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|
||||||
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink')
|
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink')
|
||||||
@ -721,7 +744,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
// Show link to add a message (if read and not closed)
|
// Show link to add a message (if read and not closed)
|
||||||
if ($object->fk_statut < 8 && $action != "add_message") {
|
if ($object->fk_statut < Ticket::STATUS_CLOSED && $action != "add_message") {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=add_message">' . $langs->trans('TicketAddMessage') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=add_message">' . $langs->trans('TicketAddMessage') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -730,22 +753,22 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
if (!$object->fk_soc && $user->rights->ficheinter->creer) {
|
if (!$object->fk_soc && $user->rights->ficheinter->creer) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans('UnableToCreateInterIfNoSocid') . '">' . $langs->trans('TicketAddIntervention') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans('UnableToCreateInterIfNoSocid') . '">' . $langs->trans('TicketAddIntervention') . '</a></div>';
|
||||||
}
|
}
|
||||||
if ($object->fk_soc > 0 && $object->fk_statut < 8 && $user->rights->ficheinter->creer) {
|
if ($object->fk_soc > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ficheinter->creer) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . dol_buildpath('/fichinter/card.php', 1) . '?action=create&socid=' . $object->fk_soc . '&origin=ticket_ticket&originid=' . $object->id . '">' . $langs->trans('TicketAddIntervention') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="' . dol_buildpath('/fichinter/card.php', 1) . '?action=create&socid=' . $object->fk_soc . '&origin=ticket_ticket&originid=' . $object->id . '">' . $langs->trans('TicketAddIntervention') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close ticket if statut is read
|
// Close ticket if statut is read
|
||||||
if ($object->fk_statut > 0 && $object->fk_statut < 8 && $user->rights->ticket->write) {
|
if ($object->fk_statut > 0 && $object->fk_statut < Ticket::STATUS_CLOSED && $user->rights->ticket->write) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=close">' . $langs->trans('CloseTicket') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=close">' . $langs->trans('CloseTicket') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-open ticket
|
// Re-open ticket
|
||||||
if (!$user->socid && $object->fk_statut == 8 && !$user->societe_id) {
|
if (!$user->socid && $object->fk_statut == Ticket::STATUS_CLOSED && !$user->societe_id) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=reopen">' . $langs->trans('ReOpen') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?track_id=' . $object->track_id . '&action=reopen">' . $langs->trans('ReOpen') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete ticket
|
// Delete ticket
|
||||||
if ($user->rights->ticket->delete && !$user->societe_id) {
|
if ($user->rights->ticket->delete && ! $user->societe_id) {
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?track_id=' . $object->track_id . '&action=delete">' . $langs->trans('Delete') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?track_id=' . $object->track_id . '&action=delete">' . $langs->trans('Delete') . '</a></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -758,7 +781,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$action = 'presend';
|
$action = 'presend';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'edit_message_init')
|
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'delete' || $action == 'edit_message_init')
|
||||||
{
|
{
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
print '<a name="builddoc"></a>'; // ancre
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
@ -786,6 +809,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print '<div>';
|
print '<div>';
|
||||||
print load_fiche_titre($langs->trans('TicketAddMessage'), '', 'messages@ticket');
|
print load_fiche_titre($langs->trans('TicketAddMessage'), '', 'messages@ticket');
|
||||||
|
|
||||||
|
print '<hr>';
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
@ -803,6 +828,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$formticket->id = $object->id;
|
$formticket->id = $object->id;
|
||||||
|
|
||||||
$formticket->withfile = 2;
|
$formticket->withfile = 2;
|
||||||
|
$formticket->withcancel = 1;
|
||||||
$formticket->param = array('fk_user_create' => $user->id);
|
$formticket->param = array('fk_user_create' => $user->id);
|
||||||
$formticket->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
$formticket->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang);
|
||||||
|
|
||||||
@ -839,7 +865,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$formticket->substit['__TICKETSUP_USER_CREATE__'] = dolGetFirstLastname($userstat->firstname, $userstat->lastname);
|
$formticket->substit['__TICKETSUP_USER_CREATE__'] = dolGetFirstLastname($userstat->firstname, $userstat->lastname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$formticket->showMessageForm('100%');
|
$formticket->showMessageForm('100%');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,9 +116,9 @@ class ActionsTicket
|
|||||||
/*
|
/*
|
||||||
* Add file in email form
|
* Add file in email form
|
||||||
*/
|
*/
|
||||||
if (GETPOST('addfile')) {
|
if (GETPOST('addfile', 'alpha')) {
|
||||||
// altairis : allow files from public interface
|
// altairis : allow files from public interface
|
||||||
if (GETPOST('track_id')) {
|
if (GETPOST('track_id', 'alpha')) {
|
||||||
$res = $object->fetch('', '', GETPOST('track_id', 'alpha'));
|
$res = $object->fetch('', '', GETPOST('track_id', 'alpha'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,14 +133,14 @@ class ActionsTicket
|
|||||||
dol_mkdir($upload_dir_tmp);
|
dol_mkdir($upload_dir_tmp);
|
||||||
}
|
}
|
||||||
dol_add_file_process($upload_dir_tmp, 0, 0, 'addedfile', dol_print_date(dol_now(), '%Y%m%d%H%M%S') . '-__file__');
|
dol_add_file_process($upload_dir_tmp, 0, 0, 'addedfile', dol_print_date(dol_now(), '%Y%m%d%H%M%S') . '-__file__');
|
||||||
$action = !empty($object->track_id) ? 'add_message' : 'create_ticket';
|
$action = !empty($object->track_id) ? 'add_message' : 'create';
|
||||||
////}
|
////}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove file in email form
|
* Remove file in email form
|
||||||
*/
|
*/
|
||||||
if (GETPOST('removedfile')) {
|
if (GETPOST('removedfile', 'alpha')) {
|
||||||
// altairis : allow files from public interface
|
// altairis : allow files from public interface
|
||||||
if (GETPOST('track_id')) {
|
if (GETPOST('track_id')) {
|
||||||
$res = $object->fetch('', '', GETPOST('track_id', 'alpha'));
|
$res = $object->fetch('', '', GETPOST('track_id', 'alpha'));
|
||||||
@ -156,21 +156,21 @@ class ActionsTicket
|
|||||||
|
|
||||||
// TODO Delete only files that was uploaded from email form
|
// TODO Delete only files that was uploaded from email form
|
||||||
dol_remove_file_process($_POST['removedfile'], 0);
|
dol_remove_file_process($_POST['removedfile'], 0);
|
||||||
$action = !empty($object->track_id) ? 'add_message' : 'create_ticket';
|
$action = !empty($object->track_id) ? 'add_message' : 'create';
|
||||||
////}
|
////}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('add_ticket') && $user->rights->ticket->write) {
|
if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST("subject")) {
|
if (!GETPOST("subject")) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject"));
|
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject"));
|
||||||
$action = 'create_ticket';
|
$action = 'create';
|
||||||
} elseif (!GETPOST("message")) {
|
} elseif (!GETPOST("message")) {
|
||||||
$error++;
|
$error++;
|
||||||
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("message"));
|
$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("message"));
|
||||||
$action = 'create_ticket';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
@ -189,6 +189,8 @@ class ActionsTicket
|
|||||||
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
|
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
|
||||||
$object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1;
|
$object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1;
|
||||||
|
|
||||||
|
$object->fk_project = GETPOST('projectid', 'int');
|
||||||
|
|
||||||
$extrafields = new ExtraFields($this->db);
|
$extrafields = new ExtraFields($this->db);
|
||||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object);
|
||||||
@ -198,7 +200,7 @@ class ActionsTicket
|
|||||||
$error++;
|
$error++;
|
||||||
$this->error = $object->error;
|
$this->error = $object->error;
|
||||||
$this->errors = $object->errors;
|
$this->errors = $object->errors;
|
||||||
$action = 'create_ticket';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && $id > 0)
|
if (!$error && $id > 0)
|
||||||
@ -338,19 +340,15 @@ class ActionsTicket
|
|||||||
if ($action == "mark_ticket_read" && $user->rights->ticket->write) {
|
if ($action == "mark_ticket_read" && $user->rights->ticket->write) {
|
||||||
$object->fetch('', '', GETPOST("track_id", 'alpha'));
|
$object->fetch('', '', GETPOST("track_id", 'alpha'));
|
||||||
|
|
||||||
if ($object->markAsRead($user) > 0) {
|
if ($object->markAsRead($user) > 0)
|
||||||
// Log action in ticket logs table
|
{
|
||||||
$log_action = $langs->trans('TicketLogMesgReadBy', $user->getFullName($langs));
|
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsRead'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketMarkedAsRead'), null, 'mesgs');
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsReadButLogActionNotSaved'), null, 'errors');
|
|
||||||
}
|
|
||||||
header("Location: card.php?track_id=" . $object->track_id . "&action=view");
|
header("Location: card.php?track_id=" . $object->track_id . "&action=view");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
array_push($this->errors, $object->error);
|
$this->errors = $object->error;
|
||||||
|
$this->error = $object->error;
|
||||||
}
|
}
|
||||||
$action = 'view';
|
$action = 'view';
|
||||||
}
|
}
|
||||||
@ -396,12 +394,9 @@ class ActionsTicket
|
|||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$object->fetch_user($usertoassign);
|
$object->fetch_user($usertoassign);
|
||||||
$log_action = $langs->trans('TicketLogAssignedTo', $object->user->getFullName($langs));
|
$log_action = $langs->trans('TicketLogAssignedTo', $object->user->getFullName($langs));
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages($langs->trans('TicketAssigned'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketAssigned'), null, 'mesgs');
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('TicketAssignedButLogActionNotSaved'), null, 'errors');
|
|
||||||
}
|
|
||||||
header("Location: card.php?track_id=" . $object->track_id . "&action=view");
|
header("Location: card.php?track_id=" . $object->track_id . "&action=view");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
@ -436,12 +431,9 @@ class ActionsTicket
|
|||||||
if ($object->close()) {
|
if ($object->close()) {
|
||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$log_action = $langs->trans('TicketLogClosedBy', $user->getFullName($langs));
|
$log_action = $langs->trans('TicketLogClosedBy', $user->getFullName($langs));
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsClosedButLogActionNotSaved'), null, 'warnings');
|
|
||||||
}
|
|
||||||
$url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha');
|
$url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha');
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
} else {
|
} else {
|
||||||
@ -455,12 +447,9 @@ class ActionsTicket
|
|||||||
if (($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) && $object->close()) {
|
if (($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) && $object->close()) {
|
||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']);
|
$log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']);
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages('<div class="confirm">' . $langs->trans('TicketMarkedAsClosed') . '</div>', null, 'mesgs');
|
setEventMessages('<div class="confirm">' . $langs->trans('TicketMarkedAsClosed') . '</div>', null, 'mesgs');
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('TicketMarkedAsClosedButLogActionNotSaved'), null, 'warnings');
|
|
||||||
}
|
|
||||||
$url = 'view.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha');
|
$url = 'view.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha');
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
} else {
|
} else {
|
||||||
@ -495,10 +484,8 @@ class ActionsTicket
|
|||||||
|
|
||||||
if ($action == 'set_progression' && $user->rights->ticket->write) {
|
if ($action == 'set_progression' && $user->rights->ticket->write) {
|
||||||
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||||
$result = $object->setProgression(GETPOST('progress'));
|
$result = $object->setProgression(GETPOST('progress', 'alpha'));
|
||||||
// Log action in ticket logs table
|
|
||||||
$log_action = $langs->trans('TicketLogProgressSetTo', GETPOST('progress'));
|
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
exit();
|
exit();
|
||||||
@ -529,12 +516,12 @@ class ActionsTicket
|
|||||||
if ($action == 'confirm_reopen' && $user->rights->ticket->manage && !GETPOST('cancel')) {
|
if ($action == 'confirm_reopen' && $user->rights->ticket->manage && !GETPOST('cancel')) {
|
||||||
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||||
// prevent browser refresh from reopening ticket several times
|
// prevent browser refresh from reopening ticket several times
|
||||||
if ($object->fk_statut == 8) {
|
if ($object->fk_statut == Ticket::STATUS_CLOSED) {
|
||||||
$res = $object->setStatut(4);
|
$res = $object->setStatut(Ticket::STATUS_ASSIGNED);
|
||||||
if ($res) {
|
if ($res) {
|
||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$log_action = $langs->trans('TicketLogReopen');
|
$log_action = $langs->trans('TicketLogReopen');
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
exit();
|
exit();
|
||||||
@ -544,7 +531,7 @@ class ActionsTicket
|
|||||||
} // Categorisation dans projet
|
} // Categorisation dans projet
|
||||||
elseif ($action == 'classin' && $user->rights->ticket->write) {
|
elseif ($action == 'classin' && $user->rights->ticket->write) {
|
||||||
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||||
$object->setProject(GETPOST('projectid'));
|
$object->setProject(GETPOST('projectid', 'int'));
|
||||||
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
exit();
|
exit();
|
||||||
@ -552,7 +539,7 @@ class ActionsTicket
|
|||||||
} // Categorisation dans contrat
|
} // Categorisation dans contrat
|
||||||
elseif ($action == 'setcontract' && $user->rights->ticket->write) {
|
elseif ($action == 'setcontract' && $user->rights->ticket->write) {
|
||||||
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
if ($this->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) {
|
||||||
$object->setContract(GETPOST('contractid'));
|
$object->setContract(GETPOST('contractid', 'int'));
|
||||||
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
exit();
|
exit();
|
||||||
@ -573,12 +560,9 @@ class ActionsTicket
|
|||||||
// output the result of comparing two files as plain text
|
// output the result of comparing two files as plain text
|
||||||
$log_action .= Diff::toString(Diff::compare(strip_tags($oldvalue_message), strip_tags($object->message)));
|
$log_action .= Diff::toString(Diff::compare(strip_tags($oldvalue_message), strip_tags($object->message)));
|
||||||
|
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
if ($ret > 0) {
|
|
||||||
setEventMessages($langs->trans('TicketMessageSuccesfullyUpdated'), null, 'mesgs');
|
setEventMessages($langs->trans('TicketMessageSuccesfullyUpdated'), null, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$action = 'view';
|
$action = 'view';
|
||||||
} // Reopen ticket
|
} // Reopen ticket
|
||||||
@ -590,7 +574,7 @@ class ActionsTicket
|
|||||||
if ($res) {
|
if ($res) {
|
||||||
// Log action in ticket logs table
|
// Log action in ticket logs table
|
||||||
$log_action = $langs->trans('TicketLogStatusChanged', $langs->transnoentities($object->statuts_short[$old_status]), $langs->transnoentities($object->statuts_short[$new_status]));
|
$log_action = $langs->trans('TicketLogStatusChanged', $langs->transnoentities($object->statuts_short[$old_status]), $langs->transnoentities($object->statuts_short[$new_status]));
|
||||||
$ret = $object->createTicketLog($user, $log_action);
|
|
||||||
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
$url = 'card.php?action=view&track_id=' . $object->track_id;
|
||||||
header("Location: " . $url);
|
header("Location: " . $url);
|
||||||
exit();
|
exit();
|
||||||
@ -1013,7 +997,7 @@ class ActionsTicket
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($action == 'create_ticket') {
|
if ($action == 'create') {
|
||||||
return $langs->trans("CreateTicket");
|
return $langs->trans("CreateTicket");
|
||||||
} elseif ($action == 'edit') {
|
} elseif ($action == 'edit') {
|
||||||
return $langs->trans("EditTicket");
|
return $langs->trans("EditTicket");
|
||||||
@ -1498,9 +1482,13 @@ class ActionsTicket
|
|||||||
print '<div class="tagtd">';
|
print '<div class="tagtd">';
|
||||||
|
|
||||||
if ($status == 1)
|
if ($status == 1)
|
||||||
|
{
|
||||||
$urlforbutton = $_SERVER['PHP_SELF'] . '?track_id=' . $object->track_id . '&action=mark_ticket_read'; // To set as read, we use a dedicated action
|
$urlforbutton = $_SERVER['PHP_SELF'] . '?track_id=' . $object->track_id . '&action=mark_ticket_read'; // To set as read, we use a dedicated action
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
$urlforbutton = $_SERVER['PHP_SELF'] . '?track_id=' . $object->track_id . '&action=set_status&new_status=' . $status;
|
$urlforbutton = $_SERVER['PHP_SELF'] . '?track_id=' . $object->track_id . '&action=set_status&new_status=' . $status;
|
||||||
|
}
|
||||||
|
|
||||||
print '<a class="button" href="' . $urlforbutton . '">';
|
print '<a class="button" href="' . $urlforbutton . '">';
|
||||||
print img_picto($langs->trans($object->statuts_short[$status]), 'statut' . $status . '.png@ticket') . ' ' . $langs->trans($object->statuts_short[$status]);
|
print img_picto($langs->trans($object->statuts_short[$status]), 'statut' . $status . '.png@ticket') . ' ' . $langs->trans($object->statuts_short[$status]);
|
||||||
|
|||||||
@ -1396,19 +1396,22 @@ class Ticket extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($this->statut != 9) { // no closed
|
if ($this->statut != self::STATUS_CANCELED) { // no closed
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "ticket";
|
$sql = "UPDATE " . MAIN_DB_PREFIX . "ticket";
|
||||||
$sql .= " SET fk_statut = 1, date_read='" . $this->db->idate(dol_now()) . "'";
|
$sql .= " SET fk_statut = 1, date_read='" . $this->db->idate(dol_now()) . "'";
|
||||||
$sql .= " WHERE rowid = " . $this->id;
|
$sql .= " WHERE rowid = " . $this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::markAsRead sql=" . $sql);
|
dol_syslog(get_class($this) . "::markAsRead");
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
$this->actionmsg = $langs->trans('TicketLogMesgReadBy', $this->ref, $user->getFullName($langs));
|
||||||
|
$this->actionmsg2 = $langs->trans('TicketLogMesgReadBy', $this->ref, $user->getFullName($langs));
|
||||||
|
|
||||||
if (!$error && !$notrigger) {
|
if (!$error && !$notrigger) {
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('TICKET_MARK_READ', $user);
|
$result=$this->call_trigger('TICKET_MODIFY', $user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,8 +79,8 @@ $extralabels = $extrafields->fetch_name_optionals_label('ticket');
|
|||||||
$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
|
||||||
|
|
||||||
// Default sort order (if not yet defined by previous GETPOST)
|
// Default sort order (if not yet defined by previous GETPOST)
|
||||||
if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
if (! $sortfield) $sortfield="t.datec";
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="DESC";
|
||||||
|
|
||||||
if (GETPOST('search_fk_status', 'alpha') == 'non_closed') $_GET['search_fk_statut'][]='openall'; // For backward compatibility
|
if (GETPOST('search_fk_status', 'alpha') == 'non_closed') $_GET['search_fk_statut'][]='openall'; // For backward compatibility
|
||||||
|
|
||||||
@ -462,7 +462,7 @@ if ($projectid) print '<input type="hidden" name="projectid" value="' . $project
|
|||||||
$newcardbutton='';
|
$newcardbutton='';
|
||||||
if ($user->rights->ticket->write)
|
if ($user->rights->ticket->write)
|
||||||
{
|
{
|
||||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/ticket/new.php?action=create_ticket' . ($socid ? '&socid=' . $socid : '') . ($projectid ? '&origin=projet_project&originid=' . $projectid : '') . '"><span class="valignmiddle">' . $langs->trans('NewTicket').'</span>';
|
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/ticket/card.php?action=create' . ($socid ? '&socid=' . $socid : '') . ($projectid ? '&origin=projet_project&originid=' . $projectid : '') . '"><span class="valignmiddle">' . $langs->trans('NewTicket').'</span>';
|
||||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||||
$newcardbutton.= '</a>';
|
$newcardbutton.= '</a>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,96 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
|
|
||||||
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/ticket/new.php
|
|
||||||
* \ingroup ticket
|
|
||||||
*/
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/ticket/class/actions_ticket.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formticket.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/ticket.lib.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array('companies', 'other', 'ticket'));
|
|
||||||
|
|
||||||
// Get parameters
|
|
||||||
$id = GETPOST('id', 'int');
|
|
||||||
$socid = GETPOST('socid', 'int');
|
|
||||||
$contactid = GETPOST('contactid', 'int');
|
|
||||||
$msg_id = GETPOST('msg_id', 'int');
|
|
||||||
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
|
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
|
||||||
|
|
||||||
// Protection if external user
|
|
||||||
if (!$user->rights->ticket->read || !$user->rights->ticket->write) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
$object = new Ticket($db);
|
|
||||||
$actionobject = new ActionsTicket($db);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
$actionobject->doActions($action, $object);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* View
|
|
||||||
*/
|
|
||||||
|
|
||||||
$form = new Form($db);
|
|
||||||
|
|
||||||
$help_url = 'FR:DocumentationModuleTicket';
|
|
||||||
$page_title = $actionobject->getTitle($action);
|
|
||||||
llxHeader('', $page_title, $help_url);
|
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'create_ticket') {
|
|
||||||
$formticket = new FormTicket($db);
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('NewTicket'), '', 'title_ticket');
|
|
||||||
|
|
||||||
$formticket->withfromsocid = $socid ? $socid : $user->societe_id;
|
|
||||||
$formticket->withfromcontactid = $contactid ? $contactid : '';
|
|
||||||
$formticket->withtitletopic = 1;
|
|
||||||
$formticket->withnotifytiersatcreate = ($notifyTiers?1:0);
|
|
||||||
$formticket->withusercreate = 1;
|
|
||||||
$formticket->withref = 1;
|
|
||||||
$formticket->fk_user_create = $user->id;
|
|
||||||
$formticket->withfile = 2;
|
|
||||||
$formticket->withextrafields = 1;
|
|
||||||
$formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid'));
|
|
||||||
if (empty($defaultref)) {
|
|
||||||
$defaultref = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$formticket->showForm(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
//$somethingshown=$object->showLinkedObjectBlock();
|
|
||||||
|
|
||||||
// End of page
|
|
||||||
llxFooter('');
|
|
||||||
$db->close();
|
|
||||||
@ -332,33 +332,6 @@ class TicketTest extends PHPUnit_Framework_TestCase
|
|||||||
return $localobject;
|
return $localobject;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* testTicketcreateTicketLog
|
|
||||||
*
|
|
||||||
* @param Ticket $localobject Ticket
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @depends testTicketFetch
|
|
||||||
* The depends says test is run only if previous is ok
|
|
||||||
*/
|
|
||||||
/*public function testTicketcreateTicketLog($localobject)
|
|
||||||
{
|
|
||||||
global $conf,$user,$langs,$db;
|
|
||||||
$conf=$this->savconf;
|
|
||||||
$user=$this->savuser;
|
|
||||||
$langs=$this->savlangs;
|
|
||||||
$db=$this->savdb;
|
|
||||||
|
|
||||||
|
|
||||||
$message = 'Test ticket log';
|
|
||||||
$noemail = 1;
|
|
||||||
$result=$localobject->createTicketLog($user, $message, $noemail);
|
|
||||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
|
||||||
|
|
||||||
$this->assertGreaterThan(0, $result);
|
|
||||||
return $localobject;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testTicketclose
|
* testTicketclose
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user