Fix: dolibarrize

This commit is contained in:
Regis Houssin 2018-04-18 09:27:54 +02:00
parent 7256edc831
commit 85c93c26a9
2 changed files with 15 additions and 12 deletions

View File

@ -148,7 +148,8 @@ class FormTicketsup
} }
print '<input type="hidden" name="fk_user_create" value="' . $this->fk_user_create . '">'; print '<input type="hidden" name="fk_user_create" value="' . $this->fk_user_create . '">';
print '<div class="">'; dol_fiche_head('');
print '<table class="tableticket" width="' . $width . '">'; print '<table class="tableticket" width="' . $width . '">';
@ -181,7 +182,7 @@ class FormTicketsup
print '<tr><td class="titlefield">' . $langs->trans("ThirdParty") . '</td><td>'; print '<tr><td class="titlefield">' . $langs->trans("ThirdParty") . '</td><td>';
$events = array(); $events = array();
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events); print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200');
print '</td></tr>'; print '</td></tr>';
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) { if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) {
$htmlname = 'socid'; $htmlname = 'socid';
@ -436,7 +437,7 @@ class FormTicketsup
$ticketstat->loadCacheTypesTickets(); $ticketstat->loadCacheTypesTickets();
print '<select id="select' . $htmlname . '" class="flat select_tickettype'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">'; print '<select id="select' . $htmlname . '" class="flat minwidth200'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
if ($empty) { if ($empty) {
print '<option value="">&nbsp;</option>'; print '<option value="">&nbsp;</option>';
} }
@ -536,7 +537,7 @@ class FormTicketsup
$ticketstat->loadCacheCategoriesTickets(); $ticketstat->loadCacheCategoriesTickets();
print '<select id="select' . $htmlname . '" class="flat select_ticketcategory'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">'; print '<select id="select' . $htmlname . '" class="flat minwidth150'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
if ($empty) { if ($empty) {
print '<option value="">&nbsp;</option>'; print '<option value="">&nbsp;</option>';
} }
@ -605,7 +606,7 @@ class FormTicketsup
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
} }
print ajax_combobox('select'.$htmlname); print ajax_combobox('select'.$htmlname,'',0,0,'off');
} }
/** /**
@ -637,7 +638,7 @@ class FormTicketsup
$ticketstat->loadCacheSeveritiesTickets(); $ticketstat->loadCacheSeveritiesTickets();
print '<select id="select' . $htmlname . '" class="flat select_ticketseverity'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">'; print '<select id="select' . $htmlname . '" class="flat minwidth150'.($morecss?' '.$morecss:'').'" name="' . $htmlname . '">';
if ($empty) { if ($empty) {
print '<option value="">&nbsp;</option>'; print '<option value="">&nbsp;</option>';
} }

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io> /* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr> * Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018 Regis Houssin <regis.houssin@capnetworks.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -580,11 +581,12 @@ print '</tr>'."\n";
// Detect if we need a fetch on each output line // Detect if we need a fetch on each output line
$needToFetchEachLine=0; $needToFetchEachLine=0;
if (! empty($extrafields->attributes[$object->table_element]['computed'])) {
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val)
{ {
if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object
} }
}
// Loop on record // Loop on record
// -------------------------------------------------------------------- // --------------------------------------------------------------------