FIX bad translation language loaded

FIX When changing thirdparty on event card, the showempty option of
contact was lost.
FIX Bad placeholder shown on combo to select a thirdparty.
This commit is contained in:
Laurent Destailleur 2016-04-03 19:04:03 +02:00
parent 3aeb579486
commit cea48a8dd6
3 changed files with 20 additions and 14 deletions

View File

@ -1090,17 +1090,22 @@ if ($id > 0)
// Thirdparty - Contact
if ($conf->societe->enabled)
{
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("ActionOnCompany").'</td>';
print '<td>';
print '<div class="maxwidth200onsmartphone">';
$events=array();
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
print $form->select_company($object->socid,'socid','',1,1,0,$events);
print '</td>';
$events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
print $form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0);
print '</div>';
print '</td></tr>';
// Contact
print '<td>'.$langs->trans("Contact").'</td><td>';
print '<tr><td>'.$langs->trans("Contact").'</td><td>';
print '<div class="maxwidth200onsmartphone">';
$form->select_contacts($object->socid, $object->contactid, 'contactid', 1, '', '', 0, 'minwidth200');
print '</td></tr>';
print '</div>';
print '</td>';
print '</tr>';
}
// Project
@ -1108,10 +1113,10 @@ if ($id > 0)
{
$formproject=new FormProjets($db);
$langs->load("project");
$langs->load("projects");
print '<tr><td width="30%">'.$langs->trans("Project").'</td><td colspan="3">';
$numprojet=$formproject->select_projects($object->socid,$object->fk_project,'projectid');
print '<tr><td class="titlefield">'.$langs->trans("Project").'</td><td colspan="3">';
$numprojet=$formproject->select_projects($object->socid, $object->fk_project, 'projectid');
if ($numprojet==0)
{
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->socid.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit').'">'.$langs->trans("AddProject").'</a>';
@ -1120,7 +1125,7 @@ if ($id > 0)
}
// Priority
print '<tr><td class="nowrap" width="30%">'.$langs->trans("Priority").'</td><td colspan="3">';
print '<tr><td class="titlefield nowrap">'.$langs->trans("Priority").'</td><td colspan="3">';
print '<input type="text" name="priority" value="'.($object->priority?$object->priority:'').'" size="5">';
print '</td></tr>';
@ -1136,7 +1141,7 @@ if ($id > 0)
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="3">';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('note',$object->note,'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90);
$doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_5,90);
$doleditor->Create();
print '</td></tr>';
@ -1281,7 +1286,7 @@ if ($id > 0)
// Third party - Contact
if ($conf->societe->enabled)
{
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
print '<tr><td>'.$langs->trans("ActionOnCompany").'</td><td>'.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None"));
if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL')
{
if ($object->thirdparty->fetch($object->thirdparty->id))

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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

View File

@ -136,7 +136,7 @@ class FormActions
if (empty($onlyselect))
{
print ' <input type="text" id="val'.$htmlname.'" name="percentage" class="flat hideifna" value="'.($selected>=0?$selected:'').'" size="2"'.($canedit&&($selected>=0)?'':' disabled').'>';
print '<span class="hideifna">%</span>';
print '<span class="hideonsmartphone hideifna">%</span>';
}
}
else