Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into fgd
This commit is contained in:
commit
45f2347be3
@ -7,6 +7,7 @@ For users:
|
||||
- New: Some performance enhancements.
|
||||
- New: Can attach files onto trip and expenses modules.
|
||||
- New: Add option MAIN_PDF_TITLE_BACKGROUND_COLOR
|
||||
- New: Can define a hierarchical responsible on user
|
||||
|
||||
For developers:
|
||||
- System of menu managers has been rewritten to reduce code to do same things.
|
||||
|
||||
@ -941,7 +941,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
print '<div id="dayevent_'.sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day).'" class="dayevent">'."\n";
|
||||
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<tr style="background: #EEEEEE"><td align="left" nowrap="nowrap">';
|
||||
print '<tr><td align="left" nowrap="nowrap">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?';
|
||||
print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
||||
print $newparam;
|
||||
@ -960,7 +960,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
print '</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print '<tr height="'.$minheight.'"><td valign="top" colspan="2" nowrap="nowrap">';
|
||||
print '<tr height="'.$minheight.'"><td valign="top" colspan="2" nowrap="nowrap" style="padding-bottom: 2px;">';
|
||||
|
||||
//$curtime = dol_mktime (0, 0, 0, $month, $day, $year);
|
||||
$i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array();
|
||||
@ -1004,8 +1004,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
|
||||
// Show rect of event
|
||||
print '<div id="event_'.$ymd.'_'.$i.'" class="event '.$cssclass.'">';
|
||||
print '<table class="cal_event" style="background: #'.$color.'; -moz-border-radius:4px;" width="100%"><tr>';
|
||||
print '<td nowrap="nowrap">';
|
||||
print '<ul class="cal_event"><li class="cal_event">';
|
||||
print '<table class="cal_event" style="background: #'.$color.'; -moz-border-radius:4px; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,2).')); " width="100%"><tr>';
|
||||
print '<td nowrap="nowrap" class="cal_event">';
|
||||
if ($event->type_code == 'BIRTHDAY') // It's a birthday
|
||||
{
|
||||
print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact');
|
||||
@ -1130,6 +1131,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') print $event->getLibStatut(3,1);
|
||||
else print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</li></ul>';
|
||||
print '</div>';
|
||||
$i++;
|
||||
}
|
||||
@ -1174,4 +1176,13 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
function dol_color_minus($color, $minus)
|
||||
{
|
||||
$newcolor=$color;
|
||||
$newcolor[0]=((hexdec($newcolor[0])-$minus)<0)?0:dechex((hexdec($newcolor[0])-$minus));
|
||||
$newcolor[2]=((hexdec($newcolor[2])-$minus)<0)?0:dechex((hexdec($newcolor[2])-$minus));
|
||||
$newcolor[4]=((hexdec($newcolor[4])-$minus)<0)?0:dechex((hexdec($newcolor[4])-$minus));
|
||||
return $newcolor;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -386,29 +386,32 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Level of prospect
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans('ProspectLevelShort');
|
||||
print '<td>';
|
||||
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editlevel')
|
||||
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
||||
else
|
||||
print $object->getLibProspLevel();
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
||||
print '<td>';
|
||||
if ($object->stcomm_id != -1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
||||
if ($object->stcomm_id != 0) print '<a href="fiche.php?socid='.$object->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
||||
if ($object->stcomm_id != 1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=1&action=cstc">'.img_action(0,1).'</a>';
|
||||
if ($object->stcomm_id != 2) print '<a href="fiche.php?socid='.$object->id.'&stcomm=2&action=cstc">'.img_action(0,2).'</a>';
|
||||
if ($object->stcomm_id != 3) print '<a href="fiche.php?socid='.$object->id.'&stcomm=3&action=cstc">'.img_action(0,3).'</a>';
|
||||
print '</td></tr>';
|
||||
if ($object->client == 2 || $object->client == 3)
|
||||
{
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
print $langs->trans('ProspectLevel');
|
||||
print '<td>';
|
||||
if ($action != 'editlevel' && $user->rights->societe->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editlevel&socid='.$object->id.'">'.img_edit($langs->trans('Modify'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editlevel')
|
||||
$formcompany->form_prospect_level($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->fk_prospectlevel,'prospect_level_id',1);
|
||||
else
|
||||
print $object->getLibProspLevel();
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Status
|
||||
print '<tr><td>'.$langs->trans("StatusProsp").'</td><td colspan="2">'.$object->getLibProspCommStatut(4).'</td>';
|
||||
print '<td>';
|
||||
if ($object->stcomm_id != -1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=-1&action=cstc">'.img_action(0,-1).'</a>';
|
||||
if ($object->stcomm_id != 0) print '<a href="fiche.php?socid='.$object->id.'&stcomm=0&action=cstc">'.img_action(0,0).'</a>';
|
||||
if ($object->stcomm_id != 1) print '<a href="fiche.php?socid='.$object->id.'&stcomm=1&action=cstc">'.img_action(0,1).'</a>';
|
||||
if ($object->stcomm_id != 2) print '<a href="fiche.php?socid='.$object->id.'&stcomm=2&action=cstc">'.img_action(0,2).'</a>';
|
||||
if ($object->stcomm_id != 3) print '<a href="fiche.php?socid='.$object->id.'&stcomm=3&action=cstc">'.img_action(0,3).'</a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Sales representative
|
||||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
||||
|
||||
@ -994,7 +994,7 @@ class Form
|
||||
global $conf,$user,$langs;
|
||||
|
||||
// If no preselected user defined, we take current user
|
||||
if ($selected < -1 && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id;
|
||||
if ((is_numeric($selected) && ($selected < -1 || empty($selected))) && empty($conf->global->SOCIETE_DISABLE_DEFAULT_SALESREPRESENTATIVE)) $selected=$user->id;
|
||||
|
||||
// Permettre l'exclusion d'utilisateurs
|
||||
if (is_array($exclude)) $excludeUsers = implode("','",$exclude);
|
||||
@ -1043,7 +1043,7 @@ class Form
|
||||
if ($num)
|
||||
{
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').'>';
|
||||
if ($show_empty) $out.= '<option value="-1"'.($selected==-1?' selected="selected"':'').'> </option>'."\n";
|
||||
if ($show_empty) $out.= '<option value="-1"'.((empty($selected) || $selected==-1)?' selected="selected"':'').'> </option>'."\n";
|
||||
|
||||
$userstatic=new User($this->db);
|
||||
|
||||
|
||||
@ -45,7 +45,9 @@ function societe_prepare_head($object)
|
||||
if ($object->client==1 || $object->client==2 || $object->client==3 || (isset($object->object) && $object->object->client==1) || (isset($object->object) && $object->object->client==3))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Customer");
|
||||
if ($object->client==2 || $object->client==3) $head[$h][1] = $langs->trans("Prospect");
|
||||
if ($object->client==3) $head[$h][1] .= '/';
|
||||
if ($object->client==1 || $object->client==3) $head[$h][1] .= $langs->trans("Customer");
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
{
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
$resarray=array(
|
||||
'object_id'=>$object->id,
|
||||
'object_ref'=>$object->ref,
|
||||
'object_ref_ext'=>$object->ref_ext,
|
||||
@ -120,6 +120,15 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
'object_note_private'=>$object->note,
|
||||
'object_note'=>$object->note_public,
|
||||
);
|
||||
|
||||
// Add vat by rates
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
if (empty($resarray['object_total_vat_'.$line->tva_tx])) $resarray['object_total_vat_'.$line->tva_tx]=0;
|
||||
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
}
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -105,7 +105,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$sumpayed = $object->getSommePaiement();
|
||||
$alreadypayed=price($sumpayed,0,$outputlangs);
|
||||
|
||||
return array(
|
||||
$resarray=array(
|
||||
'object_id'=>$object->id,
|
||||
'object_ref'=>$object->ref,
|
||||
'object_ref_ext'=>$object->ref_ext,
|
||||
@ -132,6 +132,15 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
'object_already_payed'=>$alreadypayed,
|
||||
'object_remain_to_pay'=>price($object->total_ttc - $sumpayed,0,$outputlangs)
|
||||
);
|
||||
|
||||
// Add vat by rates
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
if (empty($resarray['object_total_vat_'.$line->tva_tx])) $resarray['object_total_vat_'.$line->tva_tx]=0;
|
||||
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
}
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -97,7 +97,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
{
|
||||
global $conf;
|
||||
|
||||
return array(
|
||||
$resarray=array(
|
||||
'object_id'=>$object->id,
|
||||
'object_ref'=>$object->ref,
|
||||
'object_ref_ext'=>$object->ref_ext,
|
||||
@ -119,6 +119,15 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
'object_note_private'=>$object->note,
|
||||
'object_note'=>$object->note_public,
|
||||
);
|
||||
|
||||
// Add vat by rates
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
if (empty($resarray['object_total_vat_'.$line->tva_tx])) $resarray['object_total_vat_'.$line->tva_tx]=0;
|
||||
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
}
|
||||
|
||||
return $resarray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -113,4 +113,5 @@ NameToCreate=Name of third party to create
|
||||
YourRole=Your roles
|
||||
YourQuotaOfUsersIsReached=Your quota of active users is reached !
|
||||
NbOfUsers=Nb of users
|
||||
DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin
|
||||
DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin
|
||||
HierarchicalResponsible=Hierarchical responsible
|
||||
@ -113,4 +113,5 @@ NameToCreate=Nom du tiers à créer
|
||||
YourRole=Vos rôles
|
||||
YourQuotaOfUsersIsReached=Votre quota d'utilisateurs actifs est atteint !
|
||||
NbOfUsers=Nb d'utilisateurs
|
||||
DontDowngradeSuperAdmin=Seul un superadmin peut rétrograder un superadmin
|
||||
DontDowngradeSuperAdmin=Seul un superadmin peut rétrograder un superadmin
|
||||
HierarchicalResponsible=Responsable hierarchique
|
||||
@ -1168,7 +1168,7 @@ div.error {
|
||||
|
||||
.product_line_stock_ok { color: #002200; }
|
||||
.product_line_stock_too_low { color: #664400; }
|
||||
|
||||
|
||||
.fieldrequired {
|
||||
font-weight:bold;
|
||||
color:#333333;
|
||||
@ -1469,6 +1469,9 @@ table.cal_event {
|
||||
margin-bottom:1px;
|
||||
}
|
||||
|
||||
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; -webkit-padding-start: 2px !important; }
|
||||
li.cal_event { border: none; list-style-type: none; }
|
||||
|
||||
.cal_event a:link {
|
||||
color:#232323;
|
||||
font-size:11px;
|
||||
|
||||
@ -2059,12 +2059,19 @@ td.hidden {
|
||||
.cal_current_month { background: #FFFFFF; border: solid 1px #C0C0C0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||
.cal_past { }
|
||||
table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; }
|
||||
table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
||||
table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d));
|
||||
}
|
||||
table.cal_event td { border: none; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
||||
ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; -webkit-padding-start: 2px !important; }
|
||||
li.cal_event { border: none; list-style-type: none; }
|
||||
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:visited { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:active { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; color:rgba(255,255,255,.75); }
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -1140,6 +1140,7 @@ class User extends CommonObject
|
||||
$sql.= ", note = '".$this->db->escape($this->note)."'";
|
||||
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
|
||||
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
|
||||
$sql.= ", fk_user = ".($this->fk_user > 0?"'".$this->db->escape($this->fk_user)."'":"null");
|
||||
$sql.= ", entity = '".$this->entity."'";
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
|
||||
@ -196,11 +196,6 @@ if ($action == 'add' && $canadduser)
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME external module
|
||||
$object->webcal_login = $_POST["webcal_login"];
|
||||
$object->phenix_login = $_POST["phenix_login"];
|
||||
$object->phenix_pass = $_POST["phenix_pass"];
|
||||
|
||||
// If multicompany is off, admin users must all be on entity 0.
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
@ -332,6 +327,7 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
$object->job = GETPOST("job");
|
||||
$object->signature = GETPOST("signature");
|
||||
$object->openid = GETPOST("openid");
|
||||
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
|
||||
|
||||
// Get extra fields
|
||||
foreach($_POST as $key => $value)
|
||||
@ -342,11 +338,6 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME external module
|
||||
$object->webcal_login = $_POST["webcal_login"];
|
||||
$object->phenix_login = $_POST["phenix_login"];
|
||||
$object->phenix_pass = $_POST["phenix_pass"];
|
||||
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
if (! empty($_POST["superadmin"]))
|
||||
@ -936,23 +927,6 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
}
|
||||
}
|
||||
|
||||
// Module Webcalendar
|
||||
// TODO external module
|
||||
if (! empty($conf->webcalendar->enabled))
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
||||
print '<td><input size="30" type="text" name="webcal_login" value="'.$_POST["webcal_login"].'"></td></tr>';
|
||||
}
|
||||
|
||||
// Module Phenix
|
||||
// TODO external module
|
||||
if (! empty($conf->phenix->enabled))
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginPenix").'</td>';
|
||||
print '<td><input size="30" type="text" name="phenix_login" value="'.$_POST["phenix_login"].'"></td></tr>';
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("PassPenix").'</td>';
|
||||
print '<td><input size="30" type="text" name="phenix_pass" value="'.$_POST["phenix_pass"].'"></td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '<center><br><input class="button" value="'.$langs->trans("CreateUser").'" name="create" type="submit"></center>';
|
||||
@ -1076,6 +1050,8 @@ else
|
||||
*/
|
||||
if ($action != 'edit')
|
||||
{
|
||||
$rowspan=16;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
@ -1085,13 +1061,9 @@ else
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
$rowspan=15;
|
||||
if (isset($conf->authmode) && preg_match('/myopenid/',$conf->authmode)) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
if (! empty($conf->adherent->enabled)) $rowspan++;
|
||||
if (! empty($conf->webcalendar->enabled)) $rowspan++; // TODO external module
|
||||
if (! empty($conf->phenix->enabled)) $rowspan+=2; // TODO external module
|
||||
|
||||
|
||||
// Lastname
|
||||
print '<tr><td valign="top">'.$langs->trans("Lastname").'</td>';
|
||||
@ -1176,22 +1148,6 @@ else
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
if ($object->admin && ! $object->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($object->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td valign="top">'.$langs->trans("Type").'</td><td>';
|
||||
$type=$langs->trans("Internal");
|
||||
@ -1200,7 +1156,7 @@ else
|
||||
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// ldap sid
|
||||
// Ldap sid
|
||||
if ($object->ldap_sid)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Type").'</td><td>';
|
||||
@ -1232,7 +1188,19 @@ else
|
||||
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td>';
|
||||
print dol_textishtml($object->signature)?$object->signature:dol_nl2br($object->signature,1,false);
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
// Hierarchy
|
||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td>';
|
||||
if (empty($object->fk_user)) print $langs->trans("None");
|
||||
else {
|
||||
$huser=new User($db);
|
||||
$huser->fetch($object->fk_user);
|
||||
print $huser->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Statut
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
@ -1255,30 +1223,7 @@ else
|
||||
print '<td>'.$object->openid.'</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Module Webcalendar
|
||||
// TODO external module
|
||||
if (! empty($conf->webcalendar->enabled))
|
||||
{
|
||||
$langs->load("other");
|
||||
print '<tr><td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
||||
print '<td>'.$object->webcal_login.' </td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
// Module Phenix
|
||||
// TODO external module
|
||||
if (! empty($conf->phenix->enabled))
|
||||
{
|
||||
$langs->load("other");
|
||||
print '<tr><td valign="top">'.$langs->trans("LoginPhenix").'</td>';
|
||||
print '<td>'.$object->phenix_login.' </td>';
|
||||
print "</tr>\n";
|
||||
print '<tr><td valign="top">'.$langs->trans("PassPhenix").'</td>';
|
||||
print '<td>'.preg_replace('/./i','*',$object->phenix_pass_crypted).' </td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
|
||||
// Company / Contact
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
@ -1327,6 +1272,22 @@ else
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||
if ($object->admin && ! $object->entity)
|
||||
{
|
||||
print $langs->trans("AllEntities");
|
||||
}
|
||||
else
|
||||
{
|
||||
$mc->getInfo($object->entity);
|
||||
print $mc->label;
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="2"');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -1565,18 +1526,16 @@ else
|
||||
|
||||
if ($action == 'edit' && ($canedituser || ($user->id == $object->id)))
|
||||
{
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST" name="updateuser" enctype="multipart/form-data">';
|
||||
$rowspan=14;
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST" name="updateuser" enctype="multipart/form-data">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="entity" value="'.$object->entity.'">';
|
||||
print '<table width="100%" class="border">';
|
||||
|
||||
$rowspan=13;
|
||||
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
if (! empty($conf->adherent->enabled)) $rowspan++;
|
||||
if (! empty($conf->webcalendar->enabled)) $rowspan++; // TODO external module
|
||||
if (! empty($conf->phenix->enabled)) $rowspan+=2; // TODO external module
|
||||
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
@ -1748,21 +1707,6 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($object->entity);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||
}
|
||||
}
|
||||
|
||||
// Type
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Type").'</td>';
|
||||
print '<td>';
|
||||
@ -1843,7 +1787,7 @@ else
|
||||
print '<td>';
|
||||
print '<textarea name="signature" rows="5" cols="90">'.dol_htmlentitiesbr_decode($object->signature).'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// openid
|
||||
if (isset($conf->authmode) && preg_match('/myopenid/',$conf->authmode))
|
||||
{
|
||||
@ -1861,41 +1805,34 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Hierarchy
|
||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||
print '<td>';
|
||||
print $form->select_dolusers($object->fk_user,'fk_user',1,array($object->id));
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Statut
|
||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td></tr>';
|
||||
|
||||
// Module Webcalendar
|
||||
// TODO external module
|
||||
if (! empty($conf->webcalendar->enabled))
|
||||
{
|
||||
$langs->load("other");
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginWebcal").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield) print '<input size="30" type="text" class="flat" name="webcal_login" value="'.$object->webcal_login.'">';
|
||||
else print $object->webcal_login;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Module Phenix
|
||||
// TODO external module
|
||||
if (! empty($conf->phenix->enabled))
|
||||
{
|
||||
$langs->load("other");
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("LoginPhenix").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield) print '<input size="30" type="text" class="flat" name="phenix_login" value="'.$object->phenix_login.'">';
|
||||
else print $object->phenix_login;
|
||||
print '</td></tr>';
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("PassPhenix").'</td>';
|
||||
print '<td>';
|
||||
if ($caneditfield) print '<input size="30" type="password" class="flat" name="phenix_pass" value="'.$object->phenix_pass_crypted.'">';
|
||||
else print preg_replace('/./i','*',$object->phenix_pass_crypted);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Multicompany
|
||||
if (! empty($conf->multicompany->enabled))
|
||||
{
|
||||
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||
{
|
||||
print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>';
|
||||
print "<td>".$mc->select_entities($object->entity);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||
}
|
||||
}
|
||||
|
||||
// Company / Contact
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user