Fix: area to generate doc must use half size not onethird.
Fix: Missing maxwidthonsmartphone. Fix: Missing backtopage Fix: Missing translation key
This commit is contained in:
parent
9768550696
commit
f08759a17e
@ -241,13 +241,20 @@ if (empty($reshook))
|
||||
$result = $object->delete();
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/contact/list.php');
|
||||
exit;
|
||||
if ($backtopage)
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/contact/list.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($object->error,'errors');
|
||||
setEventMessage($object->errors,'errors');
|
||||
setEventMessage($object->error,$object->errors,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,7 +367,7 @@ else
|
||||
{
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1082,27 +1089,27 @@ else
|
||||
{
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||
}
|
||||
|
||||
if (! $object->user_id && $user->rights->user->user->creer)
|
||||
{
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
print '<a class="butAction" href="card.php?id='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
|
||||
if ($user->rights->societe->contact->supprimer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="butActionDelete" href="card.php?id='.$object->id.'&action=delete'.($backtopage?'&backtopage='.urlencode($backtopage):'').'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
// Activer
|
||||
if ($object->statut == 0 && $user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable">'.$langs->trans("Reactivate").'</a>';
|
||||
}
|
||||
// Desactiver
|
||||
if ($object->statut == 1 && $user->rights->societe->contact->creer)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
||||
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&id='.$object->id.'">'.$langs->trans("DisableUser").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -877,20 +877,21 @@ class Contact extends CommonObject
|
||||
* @param int $withpicto Include picto with link
|
||||
* @param string $option Where the link point to
|
||||
* @param int $maxlen Max length of
|
||||
* @param string $moreparam Add more param into URL
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0)
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($option == 'xxx')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.'">';
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/contact/card.php?id='.$this->id.$moreparam.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
|
||||
@ -474,14 +474,14 @@ class FormFile
|
||||
// Model
|
||||
if (! empty($modellist))
|
||||
{
|
||||
$out.= '<th align="center" class="formdoc liste_titre">';
|
||||
$out.= '<th align="center" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
$out.= '<span class="hideonsmartphone">'.$langs->trans('Model').' </span>';
|
||||
if (is_array($modellist) && count($modellist) == 1) // If there is only one element
|
||||
{
|
||||
$arraykeys=array_keys($modellist);
|
||||
$modelselected=$arraykeys[0];
|
||||
}
|
||||
$out.= $form->selectarray('model',$modellist,$modelselected,$showempty,0,0);
|
||||
$out.= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', '');
|
||||
$out.= '</th>';
|
||||
}
|
||||
else
|
||||
@ -492,7 +492,7 @@ class FormFile
|
||||
}
|
||||
|
||||
// Language code (if multilang)
|
||||
$out.= '<th align="center" class="formdoc liste_titre">';
|
||||
$out.= '<th align="center" class="formdoc liste_titre maxwidthonsmartphone">';
|
||||
if (($allowgenifempty || (is_array($modellist) && count($modellist) > 0)) && $conf->global->MAIN_MULTILANGS && ! $forcenomultilang && (! empty($modellist) || $showempty))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
@ -508,7 +508,7 @@ class FormFile
|
||||
|
||||
// Button
|
||||
$addcolumforpicto=($delallowed || $printer || $morepicto);
|
||||
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre">';
|
||||
$out.= '<th align="center" colspan="'.($addcolumforpicto?'2':'1').'" class="formdocbutton liste_titre maxwidthonsmartphone">';
|
||||
$genbutton = '<input class="button" id="'.$forname.'_generatebutton" name="'.$forname.'_generatebutton"';
|
||||
$genbutton.= ' type="submit" value="'.$buttonlabel.'"';
|
||||
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist)) $genbutton.= ' disabled="disabled"';
|
||||
|
||||
@ -676,7 +676,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$contactstatic->lastname = $obj->lastname;
|
||||
$contactstatic->firstname = $obj->firstname;
|
||||
$contactstatic->civility_id = $obj->civility_id;
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage));
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
@ -680,7 +680,7 @@ ViewPrivateNote=View notes
|
||||
XMoreLines=%s line(s) hidden
|
||||
PublicUrl=Public URL
|
||||
AddBox=Add box
|
||||
|
||||
SelectElementAndClickRefresh=Select an element and click Refresh
|
||||
# Week day
|
||||
Monday=Monday
|
||||
Tuesday=Tuesday
|
||||
|
||||
@ -2157,7 +2157,7 @@ else
|
||||
|
||||
if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC))
|
||||
{
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
print '<a name="builddoc"></a>'; // ancre
|
||||
|
||||
/*
|
||||
@ -2172,7 +2172,7 @@ else
|
||||
|
||||
$somethingshown=$formfile->show_documents('company',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,28,0,'',0,'',$object->default_lang);
|
||||
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user