diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 19633aa13d7..62512562e9a 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1090,17 +1090,22 @@ if ($id > 0) // Thirdparty - Contact if ($conf->societe->enabled) { - print ''.$langs->trans("ActionOnCompany").''; + print ''.$langs->trans("ActionOnCompany").''; print ''; + print '
'; $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 ''; + $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 '
'; + print ''; // Contact - print ''.$langs->trans("Contact").''; + print ''.$langs->trans("Contact").''; + print '
'; $form->select_contacts($object->socid, $object->contactid, 'contactid', 1, '', '', 0, 'minwidth200'); - print ''; + print '
'; + print ''; + print ''; } // Project @@ -1108,10 +1113,10 @@ if ($id > 0) { $formproject=new FormProjets($db); - $langs->load("project"); + $langs->load("projects"); - print ''.$langs->trans("Project").''; - $numprojet=$formproject->select_projects($object->socid,$object->fk_project,'projectid'); + print ''.$langs->trans("Project").''; + $numprojet=$formproject->select_projects($object->socid, $object->fk_project, 'projectid'); if ($numprojet==0) { print '   '.$langs->trans("AddProject").''; @@ -1120,7 +1125,7 @@ if ($id > 0) } // Priority - print ''.$langs->trans("Priority").''; + print ''.$langs->trans("Priority").''; print ''; print ''; @@ -1136,7 +1141,7 @@ if ($id > 0) print ''.$langs->trans("Description").''; // 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 ''; @@ -1281,7 +1286,7 @@ if ($id > 0) // Third party - Contact if ($conf->societe->enabled) { - print ''.$langs->trans("ActionOnCompany").''.($object->thirdparty->id?$object->thirdparty->getNomUrl(1):$langs->trans("None")); + print ''.$langs->trans("ActionOnCompany").''.($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)) diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index c0cd9ecfd70..c3788a8baeb 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2012 Regis Houssin + * Copyright (C) 2016 Laurent Destailleur * * 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 diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 0316fb461cf..9e61804af7a 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -136,7 +136,7 @@ class FormActions if (empty($onlyselect)) { print ' =0)?'':' disabled').'>'; - print '%'; + print '%'; } } else