diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index d045c5f0ea76fabe584706184174cdf82dcb2e72..90fdc246be64c2cea83cf68f18c5582cce59cb7a 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1660,23 +1660,86 @@ if ($action == 'create') // Print form confirm print $formconfirm; - print '<table class="border" width="100%">'; $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; - // Ref + + $morehtmlref='<div class="refidno">'; + + // Ref customer + $morehtmlref.=$langs->trans('RefCustomer').' '; + if ($action != 'refclient' && ! empty($object->brouillon)) + $morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a> : '; + if ($user->rights->propal->creer && $action == 'refclient') { + $morehtmlref.='<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">'; + $morehtmlref.='<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; + $morehtmlref.='<input type="hidden" name="action" value="set_ref_client">'; + $morehtmlref.='<input type="text" class="flat" size="20" name="ref_client" value="' . $object->ref_client . '">'; + $morehtmlref.=' <input type="submit" class="button" value="' . $langs->trans('Modify') . '">'; + $morehtmlref.='</form>'; + } else { + $morehtmlref.=$object->ref_client; + } + + // Thirdparty + $morehtmlref.='<br>'.$langs->trans('Company') . ' : ' . $soc->getNomUrl(1); + + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='<br>'.$langs->trans('Project') . ' '; + if ($user->rights->propal->creer) + { + if ($action != 'classify') + $morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; + $morehtmlref.='<input type="hidden" name="action" value="classin">'; + $morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.='<input type="submit" class="button" value="'.$langs->trans("Modify").'">'; + $morehtmlref.='</form>'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.='<a href="'.DOL_URL_ROOT.'/projet/card.php?id=' . $object->fk_project . '" title="' . $langs->trans('ShowProject') . '">'; + $morehtmlref.=$proj->ref; + $morehtmlref.='</a>'; + } else { + $morehtmlref.=''; + } + } + } + + $morehtmlref.='</div>'; + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '<div class="underbanner clearboth"></div>'; + + print '<table class="border" width="100%">'; + + // Ref + /* print '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">'; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '</td></tr>'; + */ // Ref customer + /* print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">'; print $langs->trans('RefCustomer') . '</td>'; if ($action != 'refclient' && ! empty($object->brouillon)) print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a></td>'; - print '</td>'; - print '</tr></table>'; + print '</td></tr></table>'; print '</td><td colspan="5">'; if ($user->rights->propal->creer && $action == 'refclient') { print '<form action="'.$_SERVER["PHP_SELF"].'?id=' . $object->id . '" method="post">'; @@ -1690,10 +1753,12 @@ if ($action == 'create') } print '</td>'; print '</tr>'; - + */ + // Company + /* print '<tr><td>' . $langs->trans('Company') . '</td><td colspan="5">' . $soc->getNomUrl(1) . '</td>'; - print '</tr>'; + print '</tr>';*/ // Lin for thirdparty discounts print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="5">'; @@ -1916,6 +1981,7 @@ if ($action == 'create') } // Project + /* if (! empty($conf->projet->enabled)) { $langs->load("projects"); @@ -1949,7 +2015,7 @@ if ($action == 'create') } } print '</tr>'; - } + }*/ if ($soc->outstanding_limit) { @@ -2069,7 +2135,7 @@ if ($action == 'create') } // Statut - print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>'; + //print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>'; print '</table><br>'; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 6523688fd8db4ad6c76945c7b6159b2bb1c320a9..fb24e82f68da6335eaf9164400c4648f098d9e3a 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -49,7 +49,8 @@ class Propal extends CommonObject public $table_element_line='propaldet'; public $fk_element='fk_propal'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - + public $picto='propal'; + /** * {@inheritdoc} */ @@ -2890,19 +2891,19 @@ class Propal extends CommonObject /** * Return label of status of proposal (draft, validated, ...) * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label */ function getLibStatut($mode=0) { - return $this->LibStatut($this->statut,$mode); + return $this->LibStatut($this->statut, $mode); } /** * Return label of a status (draft, validated, ...) * * @param int $statut id statut - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ function LibStatut($statut,$mode=1) @@ -2921,8 +2922,9 @@ class Propal extends CommonObject if ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut]; if ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans); if ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut]; - if ($mode == 5) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($this->labelstatut_short[$statut],$statuttrans); - } + if ($mode == 5) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($this->labelstatut[$statut],$statuttrans); + if ($mode == 6) return '<span class="hideonsmartphone">'.$this->labelstatut[$statut].' </span>'.img_picto($this->labelstatut[$statut],$statuttrans); + } /** @@ -3232,11 +3234,8 @@ class Propal extends CommonObject } $linkend='</a>'; - $picto='propal'; - - if ($withpicto) - $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); + $result.=($link.img_object($label, $this->picto, 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result.=' '; $result.=$link.$this->ref.$linkend; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 91972673201dde82933d9b4771e25099143f7176..89f31256717e968f8570f39241bf14625811eae2 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -75,15 +75,19 @@ if ($id > 0 || ! empty($ref)) $societe = new Societe($db); if ( $societe->fetch($object->socid) ) { - $head = propal_prepare_head($object); + $head = propal_prepare_head($object); dol_fiche_head($head, 'note', $langs->trans('Proposal'), 0, 'propal'); + $cssclass='titlefield'; + //if ($action == 'editnote_public') $cssclass='titlefieldcreate'; + //if ($action == 'editnote_private') $cssclass='titlefieldcreate'; + print '<table class="border" width="100%">'; $linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans('BackToList').'</a>'; // Ref - print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'; + print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td><td colspan="3">'; print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); print '</td></tr>'; @@ -138,7 +142,7 @@ if ($id > 0 || ! empty($ref)) print "</table>"; - print '<br>'; + //print '<br>'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 5f075ebf8215473b77f73af9977afbc4f0f56be0..8cbf532c89a6a298a468fc480d0479c5e9d5b7a5 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -646,7 +646,7 @@ else { print '<table class="border" width="100%">'; - print '<tr><td valign="top" class="titlefield">'.$langs->trans("BankName").'</td>'; + print '<tr class="liste_titre_add"><td valign="top" class="titlefield">'.$langs->trans("BankName").'</td>'; print '<td colspan="3">'.$account->bank.'</td></tr>'; // Show fields of bank account @@ -710,7 +710,7 @@ else print '<table class="border" width="100%">'; // Accountancy code - print '<tr><td class="titlefield">'.$langs->trans("AccountancyCode").'</td>'; + print '<tr class="liste_titre_add"><td class="titlefield">'.$langs->trans("AccountancyCode").'</td>'; print '<td colspan="3">'; if (! empty($conf->accounting->enabled)) { print length_accountg($account->account_number).'</td></tr>'; @@ -908,7 +908,7 @@ else print '<table class="border" width="100%">'; // If bank account - print '<tr><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>'; + print '<tr class="liste_titre_add"><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>'; print '<td colspan="3"><input size="30" type="text" class="flat" name="bank" value="'.$account->bank.'"></td>'; print '</tr>'; @@ -975,7 +975,7 @@ else $tdextra = ' class="fieldrequired titlefieldcreate"'; } - print '<tr><td'.$tdextra.'>'.$langs->trans("AccountancyCode").'</td>'; + print '<tr class="liste_titre_add"><td'.$tdextra.'>'.$langs->trans("AccountancyCode").'</td>'; print '<td colspan="3">'; if (!empty($conf->accounting->enabled)) { print $formaccountancy->select_account($account->account_number, 'account_number', 1, '', 1, 1); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 4e4f027ae12e176e158804cde5a9f76428d972b3..8f1e40db48f3fa4e69952013c3cd132d384a6787 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -433,7 +433,7 @@ abstract class CommonObject /** - * Return full address of contact + * Return full address for banner * * @param string $htmlkey HTML id to make banner content unique * @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member) @@ -476,7 +476,7 @@ abstract class CommonObject $out.=img_picto($langs->trans("Address"), 'object_address.png'); $out.='</a> '; } - $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; + $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); $outdone++; $outdone++; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0369bd767892967fc270d8cbba570d3671c6ab07..c8ae8dd8b6b59b61e029f2c28540b14bab879b89 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3540,30 +3540,33 @@ class Form * @param int $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable) * @param int $maxlength Max length * @param int $forcefocus Force focus on field (works with javascript only) - * @return void + * @param int $nooutput No print is done. String is returned. + * @return string Return html content */ - function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0) + function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) { global $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; + $out=''; + $formproject=new FormProjets($this->db); $langs->load("project"); if ($htmlname != "none") { - print "\n"; - print '<form method="post" action="'.$page.'">'; - print '<input type="hidden" name="action" value="classin">'; - print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; - print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">'; - print '<tr><td>'; - $formproject->select_projects($socid, $selected, $htmlname, $maxlength, 0, 1, $discard_closed, $forcefocus); - print '</td>'; - print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; - print '</tr></table></form>'; + $out.="\n"; + $out.='<form method="post" action="'.$page.'">'; + $out.='<input type="hidden" name="action" value="classin">'; + $out.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + $out.='<table class="nobordernopadding" cellpadding="0" cellspacing="0">'; + $out.='<tr><td>'; + $out.=$formproject->select_projects($socid, $selected, $htmlname, $maxlength, 0, 1, $discard_closed, $forcefocus, 0, 0, '', 1); + $out.='</td>'; + $out.='<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; + $out.='</tr></table></form>'; } else { @@ -3572,13 +3575,20 @@ class Form $projet = new Project($this->db); $projet->fetch($selected); //print '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$selected.'">'.$projet->title.'</a>'; - print $projet->getNomUrl(0,'',1); + $out.=$projet->getNomUrl(0,'',1); } else { - print " "; + $out.=" "; } } + + if (empty($nooutput)) + { + print $out; + return ''; + } + return $out; } /** @@ -5738,7 +5748,7 @@ class Form } } - else dol_print_error('','Call of showphoto with wrong parameters'); + else dol_print_error('','Call of showphoto with wrong parameters modulepart='.$modulepart); return $ret; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index 4c4c1486d51245d9bc5be41e087214d0f0469ee2..f1ec7edae736ff47932a48f9a2969d92a4fc2de7 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -48,7 +48,7 @@ class FormProjets * * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) * @param int $selected Id project preselected - * @param string $htmlname Nom de la zone html + * @param string $htmlname Name of HTML field * @param int $maxlength Maximum length of label * @param int $option_only Return only html options lines without the select tag * @param int $show_empty Add an empty line @@ -57,12 +57,15 @@ class FormProjets * @param int $disabled Disabled * @param int $mode 0 for HTML mode and 1 for JSON mode * @param string $filterkey Key to filter - * @return int Nber of project if OK, <0 if KO + * @param int $nooutput No print output. Return it only. + * @return string Return html content */ - function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '') + function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0) { global $langs,$conf,$form; + $out=''; + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PROJECT_USE_SEARCH_TO_SELECT)) { $placeholder=''; @@ -75,26 +78,33 @@ class FormProjets $selected_input_value=$project->ref; } $urloption='socid='.$socid.'&htmlname='.$htmlname; - print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array( + $out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array( // 'update' => array( // 'projectid' => 'id' // ) )); - print '<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />'; + $out.='<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />'; } else { - print $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, $discard_closed, $forcefocus, $disabled, 0, $filterkey); + $out.=$this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, $discard_closed, $forcefocus, $disabled, 0, $filterkey, 1); if ($discard_closed) { if (class_exists('Form')) { if (empty($form)) $form=new Form($this->db); - print $form->textwithpicto('', $langs->trans("ClosedProjectsAreHidden")); + $out.=$form->textwithpicto('', $langs->trans("ClosedProjectsAreHidden")); } } } + + if (empty($nooutput)) + { + print $out; + return ''; + } + else return $out; } /** @@ -111,9 +121,10 @@ class FormProjets * @param int $disabled Disabled * @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example) * @param string $filterkey Key to filter + * @param int $nooutput No print output. Return it only. * @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 = '') + 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) { global $user,$conf,$langs; @@ -250,10 +261,13 @@ class FormProjets $this->db->free($resql); if (!$mode) { - if (empty($option_only)) { - $out.= '</select>'; + if (empty($option_only)) $out.= '</select>'; + if (empty($nooutput)) + { + print $out; + return ''; } - print $out; + else return $out; } else { return $outarray; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 88423aac2796c3c73670b4dcf195f78bb1de88fc..8159c0b86a57a5bf3d91aaf329db74fd494e2d87 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -920,8 +920,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $modulepart='unknown'; if ($object->element == 'societe') $modulepart='societe'; if ($object->element == 'contact') $modulepart='contact'; - if ($object->element == 'member') $modulepart='memberphoto'; - if ($object->element == 'user') $modulepart='userphoto'; + if ($object->element == 'member') $modulepart='memberphoto'; + if ($object->element == 'user') $modulepart='userphoto'; if ($object->element == 'product') $modulepart='product'; print '<div class="arearef heightref valignmiddle" width="100%">'; @@ -947,7 +947,18 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } else { - if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'</div>'; + if ($showimage) + { + $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'; + if ($modulepart != 'unknown') $morehtmlleft.=$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos); + else + { + $width=14; $cssclass='photorefcenter'; + $nophoto=img_picto('', 'object_'.$object->picto, '', false, 1); + $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>'; + } + $morehtmlleft.='</div>'; + } } if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>'; if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { @@ -970,7 +981,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r } } else { - $morehtmlright.=$object->getLibStatut(5); + $tmptxt=$object->getLibStatut(6); + if (empty($tmptxt)) $tmptxt=$object->getLibStatut(5); + $morehtmlright.=$tmptxt; } if (! empty($object->name_alias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>'; // For thirdparty if (! empty($object->label)) $morehtmlref.='<div class="refidno">'.$object->label.'</div>'; // For product @@ -1793,10 +1806,11 @@ function dol_user_country() * @param int $mode thirdparty|contact|member|other * @param int $id Id of object * @param int $noprint No output. Result is the function return + * @param string $charfornl Char to use instead of nl2br. '' means we use a standad nl2br. * @return string|void Nothing if noprint is 0, formatted address if noprint is 1 * @see dol_format_address */ -function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) +function dol_print_address($address, $htmlid, $mode, $id, $noprint=0, $charfornl='') { global $conf, $user, $langs, $hookmanager; @@ -1811,7 +1825,9 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) } if (empty($reshook)) { - $out.=nl2br($address); + if (empty($charfornl)) $out.=nl2br($address); + else $out.=preg_replace('/[\r\n]+/', $charfornl, $address); + $showgmap=$showomap=0; // TODO Add a hook here diff --git a/htdocs/product/note.php b/htdocs/product/note.php index b3f2fa1c01c6f0e0cf0aa34c1c5baad58746f43b..9a914527a83d558a30984e7d591227227582b06a 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -93,23 +93,20 @@ if ($id > 0 || ! empty($ref)) dol_fiche_head($head, 'note', $titre, 0, $picto); - - print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; - print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; - $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); - - print '<div class="fichecenter">'; + + $cssclass='titlefield'; + //if ($action == 'editnote_public') $cssclass='titlefieldcreate'; + //if ($action == 'editnote_private') $cssclass='titlefieldcreate'; + + //print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; - $cssclass='titlefield'; - if ($action == 'editnote') $cssclass='titlefieldcreate'; - if ($action == 'editnote_private') $cssclass='titlefieldcreate'; + include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - dol_fiche_end(); } diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index ac441f5293882b248323d383ae8e571126c400e3..27eb643bc160fb9181de7d5487e4c81851ce7745 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -73,10 +73,6 @@ if ($id > 0) dol_fiche_head($head, 'note', $langs->trans("ThirdParty"),0,'company'); - - print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; - print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; - dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); $cssclass='titlefield'; @@ -120,7 +116,6 @@ if ($id > 0) //print '<div class="underbanner clearboth"></div>'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - dol_fiche_end(); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index bf5a0e6608584194c84140eedb7346f7ac48731a..3d39cea9f6220edbc52d7de2d85bd3e76b5ae087 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -913,7 +913,7 @@ div.statusref { margin-bottom: 10px; clear: both; } -img.photoref { +img.photoref, div.photoref { border: 1px solid #CCC; -moz-box-shadow: 3px 3px 4px #DDD; -webkit-box-shadow: 3px 3px 4px #DDD; @@ -923,6 +923,12 @@ img.photoref { width: 80px; object-fit: contain; } +div.photoref { + display:table-cell; + vertical-align:middle; + text-align:center; +} + img.photorefnoborder { padding: 2px; height: 48px; @@ -2444,6 +2450,7 @@ div.refidno { font-weight: normal; color: #444; font-size: <?php print $fontsize ?>px; + line-height: 21px; } div.pagination { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 4c790b20d446a2cad4b8c53c79e29594ce10f135..3b8c7f380970dd966f471956c4869fb77d1f4659 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2340,6 +2340,7 @@ div.refidno { font-weight: normal; color: #444; font-size: <?php print $fontsize ?>px; + line-height: 21px; } div.pagination {