Ajout fckeditor sur les notes des users
This commit is contained in:
parent
8ce483f2e6
commit
a34cd531d8
@ -445,7 +445,13 @@ if ($user->rights->societe->contact->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">';
|
||||||
if ($contact->user_id) print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$contact->user_id.'">'.$contact->user_login.'</a>';
|
if ($contact->user_id)
|
||||||
|
{
|
||||||
|
$user=new User($db);
|
||||||
|
$user->id=$contact->user_id;
|
||||||
|
$result=$user->fetch();
|
||||||
|
print $user->getLoginUrl(1);
|
||||||
|
}
|
||||||
else print $langs->trans("NoDolibarrAccess");
|
else print $langs->trans("NoDolibarrAccess");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -562,7 +568,13 @@ if ($_GET["id"] && $_GET["action"] != 'edit')
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("DolibarrLogin").'</td><td colspan="3">';
|
||||||
if ($contact->user_id) print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$contact->user_id.'">'.$contact->user_login.'</a>';
|
if ($contact->user_id)
|
||||||
|
{
|
||||||
|
$user=new User($db);
|
||||||
|
$user->id=$contact->user_id;
|
||||||
|
$result=$user->fetch();
|
||||||
|
print $user->getLoginUrl(1);
|
||||||
|
}
|
||||||
else print $langs->trans("NoDolibarrAccess");
|
else print $langs->trans("NoDolibarrAccess");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -578,9 +578,21 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td>';
|
print '<tr><td valign="top">';
|
||||||
print "<textarea name=\"note\" rows=\"6\" cols=\"80\">";
|
print $langs->trans("Note");
|
||||||
print "</textarea></td></tr>\n";
|
print '</td><td>';
|
||||||
|
if ($conf->fckeditor->enabled)
|
||||||
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('note','',180,'dolibarr_notes','',false);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea class="flat" name="note" rows="'.ROWS_4.'" cols="90">';
|
||||||
|
print '</textarea>';
|
||||||
|
}
|
||||||
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Autres caractéristiques issus des autres modules
|
// Autres caractéristiques issus des autres modules
|
||||||
if ($conf->webcal->enabled)
|
if ($conf->webcal->enabled)
|
||||||
@ -714,9 +726,10 @@ else
|
|||||||
{
|
{
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
$rowspan=15;
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
||||||
print '<td width="50%">'.$fuser->nom.'</td>';
|
print '<td width="50%">'.$fuser->nom.'</td>';
|
||||||
print '<td align="center" valign="middle" width="25%" rowspan="14">';
|
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
||||||
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg"))
|
if (file_exists($conf->users->dir_output."/".$fuser->id.".jpg"))
|
||||||
{
|
{
|
||||||
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">';
|
print '<img width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=userphoto&file='.$fuser->id.'.jpg">';
|
||||||
@ -843,8 +856,9 @@ else
|
|||||||
print '<td>'.dolibarr_print_date($fuser->datepreviouslogin,"%d/%m/%Y %H:%M:%S").'</td>';
|
print '<td>'.dolibarr_print_date($fuser->datepreviouslogin,"%d/%m/%Y %H:%M:%S").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Note
|
||||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Note").'</td>';
|
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Note").'</td>';
|
||||||
print '<td>'.nl2br($fuser->note).' </td>';
|
print '<td colspan="2">'.nl2br($fuser->note).' </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Autres caractéristiques issus des autres modules
|
// Autres caractéristiques issus des autres modules
|
||||||
@ -1036,7 +1050,7 @@ else
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
$rowspan=12;
|
$rowspan=11;
|
||||||
|
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
||||||
print '<td width="50%">';
|
print '<td width="50%">';
|
||||||
@ -1176,12 +1190,21 @@ else
|
|||||||
else print $fuser->email;
|
else print $fuser->email;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td valign="top">'.$langs->trans("Note").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="2">';
|
||||||
if ($caneditfield)
|
if ($caneditfield)
|
||||||
{
|
{
|
||||||
print '<textarea class="flat" name="note" rows="'.ROWS_3.'" cols="80">';
|
if ($conf->fckeditor->enabled)
|
||||||
print $fuser->note;
|
{
|
||||||
print '</textarea>';
|
require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php");
|
||||||
|
$doleditor=new DolEditor('note','',180,'dolibarr_notes','',false);
|
||||||
|
$doleditor->Create();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<textarea class="flat" name="note" rows="'.ROWS_4.'" cols="90">';
|
||||||
|
print $fuser->note;
|
||||||
|
print '</textarea>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user