예제 #1
0
파일: card.php 프로젝트: Albertopf/prueba
        exit;
    }
    if ($object->authorid > 0) {
        $tmpuser = new User($db);
        $res = $tmpuser->fetch($object->authorid);
        $object->author = $tmpuser;
    }
    if ($object->usermodid > 0) {
        $tmpuser = new User($db);
        $res = $tmpuser->fetch($object->usermodid);
        $object->usermod = $tmpuser;
    }
    /*
     * Show tabs
     */
    $head = actions_prepare_head($object);
    $now = dol_now();
    $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
    // Confirmation suppression action
    if ($action == 'delete') {
        print $form->formconfirm("card.php?id=" . $id, $langs->trans("DeleteAction"), $langs->trans("ConfirmDeleteAction"), "confirm_delete", '', '', 1);
    }
    if ($action == 'edit') {
        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");
예제 #2
0
}
if (!$ret) {
    print '<div class="warning">' . $langs->trans('NoResourceInDatabase') . '</div>';
} else {
    // Confirmation suppression resource line
    if ($action == 'delete_resource') {
        print $form->formconfirm("element_resource.php?element=" . $element . "&element_id=" . $element_id . "&id=" . $id . "&lineid=" . $lineid, $langs->trans("DeleteResource"), $langs->trans("ConfirmDeleteResourceElement"), "confirm_delete_linked_resource", '', '', 1);
    }
    /*
     * Specific to agenda module
     */
    if ($element_id && $element == 'action') {
        require_once DOL_DOCUMENT_ROOT . '/core/lib/agenda.lib.php';
        $act = fetchObjectByElement($element_id, $element);
        if (is_object($act)) {
            $head = actions_prepare_head($act);
            dol_fiche_head($head, 'resources', $langs->trans("Action"), 0, 'action');
            // Affichage fiche action en mode visu
            print '<table class="border" width="100%">';
            $linkback = '<a href="' . DOL_URL_ROOT . '/comm/action/listactions.php">' . $langs->trans("BackToList") . '</a>';
            // Ref
            print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td colspan="3">';
            print $form->showrefnav($act, 'id', $linkback, $user->societe_id ? 0 : 1, 'id', 'ref', '');
            print '</td></tr>';
            // Type
            if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
                print '<tr><td>' . $langs->trans("Type") . '</td><td colspan="3">' . $act->type . '</td></tr>';
            }
            // Title
            print '<tr><td>' . $langs->trans("Title") . '</td><td colspan="3">' . $act->label . '</td></tr>';
            print '</table>';