2004-10-19 20:58:50 +02:00
|
|
|
<?php
|
2009-04-27 22:37:50 +02:00
|
|
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2011-04-15 09:54:10 +02:00
|
|
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
2009-04-27 22:37:50 +02:00
|
|
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
|
|
|
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
2018-10-27 14:43:12 +02:00
|
|
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
2015-01-11 11:31:53 +01:00
|
|
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
2013-08-14 12:48:00 +02:00
|
|
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
2018-07-28 18:03:14 +02:00
|
|
|
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
2025-02-08 01:49:29 +01:00
|
|
|
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
2024-04-27 22:01:34 +02:00
|
|
|
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
2003-06-11 15:20:49 +02:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2013-01-16 15:36:08 +01:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-06-11 15:20:49 +02:00
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program 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
|
2019-09-23 21:55:30 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-06-11 15:20:49 +02:00
|
|
|
*/
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2005-04-02 22:15:25 +02:00
|
|
|
/**
|
2009-05-06 17:45:50 +02:00
|
|
|
* \file htdocs/admin/fichinter.php
|
|
|
|
|
* \ingroup fichinter
|
2009-12-09 20:04:54 +01:00
|
|
|
* \brief Setup page of module Interventions
|
2008-09-05 01:44:36 +02:00
|
|
|
*/
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2022-09-07 20:08:59 +02:00
|
|
|
// Load Dolibarr environment
|
2012-08-22 23:24:21 +02:00
|
|
|
require '../main.inc.php';
|
2012-08-22 23:11:24 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
2017-05-29 15:25:37 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
2013-05-18 12:53:11 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
2012-08-22 23:11:24 +02:00
|
|
|
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2024-11-04 23:53:20 +01:00
|
|
|
/**
|
|
|
|
|
* @var Conf $conf
|
|
|
|
|
* @var DoliDB $db
|
|
|
|
|
* @var HookManager $hookmanager
|
|
|
|
|
* @var Societe $mysoc
|
|
|
|
|
* @var Translate $langs
|
|
|
|
|
* @var User $user
|
|
|
|
|
*/
|
|
|
|
|
|
2018-05-26 18:41:16 +02:00
|
|
|
// Load translation files required by the page
|
|
|
|
|
$langs->loadLangs(array('admin', 'errors', 'interventions', 'other'));
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!$user->admin) {
|
|
|
|
|
accessforbidden();
|
|
|
|
|
}
|
2004-08-29 14:01:58 +02:00
|
|
|
|
2020-09-16 19:39:50 +02:00
|
|
|
$action = GETPOST('action', 'aZ09');
|
2019-01-27 11:55:16 +01:00
|
|
|
$value = GETPOST('value', 'alpha');
|
2022-01-26 13:49:46 +01:00
|
|
|
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
|
|
|
|
|
2019-01-27 11:55:16 +01:00
|
|
|
$label = GETPOST('label', 'alpha');
|
|
|
|
|
$scandir = GETPOST('scan_dir', 'alpha');
|
2019-11-14 12:09:15 +01:00
|
|
|
$type = 'ficheinter';
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2011-09-12 21:49:40 +02:00
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
/*
|
|
|
|
|
* Actions
|
|
|
|
|
*/
|
2024-11-10 11:16:23 +01:00
|
|
|
$error = 0;
|
2017-06-01 12:11:45 +02:00
|
|
|
|
|
|
|
|
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
|
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($action == 'updateMask') {
|
2023-01-04 15:10:09 +01:00
|
|
|
$maskconst = GETPOST('maskconst', 'aZ09');
|
2019-11-14 12:09:15 +01:00
|
|
|
$maskvalue = GETPOST('maskvalue', 'alpha');
|
2024-09-18 03:27:25 +02:00
|
|
|
|
|
|
|
|
$res = 0;
|
|
|
|
|
|
2023-01-04 15:10:09 +01:00
|
|
|
if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
|
2021-02-26 22:04:03 +01:00
|
|
|
$res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
|
|
|
|
|
}
|
2011-08-31 20:47:29 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
2011-08-31 16:28:42 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!$error) {
|
2020-10-31 14:32:18 +01:00
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2024-01-23 20:18:33 +01:00
|
|
|
} elseif ($action == 'specimen') { // For Intervention card
|
2019-11-14 12:09:15 +01:00
|
|
|
$modele = GETPOST('module', 'alpha');
|
2007-08-29 09:55:34 +02:00
|
|
|
|
|
|
|
|
$inter = new Fichinter($db);
|
|
|
|
|
$inter->initAsSpecimen();
|
|
|
|
|
|
2012-03-24 18:15:07 +01:00
|
|
|
// Search template files
|
2023-12-04 11:41:14 +01:00
|
|
|
$file = '';
|
|
|
|
|
$classname = '';
|
2019-11-14 12:09:15 +01:00
|
|
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
2021-02-26 22:04:03 +01:00
|
|
|
foreach ($dirmodels as $reldir) {
|
2020-10-31 14:32:18 +01:00
|
|
|
$file = dol_buildpath($reldir."core/modules/fichinter/doc/pdf_".$modele.".modules.php", 0);
|
2021-02-26 22:04:03 +01:00
|
|
|
if (file_exists($file)) {
|
2012-03-24 18:15:07 +01:00
|
|
|
$classname = "pdf_".$modele;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-12 16:15:45 +01:00
|
|
|
if ($classname !== '') {
|
2012-08-22 23:11:24 +02:00
|
|
|
require_once $file;
|
2007-08-29 09:55:34 +02:00
|
|
|
|
2012-03-24 18:15:07 +01:00
|
|
|
$module = new $classname($db);
|
2024-03-24 21:36:04 +01:00
|
|
|
'@phan-var-force ModelePDFFicheinter $module';
|
2007-08-29 09:55:34 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($module->write_file($inter, $langs) > 0) {
|
2007-08-29 09:55:34 +02:00
|
|
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
|
|
|
|
|
return;
|
2020-05-21 09:35:30 +02:00
|
|
|
} else {
|
2015-10-28 19:28:18 +01:00
|
|
|
setEventMessages($module->error, $module->errors, 'errors');
|
|
|
|
|
dol_syslog($module->error, LOG_ERR);
|
2008-10-28 21:05:23 +01:00
|
|
|
}
|
2020-05-21 09:35:30 +02:00
|
|
|
} else {
|
2015-10-28 19:28:18 +01:00
|
|
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
2009-02-20 23:53:15 +01:00
|
|
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
2007-08-29 09:55:34 +02:00
|
|
|
}
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'set') {
|
|
|
|
|
// Activate a model
|
2012-04-03 17:00:45 +02:00
|
|
|
$ret = addDocumentModel($value, $type, $label, $scandir);
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'del') {
|
2012-04-03 17:00:45 +02:00
|
|
|
$ret = delDocumentModel($value, $type);
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($ret > 0) {
|
|
|
|
|
if ($conf->global->FICHEINTER_ADDON_PDF == "$value") {
|
|
|
|
|
dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF', $conf->entity);
|
|
|
|
|
}
|
2008-09-05 01:44:36 +02:00
|
|
|
}
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'setdoc') {
|
|
|
|
|
// Set default model
|
|
|
|
|
if (dolibarr_set_const($db, "FICHEINTER_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
|
2009-04-27 22:37:50 +02:00
|
|
|
// La constante qui a ete lue en avant du nouveau set
|
|
|
|
|
// on passe donc par une variable pour avoir un affichage coherent
|
2011-08-31 16:28:42 +02:00
|
|
|
$conf->global->FICHEINTER_ADDON_PDF = $value;
|
2008-09-05 01:44:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// On active le modele
|
2012-04-03 17:00:45 +02:00
|
|
|
$ret = delDocumentModel($value, $type);
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($ret > 0) {
|
2012-04-03 17:00:45 +02:00
|
|
|
$ret = addDocumentModel($value, $type, $label, $scandir);
|
2008-09-05 01:44:36 +02:00
|
|
|
}
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'setmod') {
|
2024-01-11 09:59:52 +01:00
|
|
|
// TODO Verify if the chosen numbering module can be activated
|
|
|
|
|
// by calling method canBeActivated
|
2006-07-30 03:55:08 +02:00
|
|
|
|
2019-01-27 11:55:16 +01:00
|
|
|
dolibarr_set_const($db, "FICHEINTER_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'set_FICHINTER_FREE_TEXT') {
|
2020-09-18 01:29:17 +02:00
|
|
|
$freetext = GETPOST('FICHINTER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
|
2019-07-18 18:19:51 +02:00
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
|
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
2019-07-18 18:19:51 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!$error) {
|
2020-10-31 14:32:18 +01:00
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'set_FICHINTER_DRAFT_WATERMARK') {
|
2019-11-14 12:09:15 +01:00
|
|
|
$draft = GETPOST('FICHINTER_DRAFT_WATERMARK', 'alpha');
|
2019-01-27 11:55:16 +01:00
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
|
2013-03-22 17:10:17 +01:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
2013-03-22 17:10:17 +01:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!$error) {
|
2020-10-31 14:32:18 +01:00
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS') {
|
2019-01-27 11:55:16 +01:00
|
|
|
$val = GETPOST('FICHINTER_PRINT_PRODUCTS', 'alpha');
|
|
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
2013-05-21 11:44:11 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
2013-05-21 11:44:11 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (!$error) {
|
2020-10-31 14:32:18 +01:00
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2016-07-25 17:18:13 +02:00
|
|
|
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
|
|
|
|
|
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
2020-10-31 14:32:18 +01:00
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
2016-07-25 17:18:13 +02:00
|
|
|
|
2021-01-23 17:49:08 +01:00
|
|
|
if (!($res > 0)) {
|
2016-07-25 17:18:13 +02:00
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!$error) {
|
|
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2017-09-07 11:58:22 +02:00
|
|
|
} elseif ($action == 'set_FICHINTER_WITHOUT_DURATION') {
|
2020-10-31 14:32:18 +01:00
|
|
|
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
|
|
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
|
|
|
|
|
2021-01-23 17:49:08 +01:00
|
|
|
if (!($res > 0)) {
|
2020-10-31 14:32:18 +01:00
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!$error) {
|
|
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2017-09-07 15:31:19 +02:00
|
|
|
} elseif ($action == 'set_FICHINTER_DATE_WITHOUT_HOUR') {
|
2020-10-31 14:32:18 +01:00
|
|
|
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
|
|
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
|
|
|
|
|
2021-01-23 17:49:08 +01:00
|
|
|
if (!($res > 0)) {
|
2020-10-31 14:32:18 +01:00
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-20 16:33:48 +02:00
|
|
|
if (!$error) {
|
|
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
|
|
|
|
} elseif ($action == "set_FICHINTER_ALLOW_ONLINE_SIGN") {
|
|
|
|
|
$val = GETPOST('FICHINTER_ALLOW_ONLINE_SIGN', 'alpha');
|
|
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_ALLOW_ONLINE_SIGN", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
|
|
|
|
|
|
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!$error) {
|
|
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
|
|
|
|
} elseif ($action == "set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD") {
|
|
|
|
|
$val = GETPOST('FICHINTER_ALLOW_EXTERNAL_DOWNLOAD', 'alpha');
|
|
|
|
|
$res = dolibarr_set_const($db, "FICHINTER_ALLOW_EXTERNAL_DOWNLOAD", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
|
|
|
|
|
|
|
|
|
if (!($res > 0)) {
|
|
|
|
|
$error++;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-31 14:32:18 +01:00
|
|
|
if (!$error) {
|
|
|
|
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
|
|
} else {
|
|
|
|
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
|
|
}
|
2013-05-21 11:44:11 +02:00
|
|
|
}
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
2017-09-07 11:58:22 +02:00
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
/*
|
2011-08-31 20:47:29 +02:00
|
|
|
* View
|
2006-04-29 00:54:02 +02:00
|
|
|
*/
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
2012-03-24 18:15:07 +01:00
|
|
|
|
2024-06-08 14:53:14 +02:00
|
|
|
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-fichinter');
|
2006-04-29 00:54:02 +02:00
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$form = new Form($db);
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
2019-01-27 11:55:16 +01:00
|
|
|
print load_fiche_titre($langs->trans("InterventionsSetup"), $linkback, 'title_setup');
|
2004-02-21 00:40:13 +01:00
|
|
|
|
|
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$head = fichinter_admin_prepare_head();
|
2013-03-22 17:10:17 +01:00
|
|
|
|
2020-10-22 22:50:03 +02:00
|
|
|
print dol_get_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), -1, 'intervention');
|
2013-03-22 17:10:17 +01:00
|
|
|
|
|
|
|
|
// Interventions numbering model
|
2006-07-30 03:55:08 +02:00
|
|
|
|
2019-01-27 11:55:16 +01:00
|
|
|
print load_fiche_titre($langs->trans("FicheinterNumberingModules"), '', '');
|
2006-07-30 03:55:08 +02:00
|
|
|
|
2021-06-13 01:27:04 +02:00
|
|
|
print '<div class="div-table-responsive-no-min">';
|
2019-11-05 21:24:41 +01:00
|
|
|
print '<table class="noborder centpercent">';
|
2006-07-30 03:55:08 +02:00
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print '<td width="100">'.$langs->trans("Name").'</td>';
|
|
|
|
|
print '<td>'.$langs->trans("Description").'</td>';
|
|
|
|
|
print '<td>'.$langs->trans("Example").'</td>';
|
2010-02-25 00:29:46 +01:00
|
|
|
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
2013-05-07 22:04:08 +02:00
|
|
|
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
2006-07-30 03:55:08 +02:00
|
|
|
print "</tr>\n";
|
|
|
|
|
|
|
|
|
|
clearstatcache();
|
|
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
foreach ($dirmodels as $reldir) {
|
2012-03-24 18:15:07 +01:00
|
|
|
$dir = dol_buildpath($reldir."core/modules/fichinter/");
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (is_dir($dir)) {
|
2011-04-15 09:54:10 +02:00
|
|
|
$handle = opendir($dir);
|
2021-02-26 22:04:03 +01:00
|
|
|
if (is_resource($handle)) {
|
|
|
|
|
while (($file = readdir($handle)) !== false) {
|
|
|
|
|
if (preg_match('/^(mod_.*)\.php$/i', $file, $reg)) {
|
2011-04-15 09:54:10 +02:00
|
|
|
$file = $reg[1];
|
2019-01-27 11:55:16 +01:00
|
|
|
$classname = substr($file, 4);
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2013-03-22 17:10:17 +01:00
|
|
|
require_once $dir.$file.'.php';
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2023-12-04 11:41:14 +01:00
|
|
|
$module = new $file();
|
2014-09-25 12:07:11 +02:00
|
|
|
|
2024-08-17 19:32:52 +02:00
|
|
|
'@phan-var-force ModeleNumRefFicheinter $module';
|
|
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($module->isEnabled()) {
|
2013-03-22 17:10:17 +01:00
|
|
|
// Show modules according to features level
|
2023-11-27 12:24:18 +01:00
|
|
|
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
2021-02-26 22:04:03 +01:00
|
|
|
continue;
|
|
|
|
|
}
|
2023-11-27 12:24:18 +01:00
|
|
|
if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
|
2021-02-26 22:04:03 +01:00
|
|
|
continue;
|
|
|
|
|
}
|
2014-09-25 12:07:11 +02:00
|
|
|
|
2017-06-01 01:53:55 +02:00
|
|
|
|
2024-08-17 19:32:52 +02:00
|
|
|
print '<tr class="oddeven"><td>'.$module->getName($langs)."</td><td>\n";
|
2023-08-09 18:00:31 +02:00
|
|
|
print $module->info($langs);
|
2011-04-15 09:54:10 +02:00
|
|
|
print '</td>';
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2020-10-31 14:32:18 +01:00
|
|
|
// Show example of numbering model
|
|
|
|
|
print '<td class="nowrap">';
|
|
|
|
|
$tmp = $module->getExample();
|
2020-11-28 02:09:27 +01:00
|
|
|
if (preg_match('/^Error/', $tmp)) {
|
|
|
|
|
$langs->load("errors");
|
|
|
|
|
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
2021-02-26 22:04:03 +01:00
|
|
|
} elseif ($tmp == 'NotConfigured') {
|
2021-09-05 02:25:32 +02:00
|
|
|
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
2021-02-26 22:04:03 +01:00
|
|
|
} else {
|
|
|
|
|
print $tmp;
|
|
|
|
|
}
|
2020-10-31 14:32:18 +01:00
|
|
|
print '</td>'."\n";
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2019-12-12 10:31:08 +01:00
|
|
|
print '<td class="center">';
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($conf->global->FICHEINTER_ADDON == $classname) {
|
2019-01-27 11:55:16 +01:00
|
|
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
2020-05-21 09:35:30 +02:00
|
|
|
} else {
|
2021-09-19 18:03:38 +02:00
|
|
|
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($classname).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
2011-04-15 09:54:10 +02:00
|
|
|
}
|
|
|
|
|
print '</td>';
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$ficheinter = new Fichinter($db);
|
2011-04-15 09:54:10 +02:00
|
|
|
$ficheinter->initAsSpecimen();
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2011-04-15 09:54:10 +02:00
|
|
|
// Info
|
2019-11-14 12:09:15 +01:00
|
|
|
$htmltooltip = '';
|
|
|
|
|
$htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
|
|
|
|
$nextval = $module->getNextValue($mysoc, $ficheinter);
|
2020-10-31 14:32:18 +01:00
|
|
|
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
|
|
|
|
$htmltooltip .= ''.$langs->trans("NextValue").': ';
|
|
|
|
|
if ($nextval) {
|
2021-02-26 22:04:03 +01:00
|
|
|
if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
|
2020-10-31 14:32:18 +01:00
|
|
|
$nextval = $langs->trans($nextval);
|
2021-02-26 22:04:03 +01:00
|
|
|
}
|
2020-10-31 14:32:18 +01:00
|
|
|
$htmltooltip .= $nextval.'<br>';
|
|
|
|
|
} else {
|
|
|
|
|
$htmltooltip .= $langs->trans($module->error).'<br>';
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-12-12 10:31:08 +01:00
|
|
|
print '<td class="center">';
|
2025-02-08 01:49:29 +01:00
|
|
|
print $form->textwithpicto('', $htmltooltip, 1, 'info');
|
2011-04-15 09:54:10 +02:00
|
|
|
print '</td>';
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2011-04-15 09:54:10 +02:00
|
|
|
print '</tr>';
|
|
|
|
|
}
|
2008-09-05 01:44:36 +02:00
|
|
|
}
|
|
|
|
|
}
|
2011-04-15 09:54:10 +02:00
|
|
|
closedir($handle);
|
2008-09-05 01:44:36 +02:00
|
|
|
}
|
|
|
|
|
}
|
2006-07-30 03:55:08 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-13 01:27:04 +02:00
|
|
|
print '</table>';
|
|
|
|
|
print '</div>';
|
|
|
|
|
|
|
|
|
|
print '<br>';
|
2006-07-30 03:55:08 +02:00
|
|
|
|
|
|
|
|
|
2013-03-22 17:10:17 +01:00
|
|
|
/*
|
|
|
|
|
* Documents models for Interventions
|
|
|
|
|
*/
|
2006-07-30 03:55:08 +02:00
|
|
|
|
2019-01-27 11:55:16 +01:00
|
|
|
print load_fiche_titre($langs->trans("TemplatePDFInterventions"), '', '');
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
// Defini tableau def des modeles
|
2019-11-14 12:09:15 +01:00
|
|
|
$type = 'ficheinter';
|
2006-04-29 00:54:02 +02:00
|
|
|
$def = array();
|
|
|
|
|
$sql = "SELECT nom";
|
2019-11-14 12:09:15 +01:00
|
|
|
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
2020-09-19 23:11:38 +02:00
|
|
|
$sql .= " WHERE type = '".$db->escape($type)."'";
|
2019-11-14 12:09:15 +01:00
|
|
|
$sql .= " AND entity = ".$conf->entity;
|
|
|
|
|
$resql = $db->query($sql);
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($resql) {
|
2006-04-29 00:54:02 +02:00
|
|
|
$i = 0;
|
2019-11-14 12:09:15 +01:00
|
|
|
$num_rows = $db->num_rows($resql);
|
2021-02-26 22:04:03 +01:00
|
|
|
while ($i < $num_rows) {
|
2006-04-29 00:54:02 +02:00
|
|
|
$array = $db->fetch_array($resql);
|
2024-04-27 22:01:34 +02:00
|
|
|
if (is_array($array)) {
|
|
|
|
|
array_push($def, $array[0]);
|
|
|
|
|
}
|
2006-04-29 00:54:02 +02:00
|
|
|
$i++;
|
|
|
|
|
}
|
2020-05-21 09:35:30 +02:00
|
|
|
} else {
|
2009-02-20 23:53:15 +01:00
|
|
|
dol_print_error($db);
|
2006-04-29 00:54:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2021-06-13 01:27:04 +02:00
|
|
|
print '<div class="div-table-responsive-no-min">';
|
2019-11-05 21:24:41 +01:00
|
|
|
print '<table class="noborder centpercent">';
|
2004-12-10 21:04:59 +01:00
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print '<td>'.$langs->trans("Name").'</td>';
|
2005-04-20 01:24:28 +02:00
|
|
|
print '<td>'.$langs->trans("Description").'</td>';
|
2010-02-25 00:29:46 +01:00
|
|
|
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
2006-04-29 00:54:02 +02:00
|
|
|
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
2013-05-07 22:04:08 +02:00
|
|
|
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
2013-05-07 22:38:34 +02:00
|
|
|
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
2004-12-10 21:04:59 +01:00
|
|
|
print "</tr>\n";
|
2003-06-11 15:20:49 +02:00
|
|
|
|
|
|
|
|
clearstatcache();
|
|
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
foreach ($dirmodels as $reldir) {
|
2020-01-20 01:05:30 +01:00
|
|
|
$realpath = $reldir."core/modules/fichinter/doc";
|
|
|
|
|
$dir = dol_buildpath($realpath);
|
2011-04-15 09:54:10 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if (is_dir($dir)) {
|
2019-11-14 12:09:15 +01:00
|
|
|
$handle = opendir($dir);
|
2021-02-26 22:04:03 +01:00
|
|
|
if (is_resource($handle)) {
|
2024-03-09 02:43:57 +01:00
|
|
|
$filelist = array();
|
2021-02-26 22:04:03 +01:00
|
|
|
while (($file = readdir($handle)) !== false) {
|
2019-11-14 12:09:15 +01:00
|
|
|
$filelist[] = $file;
|
2014-09-25 12:07:11 +02:00
|
|
|
}
|
|
|
|
|
closedir($handle);
|
|
|
|
|
arsort($filelist);
|
2011-05-04 20:34:16 +02:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
foreach ($filelist as $file) {
|
|
|
|
|
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
|
|
|
|
|
if (file_exists($dir.'/'.$file)) {
|
2020-10-31 14:32:18 +01:00
|
|
|
$name = substr($file, 4, dol_strlen($file) - 16);
|
|
|
|
|
$classname = substr($file, 0, dol_strlen($file) - 12);
|
|
|
|
|
|
|
|
|
|
require_once $dir.'/'.$file;
|
|
|
|
|
$module = new $classname($db);
|
|
|
|
|
|
2024-08-17 19:32:52 +02:00
|
|
|
'@phan-var-force ModelePDFFicheinter $module';
|
|
|
|
|
|
2020-10-31 14:32:18 +01:00
|
|
|
$modulequalified = 1;
|
2023-11-27 12:24:18 +01:00
|
|
|
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
2021-02-26 22:04:03 +01:00
|
|
|
$modulequalified = 0;
|
|
|
|
|
}
|
2023-11-27 12:24:18 +01:00
|
|
|
if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
|
2021-02-26 22:04:03 +01:00
|
|
|
$modulequalified = 0;
|
|
|
|
|
}
|
2020-10-31 14:32:18 +01:00
|
|
|
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($modulequalified) {
|
2020-10-31 14:32:18 +01:00
|
|
|
print '<tr class="oddeven"><td width="100">';
|
2023-12-04 11:41:14 +01:00
|
|
|
print(empty($module->name) ? $name : $module->name);
|
2020-10-31 14:32:18 +01:00
|
|
|
print "</td><td>\n";
|
2021-02-26 22:04:03 +01:00
|
|
|
if (method_exists($module, 'info')) {
|
2024-08-17 19:32:52 +02:00
|
|
|
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
|
2021-02-26 22:04:03 +01:00
|
|
|
} else {
|
|
|
|
|
print $module->description;
|
|
|
|
|
}
|
2020-10-31 14:32:18 +01:00
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
// Active
|
2021-02-26 22:04:03 +01:00
|
|
|
if (in_array($name, $def)) {
|
2020-10-31 14:32:18 +01:00
|
|
|
print "<td align=\"center\">\n";
|
2021-09-19 14:41:46 +02:00
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
|
2020-10-31 14:32:18 +01:00
|
|
|
print img_picto($langs->trans("Enabled"), 'switch_on');
|
|
|
|
|
print '</a>';
|
|
|
|
|
print "</td>";
|
|
|
|
|
} else {
|
|
|
|
|
print "<td align=\"center\">\n";
|
2021-09-19 14:41:46 +02:00
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
2020-10-31 14:32:18 +01:00
|
|
|
print "</td>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Default
|
|
|
|
|
print "<td align=\"center\">";
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($conf->global->FICHEINTER_ADDON_PDF == "$name") {
|
2020-10-31 14:32:18 +01:00
|
|
|
print img_picto($langs->trans("Default"), 'on');
|
|
|
|
|
} else {
|
2021-09-19 18:03:38 +02:00
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
2020-10-31 14:32:18 +01:00
|
|
|
}
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
// Info
|
|
|
|
|
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
|
|
|
|
|
|
|
|
|
|
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
|
|
|
|
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
|
|
|
|
print '<td class="center">';
|
2025-02-08 01:49:29 +01:00
|
|
|
print $form->textwithpicto('', $htmltooltip, -1, 'info');
|
2020-10-31 14:32:18 +01:00
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
// Preview
|
|
|
|
|
print '<td class="center">';
|
2021-02-26 22:04:03 +01:00
|
|
|
if ($module->type == 'pdf') {
|
2020-12-03 13:19:35 +01:00
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
2020-10-31 14:32:18 +01:00
|
|
|
} else {
|
2025-01-08 17:45:28 +01:00
|
|
|
print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
|
2020-10-31 14:32:18 +01:00
|
|
|
}
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-04-15 09:54:10 +02:00
|
|
|
}
|
|
|
|
|
}
|
2003-06-11 15:20:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
2021-06-13 01:27:04 +02:00
|
|
|
print '</div>';
|
2008-06-09 20:55:24 +02:00
|
|
|
print "<br>";
|
|
|
|
|
|
2013-03-22 17:10:17 +01:00
|
|
|
/*
|
|
|
|
|
* Other options
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-27 11:55:16 +01:00
|
|
|
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
2021-06-13 01:27:04 +02:00
|
|
|
|
|
|
|
|
print '<div class="div-table-responsive-no-min">';
|
2019-11-05 21:24:41 +01:00
|
|
|
print '<table class="noborder centpercent">';
|
2008-06-09 20:55:24 +02:00
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
2025-01-24 13:12:48 +01:00
|
|
|
print '<td align="center" width="60"></td>';
|
2008-06-09 20:55:24 +02:00
|
|
|
print "<td> </td>\n";
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
2019-11-14 12:09:15 +01:00
|
|
|
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
|
|
|
|
|
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
2019-07-18 18:19:51 +02:00
|
|
|
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
2021-02-26 22:04:03 +01:00
|
|
|
foreach ($substitutionarray as $key => $val) {
|
|
|
|
|
$htmltext .= $key.'<br>';
|
|
|
|
|
}
|
2019-11-14 12:09:15 +01:00
|
|
|
$htmltext .= '</i>';
|
2019-07-18 18:19:51 +02:00
|
|
|
|
|
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2019-07-18 18:19:51 +02:00
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_FREE_TEXT">';
|
|
|
|
|
print '<tr class="oddeven"><td colspan="2">';
|
|
|
|
|
print $form->textwithpicto($langs->trans("FreeLegalTextOnInterventions"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
2019-11-14 12:09:15 +01:00
|
|
|
$variablename = 'FICHINTER_FREE_TEXT';
|
2023-10-24 17:00:13 +02:00
|
|
|
if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
|
2022-06-21 20:25:25 +02:00
|
|
|
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
|
2020-05-21 09:35:30 +02:00
|
|
|
} else {
|
2020-10-31 14:32:18 +01:00
|
|
|
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
2022-06-21 23:39:31 +02:00
|
|
|
$doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
|
2020-10-31 14:32:18 +01:00
|
|
|
print $doleditor->Create();
|
2019-07-18 18:19:51 +02:00
|
|
|
}
|
|
|
|
|
print '</td><td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2019-07-18 18:19:51 +02:00
|
|
|
print "</td></tr>\n";
|
|
|
|
|
print '</form>';
|
2009-12-09 20:04:54 +01:00
|
|
|
|
2008-06-09 20:55:24 +02:00
|
|
|
//Use draft Watermark
|
|
|
|
|
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2008-06-09 20:55:24 +02:00
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERMARK\">";
|
2017-04-14 13:02:29 +02:00
|
|
|
print '<tr class="oddeven"><td>';
|
2017-10-31 11:17:44 +01:00
|
|
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
2017-04-27 17:16:19 +02:00
|
|
|
print '</td><td>';
|
2022-07-24 18:59:07 +02:00
|
|
|
print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('FICHINTER_DRAFT_WATERMARK')).'">';
|
2019-01-22 11:46:12 +01:00
|
|
|
print '</td><td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2008-06-09 20:55:24 +02:00
|
|
|
print "</td></tr>\n";
|
2015-09-29 18:27:39 +02:00
|
|
|
print '</form>';
|
2013-05-21 11:44:11 +02:00
|
|
|
// print products on fichinter
|
|
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2013-05-21 11:44:11 +02:00
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_PRINT_PRODUCTS">';
|
2017-04-14 13:02:29 +02:00
|
|
|
print '<tr class="oddeven"><td>';
|
2013-05-21 11:44:11 +02:00
|
|
|
print $langs->trans("PrintProductsOnFichinter").' ('.$langs->trans("PrintProductsOnFichinterDetails").')</td>';
|
|
|
|
|
print '<td align="center"><input type="checkbox" name="FICHINTER_PRINT_PRODUCTS" ';
|
2022-09-09 12:26:17 +02:00
|
|
|
if (getDolGlobalString("FICHINTER_PRINT_PRODUCTS")) {
|
2015-05-07 11:39:26 +02:00
|
|
|
print 'checked ';
|
2021-02-26 22:04:03 +01:00
|
|
|
}
|
2013-05-21 11:44:11 +02:00
|
|
|
print '/>';
|
2019-01-22 11:46:12 +01:00
|
|
|
print '</td><td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2013-05-21 11:44:11 +02:00
|
|
|
print "</td></tr>\n";
|
2017-06-26 21:37:36 +02:00
|
|
|
print '</form>';
|
2016-07-25 17:18:13 +02:00
|
|
|
// Use services duration
|
2019-11-14 12:09:15 +01:00
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2016-07-25 17:18:13 +02:00
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_USE_SERVICE_DURATION">';
|
2017-04-24 16:36:58 +02:00
|
|
|
print '<tr class="oddeven">';
|
2016-07-25 17:18:13 +02:00
|
|
|
print '<td>';
|
|
|
|
|
print $langs->trans("UseServicesDurationOnFichinter");
|
|
|
|
|
print '</td>';
|
2019-12-12 10:31:08 +01:00
|
|
|
print '<td class="center">';
|
2022-09-09 12:26:17 +02:00
|
|
|
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.(getDolGlobalString("FICHINTER_USE_SERVICE_DURATION") ? ' checked' : '').'>';
|
2016-07-25 17:18:13 +02:00
|
|
|
print '</td>';
|
2019-01-22 11:46:12 +01:00
|
|
|
print '<td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2016-07-25 17:18:13 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '</tr>';
|
2008-06-09 20:55:24 +02:00
|
|
|
print '</form>';
|
2017-09-07 11:58:22 +02:00
|
|
|
// Use duration
|
2019-11-14 12:09:15 +01:00
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2017-09-07 11:58:22 +02:00
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_WITHOUT_DURATION">';
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>';
|
|
|
|
|
print $langs->trans("UseDurationOnFichinter");
|
|
|
|
|
print '</td>';
|
2019-12-12 10:31:08 +01:00
|
|
|
print '<td class="center">';
|
2022-09-09 12:26:17 +02:00
|
|
|
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.(getDolGlobalString("FICHINTER_WITHOUT_DURATION") ? ' checked' : '').'>';
|
2017-09-07 11:58:22 +02:00
|
|
|
print '</td>';
|
2019-01-22 11:46:12 +01:00
|
|
|
print '<td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2017-09-07 11:58:22 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
print '</form>';
|
2017-09-07 15:31:19 +02:00
|
|
|
// use date without hour
|
2019-11-14 12:09:15 +01:00
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
2019-12-18 23:12:31 +01:00
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
2017-09-07 15:31:19 +02:00
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_DATE_WITHOUT_HOUR">';
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>';
|
|
|
|
|
print $langs->trans("UseDateWithoutHourOnFichinter");
|
|
|
|
|
print '</td>';
|
2019-12-12 10:31:08 +01:00
|
|
|
print '<td class="center">';
|
2022-09-09 12:26:17 +02:00
|
|
|
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.(getDolGlobalString("FICHINTER_DATE_WITHOUT_HOUR") ? ' checked' : '').'>';
|
2017-09-07 15:31:19 +02:00
|
|
|
print '</td>';
|
2019-01-22 11:46:12 +01:00
|
|
|
print '<td class="right">';
|
2021-08-24 17:04:17 +02:00
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
2017-09-07 15:31:19 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
print '</form>';
|
2022-10-20 18:54:45 +02:00
|
|
|
// Allow online signing
|
2022-10-20 16:33:48 +02:00
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_ALLOW_ONLINE_SIGN">';
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>';
|
2022-10-20 18:46:24 +02:00
|
|
|
print $langs->trans("AllowOnlineSign");
|
2022-10-20 16:33:48 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td class="center">';
|
2022-10-20 18:50:48 +02:00
|
|
|
print '<input type="checkbox" name="FICHINTER_ALLOW_ONLINE_SIGN"'.(getDolGlobalString("FICHINTER_ALLOW_ONLINE_SIGN") ? ' checked' : '').'>';
|
2022-10-20 16:33:48 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td class="right">';
|
|
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '</tr>';
|
2022-10-20 18:54:45 +02:00
|
|
|
print '</form>';
|
2022-10-20 16:33:48 +02:00
|
|
|
// Allow external download
|
|
|
|
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD">';
|
|
|
|
|
print '<tr class="oddeven">';
|
|
|
|
|
print '<td>';
|
2022-10-20 18:46:24 +02:00
|
|
|
print $langs->trans("AllowExternalDownload");
|
2022-10-20 16:33:48 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td class="center">';
|
2022-10-20 18:50:48 +02:00
|
|
|
print '<input type="checkbox" name="FICHINTER_ALLOW_EXTERNAL_DOWNLOAD"'.(getDolGlobalString("FICHINTER_ALLOW_EXTERNAL_DOWNLOAD") ? ' checked' : '').'>';
|
2022-10-20 16:33:48 +02:00
|
|
|
print '</td>';
|
|
|
|
|
print '<td class="right">';
|
|
|
|
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
|
|
|
|
print '</td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
print '</form>';
|
|
|
|
|
|
2017-09-07 15:31:19 +02:00
|
|
|
|
2008-06-09 20:55:24 +02:00
|
|
|
print '</table>';
|
2021-06-13 01:27:04 +02:00
|
|
|
print '</div>';
|
2008-06-09 20:55:24 +02:00
|
|
|
|
|
|
|
|
print '<br>';
|
2003-06-11 15:20:49 +02:00
|
|
|
|
2018-07-28 18:03:14 +02:00
|
|
|
// End of page
|
2015-12-07 10:56:37 +01:00
|
|
|
llxFooter();
|
2003-06-11 15:20:49 +02:00
|
|
|
$db->close();
|