Merge pull request #22031 from dolibit-ut/patch-503

Update target_list.php
This commit is contained in:
Laurent Destailleur 2022-09-02 09:39:29 +02:00 committed by GitHub
commit 3188a58cd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,11 +17,13 @@
*/ */
/** /**
* \file target_list.php * \file htdocs/webhook/target_list.php
* \ingroup webhook * \ingroup webhook
* \brief List page for target * \brief List page for target
*/ */
// Load Dolibarr environment
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -34,8 +36,10 @@ require_once __DIR__.'/class/target.class.php';
//dol_include_once('/othermodule/class/otherobject.class.php'); //dol_include_once('/othermodule/class/otherobject.class.php');
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("webhook@webhook", "other")); $langs->loadLangs(array('webhook', 'other'));
// Get Parameters
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
@ -47,7 +51,6 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$mode = GETPOST('mode', 'aZ'); $mode = GETPOST('mode', 'aZ');
$id = GETPOST('id', 'int');
// Load variable for pagination // Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
@ -119,6 +122,7 @@ foreach ($object->fields as $key => $val) {
); );
} }
} }
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -126,6 +130,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
$arrayfields = dol_sort_array($arrayfields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position');
// Permissions
// There is several ways to check permission. // There is several ways to check permission.
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks // Set $enablepermissioncheck to 1 to enable a minimum low level of checks
$enablepermissioncheck = 0; $enablepermissioncheck = 0;
@ -207,6 +212,7 @@ $now = dol_now();
//$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target"; //$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target";
$help_url = ''; $help_url = '';
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets")); $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets"));
$morejs = array(); $morejs = array();
$morecss = array(); $morecss = array();