2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2021-05-18 17:24:17 +02:00
parent a00ae6c918
commit 271ba884db
7 changed files with 19 additions and 17 deletions

View File

@@ -8127,9 +8127,10 @@ class Form
*
* @param Object $object Object containing data to retrieve file name
* @param int $width Width of photo
* @param string $morecss More CSS on img of barcode
* @return string HTML code to output barcode
*/
public function showbarcode(&$object, $width = 100)
public function showbarcode(&$object, $width = 100, $morecss = '')
{
global $conf;
@@ -8150,7 +8151,7 @@ class Form
// Barcode image
$url = DOL_URL_ROOT.'/viewimage.php?modulepart=barcode&generator='.urlencode($object->barcode_type_coder).'&code='.urlencode($object->barcode).'&encoding='.urlencode($object->barcode_type_code);
$out = '<!-- url barcode = '.$url.' -->';
$out .= '<img src="'.$url.'">';
$out .= '<img src="'.$url.'"'.($morecss ? ' class="'.$morecss.'"' : '').'>';
return $out;
}

View File

@@ -304,7 +304,7 @@ class FormActions
print '<td>'.$label.'</td>';
// Date
print '<td class="center">'.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel');
print '<td class="center nowraponall">'.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel');
if ($actioncomm->datef) {
$tmpa = dol_getdate($actioncomm->datep);
$tmpb = dol_getdate($actioncomm->datef);

View File

@@ -1923,7 +1923,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
}
if ($showbarcode) {
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object, 100, 'photoref').'</div>';
}
if ($object->element == 'societe') {

View File

@@ -166,12 +166,12 @@ if ($socid > 0) {
if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
print '<br>';
$param = '&socid='.$socid;
$param = '&socid='.urlencode($socid);
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.$contextpage;
$param .= '&contextpage='.urlencode($contextpage);
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.$limit;
$param .= '&limit='.urlencode($limit);
}
print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, '');

View File

@@ -2844,10 +2844,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($user->socid)) {
if (!empty($object->email) || $at_least_one_email_contact) {
$langs->load("mails");
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>';
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
} else {
$langs->load("mails");
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans('SendMail').'</a>';
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans('SendMail').'</a>'."\n";
}
}
@@ -2859,12 +2859,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$adh = new Adherent($db);
$result = $adh->fetch('', '', $object->id);
if ($result == 0 && ($object->client == 1 || $object->client == 3) && !empty($conf->global->MEMBER_CAN_CONVERT_CUSTOMERS_TO_MEMBERS)) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/card.php?&action=create&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("NewMember")).'">'.$langs->trans("NewMember").'</a>';
print '<a class="butAction" href="'.DOL_URL_ROOT.'/adherents/card.php?&action=create&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("NewMember")).'">'.$langs->trans("NewMember").'</a>'."\n";
}
}
if ($user->rights->societe->supprimer) {
print '<a class="butActionDelete" href="card.php?action=merge&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MergeThirdparties")).'">'.$langs->trans('Merge').'</a>';
print '<a class="butActionDelete" href="card.php?action=merge&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MergeThirdparties")).'">'.$langs->trans('Merge').'</a>'."\n";
}
if ($user->rights->societe->supprimer) {

View File

@@ -206,7 +206,7 @@ dol_banner_tab($object, 'socid', $linkback, ($user->socid ? 0 : 1), 'rowid', 'no
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
print '<table class="border centpercent tableforfield">';
if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field
print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';

View File

@@ -50,7 +50,8 @@ if (!empty($conf->global->THEME_DARKMODEENABLED)) {
margin-bottom: 1.4em;
}*/
div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused, div.tabsAction > a.butActionDelete,
div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete {
div.tabsAction > span.butAction, div.tabsAction > span.butActionRefused, div.tabsAction > span.butActionDelete,
div.tabsAction > div.divButAction > span.butAction {
margin-bottom: 1.4em !important;
margin-right: 0px !important;
}