(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
Author: OpenEyes (info@openeyes.org.uk)
Inheritance: extends BaseFieldWidget
示例#1
0
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     $linktoelem = $form->showLinkToObjectBlock($object, array('order'));
     if ($linktoelem) {
         print '<br>' . $linktoelem;
     }
     // Link for paypal payment
     if (!empty($conf->paypal->enabled) && $object->statut != 0) {
         include_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
         print showPaypalPaymentUrl('invoice', $object->ref);
     }
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'invoice', $socid);
     print '</div></div></div>';
 } else {
     /*
      * Action presend (or prerelance)
      */
     $object->fetch_projet();
     // By default if $action=='presend'
     $titreform = 'SendBillByMail';
     $topicmail = 'SendBillRef';
     $modelmail = 'facture_send';
     if ($action == 'prerelance') {
         $titrefrom = 'SendReminderBillByMail';
         $topicmail = 'SendReminderBillRef';
         $modelmail = 'facture_relance';
示例#2
0
    print "<br>\n";
    if ($action != 'presend') {
        print '<div class="fichecenter"><div class="fichehalfleft">';
        print '<a name="builddoc"></a>';
        // ancre
        /*
         * Documents generes
         */
        $filename = dol_sanitizeFileName($object->ref);
        $filedir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
        $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
        $genallowed = $user->rights->projet->lire && $userAccess > 0;
        $delallowed = $user->rights->projet->creer && $userWrite > 0;
        $var = true;
        $somethingshown = $formfile->show_documents('project', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf);
        print '</div></div class="fichehalfright">';
        if (!empty($object->id)) {
            // List of actions on element
            include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
            $formactions = new FormActions($db);
            $somethingshown = $formactions->showactions($object, 'project', $socid);
        }
        print '</div>';
    }
    // Hook to add more things on page
    $parameters = array();
    $reshook = $hookmanager->executeHooks('mainCardTabAddMore', $parameters, $object, $action);
    // Note that $action and $object may have been modified by hook
}
llxFooter();
$db->close();
示例#3
0
文件: card.php 项目: Albertopf/prueba
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id');
if ($user->societe_id && $socid) {
    $result = restrictedArea($user, 'societe', $socid);
}
$error = GETPOST("error");
$donotclearsession = GETPOST('donotclearsession') ? GETPOST('donotclearsession') : 0;
$cactioncomm = new CActionComm($db);
$object = new ActionComm($db);
$contact = new Contact($db);
$extrafields = new ExtraFields($db);
$formfile = new FormFile($db);
$form = new Form($db);
$formfile = new FormFile($db);
$formactions = new FormActions($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
//var_dump($_POST);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('actioncard', 'globalcard'));
/*
 * Actions
 */
$listUserAssignedUpdated = false;
// Remove user to assigned list
if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') {
    $idtoremove = GETPOST('removedassigned');
    if (!empty($_SESSION['assignedtouser'])) {
        $tmpassigneduserids = json_decode($_SESSION['assignedtouser'], 1);
    } else {
示例#4
0
/**
 * Show filter form in agenda view
 *
 * @param	Object	$form			Form object
 * @param	int		$canedit		Can edit filter fields
 * @param	int		$status			Status
 * @param 	int		$year			Year
 * @param 	int		$month			Month
 * @param 	int		$day			Day
 * @param 	int		$showbirthday	Show birthday
 * @param 	string	$filtera		Filter on create by user
 * @param 	string	$filtert		Filter on assigned to user
 * @param 	string	$filterd		Filter of done by user
 * @param 	int		$pid			Product id
 * @param 	int		$socid			Third party id
 * @param	string	$action			Action string
 * @param	array	$showextcals	Array with list of external calendars (used to show links to select calendar), or -1 to show no legend
 * @param	string	$actioncode		Preselected value of actioncode for filter on type
 * @param	int		$usergroupid	Id of group to filter on users
 * @return	void
 */
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals = array(), $actioncode = '', $usergroupid = '')
{
    global $conf, $user, $langs, $db, $hookmanager;
    global $begin_h, $end_h, $begin_d, $end_d;
    $langs->load("companies");
    // Filters
    print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="year" value="' . $year . '">';
    print '<input type="hidden" name="month" value="' . $month . '">';
    print '<input type="hidden" name="day" value="' . $day . '">';
    print '<input type="hidden" name="action" value="' . $action . '">';
    print '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
    print '<div class="fichecenter">';
    if (!empty($conf->browser->phone)) {
        print '<div class="fichehalfleft">';
    } else {
        print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
    }
    print '<table class="nobordernopadding">';
    if ($canedit) {
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("ActionsToDoBy") . ' &nbsp; ';
        print '</td><td class="nowrap maxwidthonsmartphone">';
        print $form->select_dolusers($filtert, 'usertodo', 1, '', !$canedit);
        if (empty($conf->dol_optimize_smallscreen)) {
            print ' &nbsp; ' . $langs->trans("or") . ' ' . $langs->trans("Group") . ' &nbsp; ';
        }
        print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit);
        print '</td></tr>';
        include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
        $formactions = new FormActions($db);
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("Type");
        print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        print $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0);
        print '</td></tr>';
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("Status");
        print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        $formactions->form_select_status_action('formaction', $status, 1, 'status', 1, 2);
        print '</td></tr>';
    }
    if (!empty($conf->societe->enabled) && $user->rights->societe->lire) {
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("ThirdParty") . ' &nbsp; ';
        print '</td><td class="nowrap maxwidthonsmartphone">';
        print $form->select_thirdparty($socid, 'socid');
        print '</td></tr>';
    }
    if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
        require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
        $formproject = new FormProjets($db);
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("Project") . ' &nbsp; ';
        print '</td><td class="nowrap maxwidthonsmartphone">';
        $formproject->select_projects($socid ? $socid : -1, $pid, 'projectid');
        print '</td></tr>';
    }
    if ($canedit && $action == 'show_peruser') {
        // Filter on hours
        print '<tr>';
        print '<td class="nowrap">' . $langs->trans("WorkingTimeRange") . '</td>';
        print "<td class='nowrap maxwidthonsmartphone'>";
        print '<input type="number" class="short" name="begin_h" value="' . $begin_h . '" min="0" max="23">';
        if (empty($conf->dol_use_jmobile)) {
            print ' - ';
        }
        print '<input type="number" class="short" name="end_h" value="' . $end_h . '" min="1" max="24">';
        if (empty($conf->dol_use_jmobile)) {
            print ' ' . $langs->trans("H");
        }
        print '</td></tr>';
        // Filter on days
        print '<tr>';
        print '<td class="nowrap">' . $langs->trans("WorkingDaysRange") . '</td>';
        print "<td class='nowrap maxwidthonsmartphone'>";
        print '<input type="number" class="short" name="begin_d" value="' . $begin_d . '" min="1" max="7">';
        if (empty($conf->dol_use_jmobile)) {
            print ' - ';
        }
        print '<input type="number" class="short" name="end_d" value="' . $end_d . '" min="1" max="7">';
        print '</td></tr>';
    }
    // Hooks
    $parameters = array('canedit' => $canedit, 'pid' => $pid, 'socid' => $socid);
    $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action);
    // Note that $action and $object may have been
    print '</table>';
    if (!empty($conf->browser->phone)) {
        print '</div>';
    } else {
        print '</td>';
    }
    if (!empty($conf->browser->phone)) {
        print '<div class="fichehalfright">';
    } else {
        print '<td align="center" valign="middle" class="nowrap">';
    }
    print '<table><tr><td align="center">';
    print '<div class="formleftzone">';
    print '<input type="submit" class="button" style="min-width:120px" name="refresh" value="' . $langs->trans("Refresh") . '">';
    print '</div>';
    print '</td></tr>';
    print '</table>';
    if (!empty($conf->browser->phone)) {
        print '</div>';
    } else {
        print '</td></tr></table>';
    }
    print '</div>';
    // Close fichecenter
    print '<div style="clear:both"></div>';
    print '</form>';
}
示例#5
0
     print '<div class="fichecenter"><div class="fichehalfleft">';
     $objectref = dol_sanitizeFileName($object->ref);
     $filedir = $conf->expedition->dir_output . "/sending/" . $objectref;
     $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
     $genallowed = $user->rights->expedition->lire;
     $delallowed = $user->rights->expedition->supprimer;
     $somethingshown = $formfile->show_documents('expedition', $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     //$linktoelem = $form->showLinkToObjectBlock($object);
     //if ($linktoelem) print '<br>'.$linktoelem;
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'shipping', $socid);
     print '</div></div></div>';
 }
 /*
  * Action presend
  */
 //Select mail models is same action as presend
 if (GETPOST('modelselected')) {
     $action = 'presend';
 }
 if ($action == 'presend') {
     $ref = dol_sanitizeFileName($object->ref);
     include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
     $fileparams = dol_most_recent_file($conf->expedition->dir_output . '/sending/' . $ref, preg_quote($ref, '/') . '[^\\-]+');
     $file = $fileparams['fullname'];
示例#6
0
     $genallowed = $user->rights->ficheinter->creer;
     $delallowed = $user->rights->ficheinter->supprimer;
     $genallowed = 1;
     $delallowed = 1;
     $var = true;
     //print "<br>\n";
     $somethingshown = $formfile->show_documents('ficheinter', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang);
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     //$linktoelem = $form->showLinkToObjectBlock($object);
     //if ($linktoelem) print '<br>'.$linktoelem;
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'fichinter', $socid);
     print '</div></div></div>';
 }
 /*
  * Action presend
  */
 if (GETPOST('modelselected')) {
     $action = 'presend';
 }
 if ($action == 'presend') {
     $ref = dol_sanitizeFileName($object->ref);
     include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
     $fileparams = dol_most_recent_file($conf->ficheinter->dir_output . '/' . $ref, preg_quote($ref, '/') . '[^\\-]+');
     $file = $fileparams['fullname'];
     // Define output language
示例#7
0
     $comref = dol_sanitizeFileName($object->ref);
     $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf';
     $relativepath = $comref . '/' . $comref . '.pdf';
     $filedir = $conf->commande->dir_output . '/' . $comref;
     $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
     $genallowed = $user->rights->commande->creer;
     $delallowed = $user->rights->commande->supprimer;
     $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, $object->hooks);
     /*
      * Linked object block
      */
     $somethingshown = $object->showLinkedObjectBlock();
     print '</td><td valign="top" width="50%">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'order', $socid);
     print '</td></tr></table>';
 }
 /*
  * Action presend
  *
  */
 if ($action == 'presend') {
     $ref = dol_sanitizeFileName($object->ref);
     $file = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
     print '<br>';
     print_titre($langs->trans('SendOrderByMail'));
     // Cree l'objet formulaire mail
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
     $formmail = new FormMail($db);
        setEventMessage($object->error, 'errors');
        setEventMessage($object->errors, 'errors');
    } else {
        if (!empty($backtopage)) {
            header("Location: " . $backtopage);
            exit;
        }
    }
}
/*
 * View
 */
$help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
llxHeader('', $langs->trans("Agenda"), $help_url);
$form = new Form($db);
$htmlactions = new FormActions($db);
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) {
示例#9
0
    if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
        Header("Location: " . $_SERVER["PHP_SELF"]);
        exit;
    } else {
        dol_print_error($db);
    }
}
if ($action == 'set') {
    dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity);
    dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
    dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
}
/**
 * View
 */
$formactions = new FormActions($db);
llxHeader();
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans("AgendaSetup"), $linkback, 'title_setup');
print "<br>\n";
print '<form action="' . $_SERVER["PHP_SELF"] . '" name="agenda">';
print '<input type="hidden" name="action" value="set">';
$head = agenda_prepare_head();
dol_fiche_head($head, 'other', $langs->trans("Agenda"), 0, 'action');
$var = true;
print '<table class="noborder allwidth">' . "\n";
print '<tr class="liste_titre">' . "\n";
print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
print '<td align="center">&nbsp;</td>' . "\n";
print '<td align="right">' . $langs->trans("Value") . '</td>' . "\n";
print '</tr>' . "\n";
示例#10
0
            header("Location: ".$_POST["backtopage"]);
            exit;
        }
	}
}


/*
 * View
 */

$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
llxHeader('',$langs->trans("Agenda"),$help_url);

$html = new Form($db);
$htmlactions = new FormActions($db);


if ($action == 'create')
{
	$contact = new Contact($db);

	if (GETPOST("contactid"))
	{
		$result=$contact->fetch(GETPOST("contactid"));
		if ($result < 0) dol_print_error($db,$contact->error);
	}

    if ($conf->use_javascript_ajax)
    {
        print "\n".'<script type="text/javascript" language="javascript">';
/**
 * Show filter form in agenda view
 *
 * @param	Object	$form			Form object
 * @param	int		$canedit		Can edit filter fields
 * @param	int		$status			Status
 * @param 	int		$year			Year
 * @param 	int		$month			Month
 * @param 	int		$day			Day
 * @param 	int		$showbirthday	Show birthday
 * @param 	string	$filtera		Filter on create by user
 * @param 	string	$filtert		Filter on assigned to user
 * @param 	string	$filterd		Filter of done by user
 * @param 	int		$pid			Product id
 * @param 	int		$socid			Third party id
 * @param	array	$showextcals	Array with list of external calendars (used to show links to select calendar), or -1 to show no legend
 * @param	string	$actioncode		Preselected value of actioncode for filter on type
 * @return	void
 */
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $showextcals = array(), $actioncode = '')
{
    global $conf, $user, $langs, $db;
    // Filters
    print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="status" value="' . $status . '">';
    print '<input type="hidden" name="year" value="' . $year . '">';
    print '<input type="hidden" name="month" value="' . $month . '">';
    print '<input type="hidden" name="day" value="' . $day . '">';
    print '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
    print '<table class="nobordernopadding" width="100%">';
    print '<tr><td class="nowrap">';
    print '<table class="nobordernopadding">';
    if ($canedit) {
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("ActionsAskedBy");
        print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        print $form->select_dolusers($filtera, 'userasked', 1, '', !$canedit);
        print '</td>';
        print '</tr>';
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("or") . ' ' . $langs->trans("ActionsToDoBy");
        print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        print $form->select_dolusers($filtert, 'usertodo', 1, '', !$canedit);
        print '</td></tr>';
        /*print '<tr>';
        		print '<td class="nowrap">';
        		print $langs->trans("or") . ' ' . $langs->trans("ActionsDoneBy");
        		print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        		print $form->select_dolusers($filterd, 'userdone', 1, '', ! $canedit);
        		print '</td></tr>';*/
        include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
        $formactions = new FormActions($db);
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("Type");
        print ' &nbsp;</td><td class="nowrap maxwidthonsmartphone">';
        print $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0);
        print '</td></tr>';
    }
    if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
        require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
        $formproject = new FormProjets($db);
        print '<tr>';
        print '<td class="nowrap">';
        print $langs->trans("Project") . ' &nbsp; ';
        print '</td><td class="nowrap maxwidthonsmartphone">';
        $formproject->select_projects($socid ? $socid : -1, $pid, 'projectid', 64);
        print '</td></tr>';
    }
    print '</table>';
    print '</td>';
    // Buttons
    print '<td align="center" valign="middle" class="nowrap">';
    print img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone"') . ' <input type="submit" class="button" style="min-width:120px" name="viewcal" value="' . $langs->trans("ViewCal") . '">';
    print '<br>';
    print img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone"') . ' <input type="submit" class="button" style="min-width:120px" name="viewweek" value="' . $langs->trans("ViewWeek") . '">';
    print '<br>';
    print img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone"') . ' <input type="submit" class="button" style="min-width:120px" name="viewday" value="' . $langs->trans("ViewDay") . '">';
    print '<br>';
    print img_picto($langs->trans("ViewList"), 'object_list', 'class="hideonsmartphone"') . ' <input type="submit" class="button" style="min-width:120px" name="viewlist" value="' . $langs->trans("ViewList") . '">';
    print '</td>';
    // Legend
    if ($conf->use_javascript_ajax && is_array($showextcals)) {
        print '<td align="center" valign="middle" class="nowrap">';
        print '<script type="text/javascript">' . "\n";
        print 'jQuery(document).ready(function () {' . "\n";
        print 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });' . "\n";
        print 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n";
        print 'jQuery(".family_birthday").toggle();' . "\n";
        print '});' . "\n";
        print '</script>' . "\n";
        print '<table>';
        if (!empty($conf->use_javascript_ajax)) {
            if (count($showextcals) > 0) {
                print '<tr><td><input type="checkbox" id="check_mytasks" name="check_mytasks" checked="true" disabled="disabled"> ' . $langs->trans("LocalAgenda") . '</td></tr>';
                foreach ($showextcals as $val) {
                    $htmlname = dol_string_nospecial($val['name']);
                    print '<tr><td>';
                    print '<script type="text/javascript">' . "\n";
                    print 'jQuery(document).ready(function () {' . "\n";
                    print '		jQuery("#check_' . $htmlname . '").click(function() {';
                    print ' 		/* alert("' . $htmlname . '"); */';
                    print ' 		jQuery(".family_' . $htmlname . '").toggle();';
                    print '		});' . "\n";
                    print '});' . "\n";
                    print '</script>' . "\n";
                    print '<input type="checkbox" id="check_' . $htmlname . '" name="check_' . $htmlname . '" checked="true"> ' . $val['name'];
                    print '</td></tr>';
                }
            }
        }
        print '<tr><td>' . $langs->trans("AgendaShowBirthdayEvents") . ' <input type="checkbox" id="check_birthday" name="check_birthday"></td></tr>';
        print '</table>';
        print '</td>';
    }
    print '</tr>';
    print '</table>';
    print '</form>';
}
 dol_include_once('/core/class/html.formprojet.class.php');
 list($langjs, $dummy) = explode('_', $langs->defaultlang);
 if ($langjs == 'en') {
     $langjs = 'en-gb';
 }
 readfile(dol_buildpath('/fullcalendar/lib/moment/min/moment.min.js'));
 readfile(dol_buildpath('/fullcalendar/lib/fullcalendar/dist/fullcalendar.min.js'));
 if (!is_file(dol_buildpath('/fullcalendar/lib/fullcalendar/dist/lang/' . $langjs . '.js'))) {
     $langjs = 'en-gb';
 }
 readfile(dol_buildpath('/fullcalendar/lib/fullcalendar/dist/lang/' . $langjs . '.js'));
 if (!empty($user->array_options['options_googlecalendarapi'])) {
     //	readfile(dol_buildpath('/fullcalendar/lib/fullcalendar/dist/fullcalendar/gcal.js'));
 }
 ob_start();
 $formactions = new FormActions($db);
 $formactions->select_type_actions(-1, "type_code", "systemauto");
 $select_type_action = ob_get_clean();
 $form = new Form($db);
 //$select_company = $form->select_thirdparty('','fk_soc','',1,1,0);
 $select_company = $form->select_company('', 'fk_soc', '', 1);
 $select_user = $form->select_dolusers($user->id, 'fk_user');
 ob_start();
 $form->select_contacts(-1, -1, 'contactid', 1, '', '', 0, 'minwidth200');
 // contactid car nom non pris en compte par l'ajax en vers.<3.9
 $select_contact = ob_get_clean();
 ob_start();
 $formProject = new FormProjets($db);
 $select_project = $formProject->select_projects_list(-1, 0, 'fk_project', 0, 0, 1);
 $select_project .= ob_get_clean();
 $defaultDay = date('d');
示例#13
0
     $filename = dol_sanitizeFileName($object->ref);
     $filedir = $conf->askpricesupplier->dir_output . "/" . dol_sanitizeFileName($object->ref);
     $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
     $genallowed = $user->rights->askpricesupplier->creer;
     $delallowed = $user->rights->askpricesupplier->supprimer;
     $var = true;
     $somethingshown = $formfile->show_documents('askpricesupplier', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
     // Linked object block
     $somethingshown = $form->showLinkedObjectBlock($object);
     // Show links to link elements
     //$linktoelem = $form->showLinkToObjectBlock($object);
     //if ($linktoelem) print '<br>'.$linktoelem;
     print '</div><div class="fichehalfright"><div class="ficheaddleft">';
     // List of actions on element
     include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
     $formactions = new FormActions($db);
     $somethingshown = $formactions->showactions($object, 'askpricesupplier', $socid);
     print '</div></div></div>';
 }
 /*
  * Action presend
  */
 if (GETPOST('modelselected')) {
     $action = 'presend';
 }
 if ($action == 'presend') {
     $object->fetch_projet();
     $ref = dol_sanitizeFileName($object->ref);
     include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
     $fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/') . '[^\\-]+');
     $file = $fileparams['fullname'];
示例#14
0
		$var = true;

		$somethingshown = $formfile->show_documents('supplier_proposal', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);

		// Linked object block
		$somethingshown = $form->showLinkedObjectBlock($object);

		// Show links to link elements
		//$linktoelem = $form->showLinkToObjectBlock($object);
		//if ($linktoelem) print '<br>'.$linktoelem;

		print '</div><div class="fichehalfright"><div class="ficheaddleft">';

		// List of actions on element
		include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
		$formactions = new FormActions($db);
		$somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid);

		print '</div></div></div>';
	}

	/*
	 * Action presend
 	 */
	if (GETPOST('modelselected')) {
		$action = 'presend';
	}
	if ($action == 'presend')
	{
		$object->fetch_projet();