Ejemplo n.º 1
0
            $doleditor = new DolEditor("note-{$key}", $object->multilangs[$key]["note"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80);
            $doleditor->Create();
            print '</td></tr>';
            print '</table>';
        }
    }
    dol_fiche_end();
    print '<div class="center">';
    print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
    print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
    print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
    print '</div>';
    print '</form>';
} else {
    dol_fiche_head($head, 'translation', $titre, 0, $picto);
    dol_banner_tab($object, 'ref', '', $user->societe_id ? 0 : 1, 'ref');
    $cnt_trans = 0;
    if (!empty($object->multilangs)) {
        foreach ($object->multilangs as $key => $value) {
            $cnt_trans++;
            $s = picto_from_langcode($key);
            print "<br>" . ($s ? $s . ' ' : '') . " <b>" . $langs->trans('Language_' . $key) . ":</b> " . '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&langtodelete=' . $key . '">' . img_delete('', '') . "</a><br>";
            print '<table class="border" width="100%">';
            print '<tr><td width="15%">' . $langs->trans('Label') . '</td><td>' . $object->multilangs[$key]["label"] . '</td></tr>';
            print '<tr><td width="15%">' . $langs->trans('Description') . '</td><td>' . $object->multilangs[$key]["description"] . '</td></tr>';
            print '<tr><td width="15%">' . $langs->trans('Note') . '</td><td>' . $object->multilangs[$key]["note"] . '</td></tr>';
            print '</table>';
        }
    }
    if (!$cnt_trans) {
        print '<br>' . $langs->trans('NoTranslation');
Ejemplo n.º 2
0
 require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
 require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
 $langs->load("companies");
 $object = new Societe($db);
 $result = $object->fetch($socid);
 $title = $langs->trans("Agenda");
 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
     $title = $object->name . " - " . $title;
 }
 llxHeader('', $title);
 if (!empty($conf->notification->enabled)) {
     $langs->load("mails");
 }
 $head = societe_prepare_head($object);
 dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"), 0, 'company');
 dol_banner_tab($object, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
 print '<div class="fichecenter">';
 print '<div class="underbanner clearboth"></div>';
 print '<table class="border centpercent">';
 // Alias names (commercial, trademark or alias names)
 print '<tr><td class="titlefield">' . $langs->trans('AliasNames') . '</td><td colspan="3">';
 print $object->name_alias;
 print "</td></tr>";
 if (!empty($conf->global->SOCIETE_USEPREFIX)) {
     print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
 }
 if ($object->client) {
     print '<tr><td>';
     print $langs->trans('CustomerCode') . '</td><td colspan="3">';
     print $object->code_client;
     if ($object->check_codeclient() != 0) {
Ejemplo n.º 3
0
$form = new Form($db);
/*
 * Fiche categorie de client et/ou fournisseur
 */
if ($object->id > 0) {
    require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
    require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
    $langs->load("companies");
    llxHeader("", $langs->trans("Agenda"), '');
    if (!empty($conf->notification->enabled)) {
        $langs->load("mails");
    }
    $head = member_prepare_head($object);
    dol_fiche_head($head, 'agenda', $langs->trans("Member"), 0, 'user');
    $linkback = '<a href="' . DOL_URL_ROOT . '/adherents/list.php">' . $langs->trans("BackToList") . '</a>';
    dol_banner_tab($object, 'rowid', $linkback);
    print '<div class="fichecenter">';
    print '<div class="underbanner clearboth"></div>';
    print '<table class="border centpercent">';
    // Login
    if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
        print '<tr><td class="titlefield">' . $langs->trans("Login") . ' / ' . $langs->trans("Id") . '</td><td class="valeur">' . $object->login . '&nbsp;</td></tr>';
    }
    // Type
    print '<tr><td class="titlefield">' . $langs->trans("Type") . '</td><td class="valeur">' . $adht->getNomUrl(1) . "</td></tr>\n";
    // Morphy
    print '<tr><td>' . $langs->trans("Nature") . '</td><td class="valeur" >' . $object->getmorphylib() . '</td>';
    /*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
    	 print $form->showphoto('memberphoto',$member);
    	print '</td>';*/
    print '</tr>';
Ejemplo n.º 4
0
        } else {
            $db->commit();
        }
    }
}
/******************************************************************************/
/* Affichage fiche                                                            */
/******************************************************************************/
llxHeader();
$form = new Form($db);
if ($id) {
    $head = user_prepare_head($object);
    $title = $langs->trans("User");
    dol_fiche_head($head, 'note', $title, 0, 'user');
    $linkback = '<a href="' . DOL_URL_ROOT . '/user/index.php">' . $langs->trans("BackToList") . '</a>';
    dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
    print '<div class="underbanner clearboth"></div>';
    print "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<table class="border" width="100%">';
    // Login
    print '<tr><td class="titlefield">' . $langs->trans("Login") . '</td><td class="valeur">' . $object->login . '&nbsp;</td></tr>';
    // Note
    print '<tr><td class="tdtop">' . $langs->trans("Note") . '</td>';
    print '<td>';
    if ($action == 'edit' && $user->rights->user->user->creer) {
        print "<input type=\"hidden\" name=\"action\" value=\"update\">";
        print "<input type=\"hidden\" name=\"id\" value=\"" . $object->id . "\">";
        // Editeur wysiwyg
        require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
        $doleditor = new DolEditor('note_private', $object->note, '', 280, 'dolibarr_notes', 'In', true, false, $conf->global->FCKEDITOR_ENABLE_SOCIETE, 10, 80);
Ejemplo n.º 5
0
         print '</table>';
         dol_fiche_end();
     }
 }
 /*
  * Specific to thirdparty module
  */
 if ($element_id && $element == 'societe') {
     $socstatic = fetchObjectByElement($element_id, $element);
     if (is_object($socstatic)) {
         $savobject = $object;
         $object = $socstatic;
         require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
         $head = societe_prepare_head($socstatic);
         dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company');
         dol_banner_tab($socstatic, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
         print '<div class="fichecenter">';
         print '<div class="underbanner clearboth"></div>';
         print '<table class="border" width="100%">';
         // Alias name (commercial, trademark or alias name)
         print '<tr><td class="titelfield">' . $langs->trans('AliasNames') . '</td><td colspan="3">';
         print $socstatic->name_alias;
         print "</td></tr>";
         print '</table>';
         print '</div>';
         dol_fiche_end();
         $object = $savobject;
     }
 }
 //print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
 foreach ($object->available_resources as $modresources => $resources) {
Ejemplo n.º 6
0
     }
     $password = $generated_password;
     // Create a form array
     $formquestion = array(array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password));
     $text = $langs->trans("ConfirmCreateContact") . '<br>';
     if (!empty($conf->societe->enabled)) {
         if ($object->socid > 0) {
             $text .= $langs->trans("UserWillBeExternalUser");
         } else {
             $text .= $langs->trans("UserWillBeInternalUser");
         }
     }
     print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $object->id, $langs->trans("CreateDolibarrLogin"), $text, "confirm_create_user", $formquestion, 'yes');
 }
 $linkback = '<a href="' . DOL_URL_ROOT . '/contact/list.php">' . $langs->trans("BackToList") . '</a>';
 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
 print '<div class="fichecenter">';
 print '<div class="fichehalfleft">';
 print '<div class="underbanner clearboth"></div>';
 print '<table class="border tableforfield" width="100%">';
 // Company
 if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
     print '<tr><td>' . $langs->trans("ThirdParty") . '</td><td>';
     if ($object->socid > 0) {
         $objsoc->fetch($object->socid);
         print $objsoc->getNomUrl(1);
     } else {
         print $langs->trans("ContactNotLinkedToCompany");
     }
     print '</td>';
 }
function _print_tab_header()
{
    global $db, $langs;
    $form = new Form($db);
    $object = new User($db);
    $userId = GETPOST('id');
    $object->fetch($userId);
    if ($dolversion >= 3.9) {
        dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin);
    }
}