This commit is contained in:
Laurent Destailleur 2017-12-20 21:14:22 +01:00
parent d20062df73
commit f1305bbdd6
3 changed files with 7 additions and 8 deletions

View File

@ -1592,7 +1592,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// What trigger creation
print '<tr><td>' . $langs->trans('Source') . '</td><td>';
print '<tr><td>' . $langs->trans('Channel') . '</td><td>';
$form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1);
print '</td></tr>';
@ -1604,7 +1604,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$langs->load("projects");
print '<tr>';
print '<td>' . $langs->trans("Project") . '</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0);
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
print '</td>';
print '</tr>';
@ -2234,7 +2234,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Source reason (why we have an ordrer)
print '<tr><td height="10">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source');
print $langs->trans('Channel');
print '</td>';
if ($action != 'editdemandreason')
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . '</a></td>';

View File

@ -127,9 +127,10 @@ class FormProjets
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param int $htmlid Html id to use instead of htmlname
* @param string $morecss More CSS
* @return int Nb of project if OK, <0 if KO
*/
function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='')
function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500')
{
global $user,$conf,$langs;
@ -170,15 +171,13 @@ class FormProjets
$resql=$this->db->query($sql);
if ($resql)
{
$morecss='maxwidth500';
// Use select2 selector
if (! empty($conf->use_javascript_ajax))
{
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$comboenhancement = ajax_combobox($htmlid, array(), 0, $forcefocus);
$out.=$comboenhancement;
$morecss='minwidth100 maxwidth300';
$morecss='minwidth100 maxwidth500';
}
if (empty($option_only)) {

View File

@ -1108,7 +1108,7 @@ if ($action == 'create')
$projectid = ($originid ? $originid : 0);
print '<tr>';
print '<td class="tdtop">' . $langs->trans("Project") . '</td><td colspan="2">';
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';