Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
parent
22edd650d3
commit
73915d51c8
@ -385,8 +385,8 @@ foreach ($list_binding as $key)
|
|||||||
if ($key == 'ACCOUNTING_DATE_START_BINDING') {
|
if ($key == 'ACCOUNTING_DATE_START_BINDING') {
|
||||||
print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1);
|
print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1);
|
||||||
} elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') {
|
} elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') {
|
||||||
$array=array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear"));
|
$array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear"));
|
||||||
print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER)?$conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER:0));
|
print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER) ? $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER : 0));
|
||||||
} else {
|
} else {
|
||||||
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
|
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -260,13 +260,13 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// sort list
|
// sort list
|
||||||
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->name, $b->name); });
|
return strcasecmp($a->name, $b->name); });
|
||||||
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->name, $a->name); });
|
return strcasecmp($b->name, $a->name); });
|
||||||
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->version, $b->version); });
|
return strcasecmp($a->version, $b->version); });
|
||||||
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->version, $a->version); });
|
return strcasecmp($b->version, $a->version); });
|
||||||
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
||||||
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
||||||
@ -298,7 +298,7 @@ foreach ($moduleList as $module) {
|
|||||||
$idperms .= ($idperms ? ", " : "").$permission;
|
$idperms .= ($idperms ? ", " : "").$permission;
|
||||||
$translationKey = "Permission".$permission;
|
$translationKey = "Permission".$permission;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_SHOW_PERMISSION)) {
|
if (!empty($conf->global->MAIN_SHOW_PERMISSION)) {
|
||||||
if (empty($langs->tab_translate[$translationKey])) {
|
if (empty($langs->tab_translate[$translationKey])) {
|
||||||
$tooltip = 'Missing translation (key '.$translationkey.' not found in admin.lang)';
|
$tooltip = 'Missing translation (key '.$translationkey.' not found in admin.lang)';
|
||||||
$idperms .= ' <img src="../../theme/eldy/img/warning.png" alt="Warning" title="'.$tooltip.'">';
|
$idperms .= ' <img src="../../theme/eldy/img/warning.png" alt="Warning" title="'.$tooltip.'">';
|
||||||
|
|||||||
@ -1995,7 +1995,7 @@ class ActionComm extends CommonObject
|
|||||||
$formmail = new FormMail($this->db);
|
$formmail = new FormMail($this->db);
|
||||||
$actionCommReminder = new ActionCommReminder($this->db);
|
$actionCommReminder = new ActionCommReminder($this->db);
|
||||||
|
|
||||||
while ($obj = $this->db->fetch_object($resql)){
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
$res = $actionCommReminder->fetch($obj->id);
|
$res = $actionCommReminder->fetch($obj->id);
|
||||||
if ($res < 0) {
|
if ($res < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
@ -475,16 +475,16 @@ class Orders extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function getContacts($id, $type = '')
|
public function getContacts($id, $type = '')
|
||||||
{
|
{
|
||||||
if (! DolibarrApiAccess::$user->rights->commande->lire) {
|
if (!DolibarrApiAccess::$user->rights->commande->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->commande->fetch($id);
|
$result = $this->commande->fetch($id);
|
||||||
if ( ! $result ) {
|
if (!$result) {
|
||||||
throw new RestException(404, 'Order not found');
|
throw new RestException(404, 'Order not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,16 +556,16 @@ class Orders extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
public function deleteContact($id, $rowid)
|
public function deleteContact($id, $rowid)
|
||||||
{
|
{
|
||||||
if (! DolibarrApiAccess::$user->rights->commande->creer) {
|
if (!DolibarrApiAccess::$user->rights->commande->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->commande->fetch($id);
|
$result = $this->commande->fetch($id);
|
||||||
if (! $result) {
|
if (!$result) {
|
||||||
throw new RestException(404, 'Order not found');
|
throw new RestException(404, 'Order not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
|
||||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1231,7 +1231,7 @@ class ExtraFields
|
|||||||
} else {
|
} else {
|
||||||
if (!$notrans) {
|
if (!$notrans) {
|
||||||
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
|
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
|
||||||
$labeltoshow =$translabel;
|
$labeltoshow = $translabel;
|
||||||
}
|
}
|
||||||
if (empty($labeltoshow)) $labeltoshow = '(not defined)';
|
if (empty($labeltoshow)) $labeltoshow = '(not defined)';
|
||||||
|
|
||||||
|
|||||||
@ -7997,14 +7997,14 @@ class Form
|
|||||||
|
|
||||||
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
|
if ($default) $TModels[0] = $langs->trans('DefaultMailModel');
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
foreach ($formmail->lines_model as $model){
|
foreach ($formmail->lines_model as $model) {
|
||||||
$TModels[$model->id] = $model->label;
|
$TModels[$model->id] = $model->label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$retstring .= '<select class="flat" id="select_'.$prefix.'model_mail" name="'.$prefix.'model_mail">';
|
$retstring .= '<select class="flat" id="select_'.$prefix.'model_mail" name="'.$prefix.'model_mail">';
|
||||||
|
|
||||||
foreach ($TModels as $id_model=>$label_model){
|
foreach ($TModels as $id_model=>$label_model) {
|
||||||
$retstring .= '<option value="'.$id_model.'"';
|
$retstring .= '<option value="'.$id_model.'"';
|
||||||
$retstring .= ">".$label_model."</option>";
|
$retstring .= ">".$label_model."</option>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -920,7 +920,7 @@ class FormTicket
|
|||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
print '<tr class="email_line"><td class="titlefieldcreate">'.$langs->trans('Subject').'</td>';
|
print '<tr class="email_line"><td class="titlefieldcreate">'.$langs->trans('Subject').'</td>';
|
||||||
print '<td><input type="text" class="text minwidth500" name="subject" value="[' . $conf->global->MAIN_INFO_SOCIETE_NOM . ' - ' . $langs->trans("Ticket") . ' ' . $this->ref . '] '.$langs->trans('TicketNewMessage').'" />';
|
print '<td><input type="text" class="text minwidth500" name="subject" value="['.$conf->global->MAIN_INFO_SOCIETE_NOM.' - '.$langs->trans("Ticket").' '.$this->ref.'] '.$langs->trans('TicketNewMessage').'" />';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Destinataires
|
// Destinataires
|
||||||
@ -987,7 +987,7 @@ class FormTicket
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MESSAGE
|
// MESSAGE
|
||||||
$defaultmessage="";
|
$defaultmessage = "";
|
||||||
if (is_object($arraydefaultmessage) && $arraydefaultmessage->content) {
|
if (is_object($arraydefaultmessage) && $arraydefaultmessage->content) {
|
||||||
$defaultmessage = $arraydefaultmessage->content;
|
$defaultmessage = $arraydefaultmessage->content;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6187,15 +6187,15 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
|
||||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
||||||
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') {
|
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') {
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = dol_print_date($object->array_options['options_' . $key], 'day');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = dol_print_date($object->array_options['options_'.$key], 'day');
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = dol_print_date($object->array_options['options_' . $key], 'day', 'tzserver', $outputlangs);
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_LOCALE__'] = dol_print_date($object->array_options['options_'.$key], 'day', 'tzserver', $outputlangs);
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = dol_print_date($object->array_options['options_' . $key], 'dayrfc');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_RFC__'] = dol_print_date($object->array_options['options_'.$key], 'dayrfc');
|
||||||
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'datetime') {
|
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'datetime') {
|
||||||
$datetime = $object->array_options['options_'.$key];
|
$datetime = $object->array_options['options_'.$key];
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour') : '');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour') : '');
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : '');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : '');
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_DAY_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'day', 'tzserver', $outputlangs) : '');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_DAY_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'day', 'tzserver', $outputlangs) : '');
|
||||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhourrfc') : '');
|
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_RFC__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhourrfc') : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -791,7 +791,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
$object->actionmsg2 = $langs->transnoentities($action."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
$object->actionmsg2 = $langs->transnoentities($action."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
||||||
} else { // generic translation key
|
} else { // generic translation key
|
||||||
$tmp = explode('_', $action);
|
$tmp = explode('_', $action);
|
||||||
$object->actionmsg2 = $langs->transnoentities($tmp[count($tmp)-1]."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
$object->actionmsg2 = $langs->transnoentities($tmp[count($tmp) - 1]."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($object->actionmsg)) {
|
if (empty($object->actionmsg)) {
|
||||||
@ -800,7 +800,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
$object->actionmsg = $langs->transnoentities($action."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
$object->actionmsg = $langs->transnoentities($action."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
||||||
} else { // generic translation key
|
} else { // generic translation key
|
||||||
$tmp = explode('_', $action);
|
$tmp = explode('_', $action);
|
||||||
$object->actionmsg = $langs->transnoentities($tmp[count($tmp)-1]."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
$object->actionmsg = $langs->transnoentities($tmp[count($tmp) - 1]."InDolibarr", ($object->newref ? $object->newref : $object->ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Simple autoloader, so we don't need Composer just for this.
|
* Simple autoloader, so we don't need Composer just for this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function($class) {
|
||||||
if (preg_match('/^DebugBar/', $class)) {
|
if (preg_match('/^DebugBar/', $class)) {
|
||||||
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
||||||
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
||||||
|
|||||||
@ -354,13 +354,13 @@ class Stripe extends CommonObject
|
|||||||
// That's why we can comment the part of code to retreive a payment intent with object id (never mind if we cumulate payment intent with old ones that will not be used)
|
// That's why we can comment the part of code to retreive a payment intent with object id (never mind if we cumulate payment intent with old ones that will not be used)
|
||||||
|
|
||||||
$sql = "SELECT pi.ext_payment_id, pi.entity, pi.fk_facture, pi.sourcetype, pi.ext_payment_site";
|
$sql = "SELECT pi.ext_payment_id, pi.entity, pi.fk_facture, pi.sourcetype, pi.ext_payment_site";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "prelevement_facture_demande as pi";
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pi";
|
||||||
$sql.= " WHERE pi.fk_facture = " . $object->id;
|
$sql .= " WHERE pi.fk_facture = ".$object->id;
|
||||||
$sql.= " AND pi.sourcetype = '" . $object->element . "'";
|
$sql .= " AND pi.sourcetype = '".$object->element."'";
|
||||||
$sql.= " AND pi.entity IN (".getEntity('societe').")";
|
$sql .= " AND pi.entity IN (".getEntity('societe').")";
|
||||||
$sql.= " AND pi.ext_payment_site = '" . $service . "'";
|
$sql .= " AND pi.ext_payment_site = '".$service."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::getPaymentIntent search stripe payment intent for object id = ".$object->id, LOG_DEBUG);
|
dol_syslog(get_class($this)."::getPaymentIntent search stripe payment intent for object id = ".$object->id, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
@ -369,7 +369,7 @@ class Stripe extends CommonObject
|
|||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$intent = $obj->ext_payment_id;
|
$intent = $obj->ext_payment_id;
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::getPaymentIntent found existing payment intent record");
|
dol_syslog(get_class($this)."::getPaymentIntent found existing payment intent record");
|
||||||
|
|
||||||
// Force to use the correct API key
|
// Force to use the correct API key
|
||||||
global $stripearrayofkeysbyenv;
|
global $stripearrayofkeysbyenv;
|
||||||
@ -403,8 +403,8 @@ class Stripe extends CommonObject
|
|||||||
|
|
||||||
// list of payment method types
|
// list of payment method types
|
||||||
$paymentmethodtypes = array("card");
|
$paymentmethodtypes = array("card");
|
||||||
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT) ) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) $paymentmethodtypes[] = "sepa_debit"; //&& ($object->thirdparty->isInEEC())
|
||||||
if (!empty($conf->global->STRIPE_IDEAL) ) $paymentmethodtypes[] = "ideal"; //&& ($object->thirdparty->isInEEC())
|
if (!empty($conf->global->STRIPE_IDEAL)) $paymentmethodtypes[] = "ideal"; //&& ($object->thirdparty->isInEEC())
|
||||||
|
|
||||||
$dataforintent = array(
|
$dataforintent = array(
|
||||||
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
"confirm" => $confirmnow, // Do not confirm immediatly during creation of intent
|
||||||
|
|||||||
@ -312,10 +312,10 @@ if (empty($reshook)) {
|
|||||||
if (!empty($backtopage)) {
|
if (!empty($backtopage)) {
|
||||||
$url = $backtopage;
|
$url = $backtopage;
|
||||||
} else {
|
} else {
|
||||||
$url = 'card.php?track_id=' . $object->track_id;
|
$url = 'card.php?track_id='.$object->track_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: ' . $url);
|
header('Location: '.$url);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -657,10 +657,10 @@ if ($action == 'create' || $action == 'presend')
|
|||||||
|
|
||||||
$head = ticket_prepare_head($object);
|
$head = ticket_prepare_head($object);
|
||||||
|
|
||||||
print '<form method="POST" name="form_ticket" id="form_edit_ticket" action="' . $_SERVER['PHP_SELF'] . '?track_id=' . $object->track_id . '">';
|
print '<form method="POST" name="form_ticket" id="form_edit_ticket" action="'.$_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'">';
|
||||||
print '<input type="hidden" name="token" value="' . newToken() . '">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="tack_id" value="' . $object->track_id . '">';
|
print '<input type="hidden" name="tack_id" value="'.$object->track_id.'">';
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans('Ticket'), 0, 'ticket');
|
dol_fiche_head($head, 'card', $langs->trans('Ticket'), 0, 'ticket');
|
||||||
|
|
||||||
@ -668,23 +668,23 @@ if ($action == 'create' || $action == 'presend')
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">' . $langs->trans("TicketTypeRequest") . '</span></label></td><td>';
|
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
|
||||||
$formticket->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2');
|
$formticket->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Severity
|
// Severity
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">' . $langs->trans("TicketSeverity") . '</span></label></td><td>';
|
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
|
||||||
$formticket->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2');
|
$formticket->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Group
|
// Group
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">' . $langs->trans("TicketGroup") . '</span></label></td><td>';
|
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">'.$langs->trans("TicketGroup").'</span></label></td><td>';
|
||||||
$formticket->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2');
|
$formticket->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
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>';
|
||||||
print '<input class="text" size="50" id="subject" name="subject" value="' . (GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $object->subject) . '" />';
|
print '<input class="text" size="50" id="subject" name="subject" value="'.(GETPOST('subject', 'alpha') ? GETPOST('subject', 'alpha') : $object->subject).'" />';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
@ -701,9 +701,9 @@ if ($action == 'create' || $action == 'presend')
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" name="save" value="' . $langs->trans('Save') . '">';
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans('Save').'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
@ -1250,7 +1250,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action =
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) {
|
if ($user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) {
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?track_id=' . $object->track_id . '&action=edit">' . $langs->trans('Modify') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?track_id='.$object->track_id.'&action=edit">'.$langs->trans('Modify').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close ticket if statut is read
|
// Close ticket if statut is read
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user