Esempio n. 1
0
    }
}
/*
 * View
 */
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
llxHeader('', $langs->trans("Agenda"), $help_url);
if ($action == 'create') {
    $contact = new Contact($db);
    if (GETPOST("contactid")) {
        $result = $contact->fetch(GETPOST("contactid"));
        if ($result < 0) {
            dol_print_error($db, $contact->error);
        }
    }
    dol_set_focus("#label");
    if (!empty($conf->use_javascript_ajax)) {
        print "\n" . '<script type="text/javascript">';
        print '$(document).ready(function () {
        			function setdatefields()
	            	{
	            		if ($("#fullday:checked").val() == null) {
	            			$(".fulldaystarthour").removeAttr("disabled");
	            			$(".fulldaystartmin").removeAttr("disabled");
	            			$(".fulldayendhour").removeAttr("disabled");
	            			$(".fulldayendmin").removeAttr("disabled");
	            			$("#p2").removeAttr("disabled");
	            		} else {
							$(".fulldaystarthour").prop("disabled", true).val("00");
							$(".fulldaystartmin").prop("disabled", true).val("00");
							$(".fulldayendhour").prop("disabled", true).val("23");
Esempio n. 2
0
       	print '</form>';

       	print "\n<!-- Form liste LDAP fin -->\n\n";
       	print '<br>';
    }


    print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="createuser">';
    print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
    print '<input type="hidden" name="action" value="add">';
    if (! empty($ldap_sid)) print '<input type="hidden" name="ldap_sid" value="'.dol_escape_htmltag($ldap_sid).'">';
    print '<input type="hidden" name="entity" value="'.$conf->entity.'">';

    dol_fiche_head('', '', '', 0, '');

    print dol_set_focus('#lastname');

    print '<table class="border" width="100%">';

    print '<tr>';

    // Lastname
    print '<td class="titlefield"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>';
    print '<td>';
    if (! empty($ldap_lastname))
    {
        print '<input type="hidden" id="lastname" name="lastname" value="'.$ldap_lastname.'">';
        print $ldap_lastname;
    }
    else
    {
        }
        header("Location: " . DOL_URL_ROOT . '/categories/viewcat.php?id=' . $result . '&type=' . $type);
        exit;
    }
}
/*
 * View
 */
$form = new Form($db);
llxHeader("", "", $langs->trans("Categories"));
if ($user->rights->categorie->creer) {
    /*
     * Fiche en mode creation
     */
    if ($action == 'create' || $_POST["addcat"] == 'addcat') {
        dol_set_focus('#label');
        print '<form action="' . $_SERVER['PHP_SELF'] . '?type=' . $type . '" method="POST">';
        print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
        print '<input type="hidden" name="urlfrom" value="' . $urlfrom . '">';
        print '<input type="hidden" name="action" value="add">';
        print '<input type="hidden" name="addcat" value="addcat">';
        print '<input type="hidden" name="id" value="' . GETPOST('origin') . '">';
        print '<input type="hidden" name="type" value="' . $type . '">';
        if ($origin) {
            print '<input type="hidden" name="origin" value="' . $origin . '">';
        }
        if ($catorigin) {
            print '<input type="hidden" name="catorigin" value="' . $catorigin . '">';
        }
        print_fiche_titre($langs->trans("CreateCat"));
        dol_htmloutput_errors('', $errors);
Esempio n. 4
0
            $db->rollback();
        }
    } else {
        $langs->load("errors");
        setEventMessages($langs->trans('ErrorForbidden'), null, 'mesgs');
    }
}
/*
 * View
 */
llxHeader('', $langs->trans("GroupCard"));
$form = new Form($db);
$fuserstatic = new User($db);
if ($action == 'create') {
    print load_fiche_titre($langs->trans("NewGroup"));
    print dol_set_focus('#nom');
    print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="add">';
    dol_fiche_head('', '', '', 0, '');
    print '<table class="border" width="100%">';
    print "<tr>";
    print '<td class="fieldrequired" width="15%">' . $langs->trans("Name") . '</td>';
    print '<td class="valeur"><input size="30" type="text" id="nom" name="nom" value=""></td></tr>';
    // Multicompany
    if (!empty($conf->multicompany->enabled) && is_object($mc)) {
        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($conf->entity);
            print "</td></tr>\n";
        } else {