Dolibarize data privacy policy module

This commit is contained in:
Laurent Destailleur 2018-10-15 14:04:42 +02:00
parent a20498126a
commit 6d4d8a0342
22 changed files with 492 additions and 493 deletions

View File

@ -18,12 +18,12 @@
*/
/**
* \defgroup datapolicies Module datapolicies
* \brief datapolicies module descriptor.
* \defgroup datapolicy Module datapolicy
* \brief datapolicy module descriptor.
*
* \file htdocs/datapolicies/core/modules/modGdpr.class.php
* \ingroup datapolicies
* \brief Description and activation file for module DATAPOLICIES
* \file htdocs/datapolicy/core/modules/modDataPolicy.class.php
* \ingroup datapolicy
* \brief Description and activation file for module DATAPOLICY
*/
include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php';
@ -33,9 +33,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php';
// so we ignore the Squiz.Classes.ValidClassName.NotCamelCaps rule.
// @codingStandardsIgnoreStart
/**
* Description and activation class for module datapolicies
* Description and activation class for module datapolicy
*/
class modDataPolicies extends DolibarrModules {
class modDataPolicy extends DolibarrModules {
// @codingStandardsIgnoreEnd
/**
@ -53,7 +53,7 @@ class modDataPolicies extends DolibarrModules {
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
$this->numero = 4100;
// Key text used to identify module (for permissions, menus, etc...)
$this->rights_class = 'datapolicies';
$this->rights_class = 'datapolicy';
// Family can be 'base' (core modules),'crm','financial','hr','projects','products','ecm','technic' (transverse modules),'interface' (link with external tools),'other','...'
// It is used to group modules by family in module setup page
@ -62,16 +62,16 @@ class modDataPolicies extends DolibarrModules {
$this->module_position = '70';
// Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this)
//$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily")));
// Module label (no space allowed), used if translation string 'ModuledatapoliciesName' not found (MyModue is name of module).
// Module label (no space allowed), used if translation string 'ModuledatapolicyName' not found (MyModue is name of module).
$this->name = preg_replace('/^mod/i', '', get_class($this));
// Module description, used if translation string 'ModuledatapoliciesDesc' not found (MyModue is name of module).
$this->description = "Module to manage Data policies (for compliance with GDPR in Europe or other Data policies rules)";
// Module description, used if translation string 'ModuledatapolicyDesc' not found (MyModue is name of module).
$this->description = "Module to manage Data policy (for compliance with GDPR in Europe or other Data policy rules)";
// Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "";
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = 'development';
// Key used in llx_const table to save module status enabled/disabled (where datapolicies is value of property name of module in uppercase)
// Key used in llx_const table to save module status enabled/disabled (where datapolicy is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
// Name of image file used for this module.
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
@ -79,9 +79,9 @@ class modDataPolicies extends DolibarrModules {
$this->picto = 'generic';
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
// for default path (eg: /datapolicies/core/xxxxx) (0=disable, 1=enable)
// for specific path of parts (eg: /datapolicies/core/modules/barcode)
// for specific css file (eg: /datapolicies/css/datapolicies.css.php)
// for default path (eg: /datapolicy/core/xxxxx) (0=disable, 1=enable)
// for specific path of parts (eg: /datapolicy/core/modules/barcode)
// for specific css file (eg: /datapolicy/css/datapolicy.css.php)
$this->module_parts = array(
'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
'login' => 0, // Set this to 1 if module has its own login method file (core/login)
@ -95,41 +95,41 @@ class modDataPolicies extends DolibarrModules {
);
// Data directories to create when module is enabled.
// Example: this->dirs = array("/datapolicies/temp","/datapolicies/subdir");
$this->dirs = array("/datapolicies/temp");
// Example: this->dirs = array("/datapolicy/temp","/datapolicy/subdir");
$this->dirs = array("/datapolicy/temp");
// Config pages. Put here list of php page, stored into datapolicies/admin directory, to use to setup module.
$this->config_page_url = array("setup.php@datapolicies");
// Config pages. Put here list of php page, stored into datapolicy/admin directory, to use to setup module.
$this->config_page_url = array("setup.php@datapolicy");
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->langfiles = array("datapolicies@datapolicies");
$this->langfiles = array("datapolicy@datapolicy");
$this->phpmin = array(5, 3); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(4, 0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
//$this->automatic_activation = array('FR'=>'datapoliciesWasAutomaticallyActivatedBecauseOfYourCountryChoice');
//$this->automatic_activation = array('FR'=>'datapolicyWasAutomaticallyActivatedBecauseOfYourCountryChoice');
//$this->always_enabled = true; // If true, can't be disabled
// Constants
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
// Example: $this->const=array(0=>array('datapolicies_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
// 1=>array('datapolicies_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
// Example: $this->const=array(0=>array('datapolicy_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
// 1=>array('datapolicy_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
// );
$this->const = array(
array('DATAPOLICIES_TIERS_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_TIERS_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_TIERS_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_TIERS_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_CONTACT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_CONTACT_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_CONTACT_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_CONTACT_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICIES_ADHERENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_TIERS_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_TIERS_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_TIERS_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_TIERS_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_TIERS_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_CONTACT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_CONTACT_PROSPECT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_CONTACT_PROSPECT_CLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_CONTACT_FOURNISSEUR', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
array('DATAPOLICY_ADHERENT', 'chaine', '', $langs->trans('NUMBER_MONTH_BEFORE_DELETION'), 0),
);
$country = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY);
@ -140,17 +140,17 @@ class modDataPolicies extends DolibarrModules {
'fr_FR:ParentCompany'=>'Maison mère ou revendeur'
) */
if (!isset($conf->datapolicies) || !isset($conf->datapolicies->enabled)) {
$conf->datapolicies = new stdClass();
$conf->datapolicies->enabled = 0;
if (!isset($conf->datapolicy) || !isset($conf->datapolicy->enabled)) {
$conf->datapolicy = new stdClass();
$conf->datapolicy->enabled = 0;
}
// Array to add new pages in new tabs
$this->tabs = array();
// Example:
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@datapolicies:$user->rights->datapolicies->read:/datapolicies/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@datapolicies:$user->rights->othermodule->read:/datapolicies/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@datapolicy:$user->rights->datapolicy->read:/datapolicy/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@datapolicy:$user->rights->othermodule->read:/datapolicy/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
//
// Where objecttype can be
@ -177,7 +177,7 @@ class modDataPolicies extends DolibarrModules {
$this->dictionaries = array();
/* Example:
$this->dictionaries=array(
'langs'=>'mylangfile@datapolicies',
'langs'=>'mylangfile@datapolicy',
'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor
'tablib'=>array("Table1","Table2","Table3"), // Label of tables
'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields
@ -186,21 +186,21 @@ class modDataPolicies extends DolibarrModules {
'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record)
'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert)
'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid')
'tabcond'=>array($conf->datapolicies->enabled,$conf->datapolicies->enabled,$conf->datapolicies->enabled) // Condition to show each dictionary
'tabcond'=>array($conf->datapolicy->enabled,$conf->datapolicy->enabled,$conf->datapolicy->enabled) // Condition to show each dictionary
);
*/
// Boxes/Widgets
// Add here list of php file(s) stored in datapolicies/core/boxes that contains class to show a widget.
// Add here list of php file(s) stored in datapolicy/core/boxes that contains class to show a widget.
$this->boxes = array();
// Cronjobs (List of cron jobs entries to add when module is enabled)
// unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week
$this->cronjobs = array(
0 => array('label' => 'DATAPOLICIES Cron', 'jobtype' => 'method', 'class' => '/datapolicies/class/datapoliciesCron.class.php', 'objectname' => 'RgpdCron', 'method' => 'exec', 'parameters' => '', 'comment' => 'Comment', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 1, 'test' => true),
1 => array('label' => 'DATAPOLICIES Mailing', 'jobtype' => 'method', 'class' => '/datapolicies/class/datapoliciesCron.class.php', 'objectname' => 'RgpdCron', 'method' => 'sendMailing', 'parameters' => '', 'comment' => 'Comment', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 0, 'test' => true)
0 => array('label' => 'DATAPOLICY Cron', 'jobtype' => 'method', 'class' => '/datapolicy/class/datapolicyCron.class.php', 'objectname' => 'RgpdCron', 'method' => 'exec', 'parameters' => '', 'comment' => 'Comment', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 1, 'test' => true),
1 => array('label' => 'DATAPOLICY Mailing', 'jobtype' => 'method', 'class' => '/datapolicy/class/datapolicyCron.class.php', 'objectname' => 'RgpdCron', 'method' => 'sendMailing', 'parameters' => '', 'comment' => 'Comment', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 0, 'test' => true)
);
// Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true),
// 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>true)
@ -224,7 +224,7 @@ class modDataPolicies extends DolibarrModules {
{
global $langs;
$this->_load_tables('/datapolicies/sql/');
$this->_load_tables('/datapolicy/sql/');
// Create extrafields
include_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
@ -232,28 +232,28 @@ class modDataPolicies extends DolibarrModules {
// Extrafield contact
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'thirdparty', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0);
//$result1=$extrafields->addExtraField('datapolicy_separate', "DATAPOLICY_BLOCKCHECKBOX", 'separate', 100, 1, 'thirdparty', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'thirdparty', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'thirdparty', 0, 0, '', '', 0, '', '0', 0);
// Extrafield Tiers
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'contact', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0);
//$result1=$extrafields->addExtraField('datapolicy_separate', "DATAPOLICY_BLOCKCHECKBOX", 'separate', 100, 1, 'contact', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'contact', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'contact', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'contact', 0, 0, '', '', 0, '', '0', 0);
// Extrafield Adherent
//$result1=$extrafields->addExtraField('datapolicies_separate', "DATAPOLICIES_BLOCKCHECKBOX", 'separate', 100, 1, 'adherent', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_consentement', $langs->trans("DATAPOLICIES_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_traitement', $langs->trans("DATAPOLICIES_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_opposition_prospection', $langs->trans("DATAPOLICIES_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicies@datapolicies', '$conf->datapolicies->enabled');
$result1 = $extrafields->addExtraField('datapolicies_date', $langs->trans("DATAPOLICIES_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicies_send', $langs->trans("DATAPOLICIES_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0);
//$result1=$extrafields->addExtraField('datapolicy_separate', "DATAPOLICY_BLOCKCHECKBOX", 'separate', 100, 1, 'adherent', 0, 0, '', '', 1, '', '1', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_consentement', $langs->trans("DATAPOLICY_consentement"), 'boolean', 101, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_traitement', $langs->trans("DATAPOLICY_opposition_traitement"), 'boolean', 102, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_opposition_prospection', $langs->trans("DATAPOLICY_opposition_prospection"), 'boolean', 103, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0, '', '', 'datapolicy@datapolicy', '$conf->datapolicy->enabled');
$result1 = $extrafields->addExtraField('datapolicy_date', $langs->trans("DATAPOLICY_date"), 'date', 104, 3, 'adherent', 0, 0, '', '', 1, '', '3', 0);
$result1 = $extrafields->addExtraField('datapolicy_send', $langs->trans("DATAPOLICY_send"), 'date', 105, 3, 'adherent', 0, 0, '', '', 0, '', '0', 0);
$sql = array();

View File

@ -1,93 +0,0 @@
# Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Module label 'ModulergpdName'
ModulergpdName = GDPR
# Module description 'ModulergpdDesc'
ModulergpdDesc = Conformity with the GDPR
#
# Page d'administration
#
rgpdSetup = Module Setup
Settings_DATAPOLICIES = Settings of DATAPOLICIES module
rgpdSetupPage = According to <a href="http://www.privacy-regulation.eu/en/5.htm" target="_blank">Article 5</a> of the GDPR, personal data must be kept for a period not exceeding that necessary for the purposes for which they were processed, except for archival purposes.
The deletion will be done automatically after a certain duration without event (the duration which you will have indicated below).
NB_MONTHS = %s months
ONE_YEAR = 1 year
NB_YEARS = %s years
DATAPOLICIES_TIERS_CLIENT = Customer
DATAPOLICIES_TIERS_PROSPECT = Prospect
DATAPOLICIES_TIERS_PROSPECT_CLIENT = Prospect/Customer
DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT = Nor prospect/Nor customer
DATAPOLICIES_TIERS_FOURNISSEUR = Supplier
DATAPOLICIES_CONTACT_CLIENT = Customer
DATAPOLICIES_CONTACT_PROSPECT = Prospect
DATAPOLICIES_CONTACT_PROSPECT_CLIENT = Prospect/Customer
DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT = Nor prospect/Nor customer
DATAPOLICIES_CONTACT_FOURNISSEUR = Supplier
DATAPOLICIES_ADHERENT = Member
DATAPOLICIES_Tooltip_SETUP = Type of contact - Indicate your choices for each type.
DATAPOLICIESMail=Emails Setup
DATAPOLICIESSUBJECTMAIL=Subject of email
DATAPOLICIESCONTENTMAIL=Content of the email
DATAPOLICIESSUBSITUTION=You can use the following variables in your email (LINKACCEPT allows to create a link recording the agreement of the person, LINKREFUSED makes it possible to record the refusal of the person):
DATAPOLICIESACCEPT=Message after agreement
DATAPOLICIESREFUSE=Message after desagreement
SendAgreementText=You can send a GDPR email to all your relevant contacts (who have not yet received an email and for which you have not registered anything about their GDPR agreement). To do this, use the following button.
SendAgreement=Send emails
AllAgreementSend = All emails have been sent
TXTLINKDATAPOLICIESACCEPT= Text for the link "agreement"
TXTLINKDATAPOLICIESREFUSE= Text for the link "desagreement"
#
# Extrafield
#
DATAPOLICIES_BLOCKCHECKBOX = GDPR : Processing of personal data
DATAPOLICIES_consentement = Consent obtained for the processing of personal data
DATAPOLICIES_opposition_traitement = Opposes the processing of his personal data
DATAPOLICIES_opposition_prospection = Opposes the processing of his personal data for the purposes of prospecting
#
# Popup
#
DATAPOLICIES_POPUP_ANONYME_TITLE = Anonymize a thirdparty
DATAPOLICIES_POPUP_ANONYME_TEXTE = You can not delete this contact from Dolibarr because there are related items. In accordance with the GDPR, you will make all this data anonymous to respect your obligations. Would you like to continue ?
#
# Bouton portabilité
#
DATAPOLICIES_PORTABILITE = Portability GDPR
DATAPOLICIES_PORTABILITE_TITLE = Export of personal data
DATAPOLICIES_PORTABILITE_CONFIRMATION = You want to export the personal data of this contact. Are you sure ?
#
# Note ajoutés lors d'une anonymisation
#
ANONYMISER_AT = Anonymised the %s
#V2
DATAPOLICIESReturn=GDPR Validation
DATAPOLICIES_date = Date of agreement/desagreement GDPR
DATAPOLICIES_send = Date sending agreement email
DATAPOLICIESReturn = GDPR Return
DATAPOLICIES_SEND = Send GDPR email
MailSent = Email has been sent
#ERROR
ErrorSubjectIsRequired= Error : The subject of email is required. Indicate it in the module setup
=Due to a technical problem, we were unable to register your choice. We apologize for that. Contact us to send us your choice.
NUMBER_MONTH_BEFORE_DELETION = Number of month before deletion

View File

@ -1,97 +0,0 @@
# Copyright (C) 2018 INOVEA CONSEil info@inovea-conseil.com
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Générique
#
# Module label 'ModulergpdName'
ModulergpdName = DATAPOLICIES
# Module description 'ModulergpdDesc'
Module432452Desc = Module de mise en conformité avec le DATAPOLICIES
#
# Page d'administration
#
rgpdSetup = Configuration du module DATAPOLICIES
Settings_DATAPOLICIES = Paramétrage du module DATAPOLICIES
rgpdSetupPage = Selon <a href="http://www.privacy-regulation.eu/fr/5.htm" target="_blank">larticle 5</a> du DATAPOLICIES, les données à caractère personnel doivent être conservées pendant une durée nexcédant pas celle nécessaire au regard des finalités pour lesquelles elles ont été traitées, à lexception de fins archivistiques. La suppression se fera automatiquement après une certaine durée sans évènement (la durée que vous aurez indiquée ci-dessous).
NB_MONTHS = %s mois
ONE_YEAR = 1 an
NB_YEARS = %s ans
DATAPOLICIES_TIERS_CLIENT = Client
DATAPOLICIES_TIERS_PROSPECT = Prospect
DATAPOLICIES_TIERS_PROSPECT_CLIENT = Prospect/Client
DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT = Ni prospect / Ni client
DATAPOLICIES_TIERS_FOURNISSEUR = Fournisseur
DATAPOLICIES_CONTACT_CLIENT = Client
DATAPOLICIES_CONTACT_PROSPECT = Prospect
DATAPOLICIES_CONTACT_PROSPECT_CLIENT = Prospect/Client
DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT = Ni prospect / Ni client
DATAPOLICIES_CONTACT_FOURNISSEUR = Fournisseur
DATAPOLICIES_ADHERENT = Adhérent
DATAPOLICIES_Tooltip_SETUP = Type du contact - Indiquez vos choix pour chaque type.
DATAPOLICIESMail=Paramétrage des emails
DATAPOLICIESSUBJECTMAIL=Objet du mail
DATAPOLICIESCONTENTMAIL=Contenu du mail
DATAPOLICIESSUBSITUTION=Vous pouvez utiliser les variables suivantes dans votre email (LINKACCEPT permet de créer un lien enregistrant l'acceptation de la personne, LINKREFUSED permet d'enregistrer le refus de la personne) :
DATAPOLICIESACCEPT=Message suite acceptation
DATAPOLICIESREFUSE=Message suite opposition
SendAgreementText=Vous pouvez envoyer un email DATAPOLICIES à tous vos contacts concernés (qui n'ont pas encore reçus de mail et pour lesquels vous n'avez rien enregistré concernant leur accord/désaccord DATAPOLICIES). Pour cela, utilisez le bouton suivant.
SendAgreement=Envoyer les emails
AllAgreementSend = Tous les e-mails de consentement ont été envoyés
TXTLINKDATAPOLICIESACCEPT= Texte du lien d'acceptation
TXTLINKDATAPOLICIESREFUSE= Texte du lien d'opposition
#
# Extrafield
#
DATAPOLICIES_BLOCKCHECKBOX = DATAPOLICIES : Traitement des données à caractère personnel
DATAPOLICIES_consentement = Consentement recueilli pour le traitement des données à caractère personnel le concernant
DATAPOLICIES_opposition_traitement = Soppose au traitement de ses données à caractère personnel
DATAPOLICIES_opposition_prospection = Soppose au traitement de ses données à caractère personnel à des fins de prospection
#
# Popup
#
DATAPOLICIES_POPUP_ANONYME_TITLE = Anonymiser un tiers
DATAPOLICIES_POPUP_ANONYME_TEXTE = Vous ne pouvez pas supprimer ce contact de Dolibarr car des éléments y sont liés. Conformément au DATAPOLICIES, vous allez rendre toutes ces données anonymes afin de respecter vos obligations. Souhaitez-vous continuer ?
#
# Bouton portabilité
#
DATAPOLICIES_PORTABILITE = Portabilité DATAPOLICIES
DATAPOLICIES_PORTABILITE_TITLE = Export des données à caractère personnel
DATAPOLICIES_PORTABILITE_CONFIRMATION = Vous souhaitez exporter les données à caractère personnel de ce contact. Etes-vous sûr ?
#
# Note ajoutés lors d'une anonymisation
#
ANONYMISER_AT = Anonymisé le %s
#V2
DATAPOLICIESReturn=Validation DATAPOLICIES
DATAPOLICIES_date=Date d'accord/opposition au traitement
DATAPOLICIES_send=Date envoi consentement
DATAPOLICIESReturn=Retour DATAPOLICIES
DATAPOLICIES_SEND=Envoyer l'email de consentement
MailSent=L'email a bien été envoyé
#ERROR
ErrorSubjectIsRequired=Erreur : vous n'avez pas indiqué l'objet de l'email dans la configuration
=Suite à un problème technique, nous n'avons pas pu enregistrer votre choix. Nous nous en excusons. Contactez-nous pour nous transmettre votre choix.
NUMBER_MONTH_BEFORE_DELETION = Nombre de mois avant suppression des données

View File

@ -1,80 +0,0 @@
# Copyright (C) 2018 INOVEA CONSEIl info@inovea-conseil.com - Thanks to Claudio Aschieri
#
# # Module label 'ModulergpdName'
ModulergpdName = GDPR
# Module description 'ModulergpdDesc'
ModulergpdDesc = Conformità con GDPR
Module432452Name=GDPR
Module432452Desc=Conformità con GDPR (Regolamento Generale sulla protezione di dati)
#
# Page d'administration
#
rgpdSetup = Module Setup
Settings_DATAPOLICIES = Configurazione modulo GDPR
rgpdSetupPage = In accordo con <a href="http://www.privacy-regulation.eu/it/5.htm" target="_blank">l'art 5 del GDPR </a> i dati personali devono essere conservati per un periodo di tempo che .... ed eliminati se non sono più utili agli scopi per cui sono stati processati.
NB_MONTHS = %s mesi
ONE_YEAR = 1 anno
NB_YEARS = %s anni
DATAPOLICIES_TIERS_CLIENT = Cliente
DATAPOLICIES_TIERS_PROSPECT = Fornitore
DATAPOLICIES_TIERS_PROSPECT_CLIENT = Potenziale Cliente / Cliente
DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT = Nè potenziale cliente / Nè cliente
DATAPOLICIES_TIERS_FOURNISSEUR = Fornitore
DATAPOLICIES_CONTACT_CLIENT = Cliente
DATAPOLICIES_CONTACT_PROSPECT = Potenziale cliente
DATAPOLICIES_CONTACT_PROSPECT_CLIENT = Potenziale Cliente / Cliente
DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT = Nè potenziale cliente / Nè cliente
DATAPOLICIES_CONTACT_FOURNISSEUR = Fornitore
DATAPOLICIES_ADHERENT = Membri
DATAPOLICIES_Tooltip_SETUP = Tipo di contatto - Indica la scelta per ogni tipologia
DATAPOLICIESMail=Configurazione Email
DATAPOLICIESSUBJECTMAIL=Subject dell'e-mail
DATAPOLICIESCONTENTMAIL=Contenuto dell'e-mail
DATAPOLICIESSUBSITUTION=Puoi utilizzare le seguenti variabili nella tua email (LINKACCEPT consente di creare un link per registrare l'accettazione della persona, LINKREFUSED consente di registrare il rifiuto della persona):
DATAPOLICIESACCEPT= Messaggio dopo il consenso
DATAPOLICIESREFUSE=Messaggio dopo il rifiuto
SendAgreementText=Puoi inviare un'email GDPR a tutti i tuoi contatti rilevanti (che non hanno ancora ricevuto un'e-mail e per i quali non hai registrato nulla sul loro accordo GDPR). Per fare ciò, utilizzare il seguente pulsante.
SendAgreement=Invia emails
AllAgreementSend = Tutte le email sono state inviate
TXTLINKDATAPOLICIESACCEPT= Testo per il link "Consenso"
TXTLINKDATAPOLICIESREFUSE= Testo per il link "Consenso negato"
#
# Extrafield
#
DATAPOLICIES_BLOCKCHECKBOX = GDPR : Trattamento dei dati personali
DATAPOLICIES_consentement = Consenso ottenuto al Trattamento dei dati personali
DATAPOLICIES_opposition_traitement = Consenso negato al trattamento dei dati personali
DATAPOLICIES_opposition_prospection = Consenso negato al trattamento dei dati personali a fini commerciali
#
# Popup
#
DATAPOLICIES_POPUP_ANONYME_TITLE = Anonimizza un soggetto terzo
DATAPOLICIES_POPUP_ANONYME_TEXTE = Impossibile eliminare questo contatto da Dolibarr perchè vi sono elementi collegati. In conformità con il GDPR, renderai tutti questi dati anonimi per rispettare i tuoi obblighi. Vuoi continuare?
#
# Bouton portabilité
#
DATAPOLICIES_PORTABILITE = Portabilità GDPR
DATAPOLICIES_PORTABILITE_TITLE = Esporta i dati personali
DATAPOLICIES_PORTABILITE_CONFIRMATION = Vuoi davvero esportare i dati personali di questo contatto?
#
# Note ajoutée lors d'une anonymisation
#
ANONYMISER_AT = Anonimizzato il %s
#V2
DATAPOLICIESReturn=GDPR Validazione
DATAPOLICIES_date = Data di accordo / disaccordo GDPR
DATAPOLICIES_send = Data di invio del consenso (e-mail)
DATAPOLICIESReturn = GDPR ritorno
DATAPOLICIES_SEND = Inviare GDPR e-mail
MailSent=L'email è stata inviata
#ERROR
ErrorSubjectIsRequired= Errore: L'oggetto della mail è obbligatorio. Inserisci l'oggetto nella configurazione del modulo.
=A causa di un problema tecnico, non siamo stati in grado di registrare la tua scelta. Ci scusiamo per questo. Contattaci per inviarci la tua scelta.

View File

@ -17,21 +17,21 @@
*/
/**
* \file datapolicies/admin/setup.php
* \ingroup datapolicies
* \brief datapolicies setup page.
* \file datapolicy/admin/setup.php
* \ingroup datapolicy
* \brief datapolicy setup page.
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
require_once '../lib/datapolicies.lib.php';
require_once '../lib/datapolicy.lib.php';
//require_once "../class/myclass.class.php";
// Translations
$langs->load('admin');
$langs->load('companies');
$langs->load('members');
$langs->load('datapolicies@datapolicies');
$langs->load('datapolicy@datapolicy');
// Access control
if (! $user->admin) accessforbidden();
@ -41,17 +41,17 @@ $action = GETPOST('action', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$arrayofparameters=array(
'DATAPOLICIES_TIERS_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICIES_ADHERENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICY_ADHERENT'=>array('css'=>'minwidth200'),
);
@ -81,26 +81,26 @@ if (DOL_VERSION < '7' && $action == 'update') {
$arrayofparameters=array(
'ThirdParty' => array(
'DATAPOLICIES_TIERS_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_TIERS_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_TIERS_FOURNISSEUR'=>array('css'=>'minwidth200'),
),
'Contact' => array(
'DATAPOLICIES_CONTACT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICIES_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_PROSPECT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_PROSPECT_CLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200'),
),
'Member' => array(
'DATAPOLICIES_ADHERENT'=>array('css'=>'minwidth200'),
'DATAPOLICY_ADHERENT'=>array('css'=>'minwidth200'),
)
);
$valTab = array(
'' => $langs->trans('None'),
'' => $langs->trans('Never'),
'6' => $langs->trans('NB_MONTHS', 6),
'12' => $langs->trans('ONE_YEAR'),
'24' => $langs->trans('NB_YEARS', 2),
@ -108,6 +108,8 @@ $valTab = array(
'48' => $langs->trans('NB_YEARS', 4),
'60' => $langs->trans('NB_YEARS', 5),
'120' => $langs->trans('NB_YEARS', 10),
'180' => $langs->trans('NB_YEARS', 15),
'240' => $langs->trans('NB_YEARS', 20),
);
@ -115,20 +117,20 @@ $valTab = array(
* View
*/
$page_name = "datapoliciesSetup";
$page_name = "datapolicySetup";
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="'.($backtopage?$backtopage:DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_datapolicies@datapolicies');
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_datapolicy@datapolicy');
// Configuration header
$head = datapoliciesAdminPrepareHead();
dol_fiche_head($head, 'settings', '', -1, "datapolicies@datapolicies");
$head = datapolicyAdminPrepareHead();
dol_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy");
// Setup page goes here
echo $langs->trans("datapoliciesSetupPage");
echo '<span class="opacitymedium">'.$langs->trans("datapolicySetupPage").'</span><br><br>';
if ($action == 'edit')
@ -180,7 +182,7 @@ else
foreach($tab as $key => $val)
{
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans($key),$langs->trans('DATAPOLICIES_Tooltip_SETUP'));
print $form->textwithpicto($langs->trans($key),$langs->trans('DATAPOLICY_Tooltip_SETUP'));
print '</td><td>' . ($conf->global->$key == '' ? $langs->trans('None') : $valTab[$conf->global->$key]) . '</td></tr>';
}

View File

@ -22,10 +22,10 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
require_once '../lib/datapolicies.lib.php';
require_once '../lib/datapolicy.lib.php';
// Translations
$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicies'));
$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy'));
// Parameters
@ -78,17 +78,17 @@ if ($action == 'setvalue' && $user->admin) {
* View
*/
$page_name = "datapoliciesSetup";
$page_name = "datapolicySetup";
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_datapolicies@datapolicies');
print load_fiche_titre($langs->trans($page_name), $linkback, 'object_datapolicy@datapolicy');
// Configuration header
$head = datapoliciesAdminPrepareHead();
dol_fiche_head($head, 'settings', '', -1, "datapolicies@datapolicies");
$head = datapolicyAdminPrepareHead();
dol_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy");
@ -161,7 +161,7 @@ dol_fiche_end();
print '<br><br>';
print $langs->trans('SendAgreementText');
print '<a class="button" href="'.dol_buildpath('/datapolicies/mailing.php').'">'.$langs->trans('SendAgreement').'</a>';
print '<a class="button" href="'.dol_buildpath('/datapolicy/mailing.php').'">'.$langs->trans('SendAgreement').'</a>';
llxFooter();
$db->close();

View File

@ -17,15 +17,15 @@
*/
/**
* \file datapolicies/class/actions_datapolicies.class.php
* \ingroup datapolicies
* \file datapolicy/class/actions_datapolicy.class.php
* \ingroup datapolicy
* \brief Example hook overload.
*/
/**
* Class ActionsDatapolicies
* Class ActionsDatapolicy
*/
class ActionsDatapolicies
class ActionsDatapolicy
{
/**
* @var DoliDB Database handler.
@ -91,7 +91,7 @@ class ActionsDatapolicies
public function doActions($parameters, &$object, &$action, $hookmanager)
{
global $conf, $user, $langs;
$langs->load('datapolicies@datapolicies');
$langs->load('datapolicy@datapolicy');
$error = 0; // Error counter
if (GETPOST('socid') && $parameters['currentcontext'] == 'thirdpartycard') {
@ -129,9 +129,9 @@ class ActionsDatapolicies
header('Location:' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id);
}
}
} elseif ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'datapolicies_portabilite') {
} elseif ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'datapolicy_portabilite') {
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv');
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
header('Pragma: no-cache');
$object->fetch(GETPOST('socid'));
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL;
@ -152,9 +152,9 @@ class ActionsDatapolicies
echo $object->skype . ';';
echo ';';
exit;
} elseif ($parameters['currentcontext'] == 'membercard' && $action == 'datapolicies_portabilite') {
} elseif ($parameters['currentcontext'] == 'membercard' && $action == 'datapolicy_portabilite') {
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv');
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
header('Pragma: no-cache');
$soc = $object->fetch_thirdparty();
@ -176,10 +176,10 @@ class ActionsDatapolicies
echo $object->skype . ';';
echo dol_print_date($object->birth) . ';';
exit;
} elseif ($parameters['currentcontext'] == 'contactcard' && $action == 'datapolicies_portabilite') {
} elseif ($parameters['currentcontext'] == 'contactcard' && $action == 'datapolicy_portabilite') {
$object->fetch(GETPOST('id'));
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=datapolicies_portabilite.csv');
header('Content-Disposition: attachment; filename=datapolicy_portabilite.csv');
header('Pragma: no-cache');
$soc = $object->fetch_thirdparty();
echo 'Name;Fistname;Civility;Thirdparty;Function;Address;ZipCode;City;Department;Country;Email;Pro Phone;Perso Phone;Mobile Phone;Instant Mail;Birthday;' . PHP_EOL;
@ -200,23 +200,23 @@ class ActionsDatapolicies
echo $object->jabberid . ';';
echo dol_print_date($object->birth) . ';';
exit;
} elseif ($parameters['currentcontext'] == 'contactcard' && $action == 'send_datapolicies') {
} elseif ($parameters['currentcontext'] == 'contactcard' && $action == 'send_datapolicy') {
$object->fetch(GETPOST('id'));
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
DataPolicies::sendMailDataPoliciesContact($object);
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
DataPolicy::sendMailDataPolicyContact($object);
}
elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicies') {
elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicy') {
$object->fetch(GETPOST('id'));
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
DataPolicies::sendMailDataPoliciesAdherent($object);
} elseif ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'send_datapolicies') {
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
DataPolicy::sendMailDataPolicyAdherent($object);
} elseif ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'send_datapolicy') {
$object->fetch(GETPOST('socid'));
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
DataPolicies::sendMailDataPoliciesCompany($object);
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
DataPolicy::sendMailDataPolicyCompany($object);
}
@ -280,7 +280,7 @@ class ActionsDatapolicies
/* print_r($parameters); print_r($object); echo "action: " . $action; */
if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2'
$this->resprints = '<option value="0"' . ($disabled ? ' disabled="disabled"' : '') . '>' . $langs->trans("datapoliciesMassAction") . '</option>';
$this->resprints = '<option value="0"' . ($disabled ? ' disabled="disabled"' : '') . '>' . $langs->trans("datapolicyMassAction") . '</option>';
}
if (!$error) {
@ -361,18 +361,18 @@ class ActionsDatapolicies
function addMoreActionsButtons($parameters, &$object, &$action, $hookmanager)
{
global $conf, $user, $langs;
$langs->load('datapolicies@datapolicies');
$langs->load('datapolicy@datapolicy');
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
{
$dialog = '<div id="dialogdatapolicies" style="display:none;" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">';
$dialog = '<div id="dialogdatapolicy" style="display:none;" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">';
$dialog .= '<div class="confirmmessage">' . img_help('', '') . ' ' . $langs->trans('DATAPOLICIES_PORTABILITE_CONFIRMATION') . '</div>';
$dialog .= "</div>";
$dialog .= '<script>
$( function() {
$("#rpgpdbtn").on("click", function(){
var href = $(this).attr("href");
$( "#dialogdatapolicies" ).dialog({
$( "#dialogdatapolicy" ).dialog({
modal: true,
buttons: {
"OK": function() {
@ -392,18 +392,18 @@ class ActionsDatapolicies
</script>';
echo $dialog;
if ($parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
} elseif ($parameters['currentcontext'] == 'membercard') {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
} elseif ($parameters['currentcontext'] == 'contactcard') {
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=datapolicy_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
}
if (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=send_datapolicies" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'membercard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=send_datapolicies" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'contactcard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=send_datapolicies" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
if (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'membercard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicy_send']) && $parameters['currentcontext'] == 'contactcard') {
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=send_datapolicy" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
}
}
}
@ -425,11 +425,11 @@ class ActionsDatapolicies
if ($parameters['currentcontext'] == 'thirdpartycard') {
if (GETPOST('action') == 'create' || GETPOST('action') == 'edit' || GETPOST('action') == '') {
$jsscript .= '<script>';
$jsscript .= "var elementToHide = 'tr.societe_extras_datapolicies_consentement, tr.societe_extras_datapolicies_opposition_traitement, tr.societe_extras_datapolicies_opposition_prospection';" . PHP_EOL;
$jsscript .= "var elementToHide = 'tr.societe_extras_datapolicy_consentement, tr.societe_extras_datapolicy_opposition_traitement, tr.societe_extras_datapolicy_opposition_prospection';" . PHP_EOL;
$jsscript .= "var forme_juridique = [" . PHP_EOL;
$jsscript .= "11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005" . PHP_EOL;
$jsscript .= "];" . PHP_EOL;
$jsscript .= "function hideRgPD() { if ($('#typent_id').val() == 8 || forme_juridique.indexOf(parseInt($('#forme_juridique_code').val())) > -1) { console.log(elementToHide); $('tr.societe_extras_datapolicies_consentement, tr.societe_extras_datapolicies_opposition_traitement, tr.societe_extras_datapolicies_opposition_prospection').show(); } else { $('tr.societe_extras_datapolicies_consentement, tr.societe_extras_datapolicies_opposition_traitement, tr.societe_extras_datapolicies_opposition_prospection').hide(); }}" . PHP_EOL;
$jsscript .= "function hideRgPD() { if ($('#typent_id').val() == 8 || forme_juridique.indexOf(parseInt($('#forme_juridique_code').val())) > -1) { console.log(elementToHide); $('tr.societe_extras_datapolicy_consentement, tr.societe_extras_datapolicy_opposition_traitement, tr.societe_extras_datapolicy_opposition_prospection').show(); } else { $('tr.societe_extras_datapolicy_consentement, tr.societe_extras_datapolicy_opposition_traitement, tr.societe_extras_datapolicy_opposition_prospection').hide(); }}" . PHP_EOL;
$jsscript .= "hideRgPD();" . PHP_EOL;
$jsscript .= "$('#forme_juridique_code, #typent_id').change(function(){ hideRgPD(); });" . PHP_EOL;
$jsscript .= '</script>';
@ -457,7 +457,7 @@ class ActionsDatapolicies
require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
$jsscript .= '<script>';
$jsscript .= "var elementToHide = 'td.societe_extras_datapolicies_opposition_traitement, td.societe_extras_datapolicies_opposition_prospection, td.societe_extras_datapolicies_consentement';" . PHP_EOL;
$jsscript .= "var elementToHide = 'td.societe_extras_datapolicy_opposition_traitement, td.societe_extras_datapolicy_opposition_prospection, td.societe_extras_datapolicy_consentement';" . PHP_EOL;
$jsscript .= "$(elementToHide).parent('tr').hide();" . PHP_EOL;
$jsscript .= '</script>';
}
@ -465,8 +465,8 @@ class ActionsDatapolicies
} elseif ($parameters['currentcontext'] == 'contactcard') {
if (GETPOST('action') == 'create' || GETPOST('action') == 'edit') {
$jsscript .= '<script>';
$jsscript .= "$('#options_datapolicies_opposition_traitement, #options_datapolicies_opposition_prospection, input[name=\"options_datapolicies_opposition_traitement\"], input[name=\"options_datapolicies_opposition_prospection\"]').change(function(){
if($('#options_datapolicies_opposition_traitement').prop('checked') == true || $('input[name=options_datapolicies_opposition_traitement]').prop('checked') || $('#options_datapolicies_opposition_prospection').prop('checked') || $('input[name=options_datapolicies_opposition_prospection]').prop('checked')) {
$jsscript .= "$('#options_datapolicy_opposition_traitement, #options_datapolicy_opposition_prospection, input[name=\"options_datapolicy_opposition_traitement\"], input[name=\"options_datapolicy_opposition_prospection\"]').change(function(){
if($('#options_datapolicy_opposition_traitement').prop('checked') == true || $('input[name=options_datapolicy_opposition_traitement]').prop('checked') || $('#options_datapolicy_opposition_prospection').prop('checked') || $('input[name=options_datapolicy_opposition_prospection]').prop('checked')) {
$('#no_email').val(1);
}
});";

View File

@ -16,9 +16,9 @@
*/
/**
* \file datapolicies/class/datapolicies.class.php
* \ingroup datapolicies
* \brief Class to manage feature of Data Policies module.
* \file datapolicy/class/datapolicy.class.php
* \ingroup datapolicy
* \brief Class to manage feature of Data Policy module.
*/
include_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
@ -26,9 +26,9 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
/**
* Class DataPolicies
* Class DataPolicy
*/
Class DataPolicies extends Contact
Class DataPolicy extends Contact
{
/**
* getAllContactNotInformed
@ -45,8 +45,8 @@ Class DataPolicies extends Contact
$sql .= " FROM " . MAIN_DB_PREFIX . "socpeople as c";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as s ON c.fk_soc = s.rowid";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "socpeople_extrafields as spe ON spe.fk_object = c.rowid";
$sql .= " WHERE (c.statut=1 AND c.no_email=0 AND (spe.datapolicies_consentement=0 OR spe.datapolicies_consentement IS NULL) AND (spe.datapolicies_opposition_traitement=0 OR spe.datapolicies_opposition_traitement IS NULL) AND (spe.datapolicies_opposition_prospection=0 OR spe.datapolicies_opposition_prospection IS NULL))";
$sql .= " AND spe.datapolicies_send IS NULL";
$sql .= " WHERE (c.statut=1 AND c.no_email=0 AND (spe.datapolicy_consentement=0 OR spe.datapolicy_consentement IS NULL) AND (spe.datapolicy_opposition_traitement=0 OR spe.datapolicy_opposition_traitement IS NULL) AND (spe.datapolicy_opposition_prospection=0 OR spe.datapolicy_opposition_prospection IS NULL))";
$sql .= " AND spe.datapolicy_send IS NULL";
$sql .= " AND c.entity=" . $conf->entity;
$resql = $this->db->query($sql);
if ($resql) {
@ -57,7 +57,7 @@ Class DataPolicies extends Contact
$contact = new Contact($db);
$contact->fetch($obj->rowid);
DataPolicies::sendMailDataPoliciesContact($contact);
DataPolicy::sendMailDataPolicyContact($contact);
$i++;
}
} else {
@ -80,8 +80,8 @@ Class DataPolicies extends Contact
$sql = "SELECT s.rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_extrafields as se ON se.fk_object = s.rowid";
$sql .= " WHERE s.statut=0 AND (se.datapolicies_consentement=0 OR se.datapolicies_consentement IS NULL) AND (se.datapolicies_opposition_traitement=0 OR se.datapolicies_opposition_traitement IS NULL) AND (se.datapolicies_opposition_prospection=0 OR se.datapolicies_opposition_prospection IS NULL)";
$sql .= " AND se.datapolicies_send IS NULL";
$sql .= " WHERE s.statut=0 AND (se.datapolicy_consentement=0 OR se.datapolicy_consentement IS NULL) AND (se.datapolicy_opposition_traitement=0 OR se.datapolicy_opposition_traitement IS NULL) AND (se.datapolicy_opposition_prospection=0 OR se.datapolicy_opposition_prospection IS NULL)";
$sql .= " AND se.datapolicy_send IS NULL";
$sql .= " AND s.entity=" . $conf->entity;
$resql = $this->db->query($sql);
if ($resql) {
@ -92,7 +92,7 @@ Class DataPolicies extends Contact
$societe = new Societe($db);
$societe->fetch($obj->rowid);
DataPolicies::sendMailDataPoliciesCompany($societe);
DataPolicy::sendMailDataPolicyCompany($societe);
$i++;
}
} else {
@ -115,8 +115,8 @@ Class DataPolicies extends Contact
$sql = "SELECT a.rowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "adherent as a";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "adherent_extrafields as ae ON ae.fk_object = a.rowid";
$sql .= " WHERE a.statut=0 AND (ae.datapolicies_consentement=0 OR ae.datapolicies_consentement IS NULL) AND (ae.datapolicies_opposition_traitement=0 OR ae.datapolicies_opposition_traitement IS NULL) AND (ae.datapolicies_opposition_prospection=0 OR ae.datapolicies_opposition_prospection IS NULL)";
$sql .= " AND ae.datapolicies_send IS NULL";
$sql .= " WHERE a.statut=0 AND (ae.datapolicy_consentement=0 OR ae.datapolicy_consentement IS NULL) AND (ae.datapolicy_opposition_traitement=0 OR ae.datapolicy_opposition_traitement IS NULL) AND (ae.datapolicy_opposition_prospection=0 OR ae.datapolicy_opposition_prospection IS NULL)";
$sql .= " AND ae.datapolicy_send IS NULL";
$sql .= " AND a.entity=" . $conf->entity;
$resql = $this->db->query($sql);
if ($resql) {
@ -127,7 +127,7 @@ Class DataPolicies extends Contact
$adherent = new Adherent($db);
$adherent->fetch($obj->rowid);
DataPolicies::sendMailDataPoliciesAdherent($adherent);
DataPolicy::sendMailDataPolicyAdherent($adherent);
$i++;
}
} else {
@ -137,12 +137,12 @@ Class DataPolicies extends Contact
}
/**
* sendMailDataPoliciesContact
* sendMailDataPolicyContact
*
* @param mixed $contact Contact
* @return void
*/
function sendMailDataPoliciesContact($contact)
function sendMailDataPolicyContact($contact)
{
global $langs, $conf, $db, $user;
@ -171,8 +171,8 @@ Class DataPolicies extends Contact
$deliveryreceipt = 0;
$substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$contact->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$contact->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&c='.$contact->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&c='.$contact->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
'__FIRSTNAME__' => $contact->firstname,
'__NAME__' => $contact->lastname,
'__CIVILITY__' => $contact->civility,
@ -202,7 +202,7 @@ Class DataPolicies extends Contact
if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$contact->array_options['options_datapolicies_send'] = date('Y-m-d', time());
$contact->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$contact->update($contact->id);
} else {
@ -213,12 +213,12 @@ Class DataPolicies extends Contact
}
/**
* sendMailDataPoliciesCompany
* sendMailDataPolicyCompany
*
* @param Societe $societe Object societe
* @return void
*/
function sendMailDataPoliciesCompany($societe)
function sendMailDataPolicyCompany($societe)
{
global $langs, $conf, $db, $user;
@ -248,8 +248,8 @@ Class DataPolicies extends Contact
$deliveryreceipt = 0;
$substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&s='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
);
$subject = make_substitutions($subject, $substitutionarray);
$message = make_substitutions($message, $substitutionarray);
@ -275,7 +275,7 @@ Class DataPolicies extends Contact
if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$societe->array_options['options_datapolicies_send'] = date('Y-m-d', time());
$societe->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$societe->update($societe->id);
} else {
dol_print_error($db);
@ -285,12 +285,12 @@ Class DataPolicies extends Contact
}
/**
* sendMailDataPoliciesAdherent
* sendMailDataPolicyAdherent
*
* @param Adherent $adherent Member
* @return void
*/
function sendMailDataPoliciesAdherent($adherent)
function sendMailDataPolicyAdherent($adherent)
{
global $langs, $conf, $db, $user;
@ -318,8 +318,8 @@ Class DataPolicies extends Contact
$deliveryreceipt = 0;
$substitutionarray = array(
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=2&a='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
);
$subject = make_substitutions($subject, $substitutionarray);
$message = make_substitutions($message, $substitutionarray);
@ -346,7 +346,7 @@ Class DataPolicies extends Contact
if (!$error) {
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
$adherent->array_options['options_datapolicies_send'] = date('Y-m-d', time());
$adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time());
$adherent->update($user);
} else {

View File

@ -17,15 +17,15 @@
*/
/**
* \file datapolicies/class/datapoliciescron.class.php
* \ingroup datapolicies
* \file datapolicy/class/datapolicycron.class.php
* \ingroup datapolicy
* \brief Example hook overload.
*/
/**
* Class DataPoliciesCron
* Class DataPolicyCron
*/
class DataPoliciesCron
class DataPolicyCron
{
/**
* Function exec
@ -36,7 +36,7 @@ class DataPoliciesCron
{
global $conf, $db, $langs, $user;
$langs->load('datapolicies@datapolicies');
$langs->load('datapolicy@datapolicy');
// FIXME Removed hardcoded values of id
$arrayofparameters=array(
@ -510,11 +510,11 @@ class DataPoliciesCron
{
global $conf, $db, $langs, $user;
$langs->load('datapolicies@datapolicies');
$langs->load('datapolicy@datapolicy');
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
require_once DOL_DOCUMENT_ROOT . '/datapolicy/class/datapolicy.class.php';
$contacts = new DataPolicies($db);
$contacts = new DataPolicy($db);
$contacts->getAllContactNotInformed();
$contacts->getAllCompaniesNotInformed();
$contacts->getAllAdherentsNotInformed();

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 764 B

After

Width:  |  Height:  |  Size: 764 B

View File

@ -0,0 +1,92 @@
# Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Module label 'ModuledatapolicyName'
Module4100Name = Data Privacy Policy
# Module description 'ModuledatapolicyDesc'
Module4100Desc = Module to manage Data Privacy (Conformity with the GDPR)
#
# Page d'administration
#
datapolicySetup = Module Data Privacy Policy Setup
Deletion = Deletion of data
datapolicySetupPage = Depending of laws of your countries (Example <a href="http://www.privacy-regulation.eu/en/5.htm" target="_blank">Article 5</a> of the GDPR), personal data must be kept for a period not exceeding that necessary for the purposes for which they were collected, except for archival purposes.<br>The deletion will be done automatically after a certain duration without event (the duration which you will have indicated below).
NB_MONTHS = %s months
ONE_YEAR = 1 year
NB_YEARS = %s years
DATAPOLICY_TIERS_CLIENT = Customer
DATAPOLICY_TIERS_PROSPECT = Prospect
DATAPOLICY_TIERS_PROSPECT_CLIENT = Prospect/Customer
DATAPOLICY_TIERS_NIPROSPECT_NICLIENT = Nor prospect/Nor customer
DATAPOLICY_TIERS_FOURNISSEUR = Supplier
DATAPOLICY_CONTACT_CLIENT = Customer
DATAPOLICY_CONTACT_PROSPECT = Prospect
DATAPOLICY_CONTACT_PROSPECT_CLIENT = Prospect/Customer
DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT = Nor prospect/Nor customer
DATAPOLICY_CONTACT_FOURNISSEUR = Supplier
DATAPOLICY_ADHERENT = Member
DATAPOLICY_Tooltip_SETUP = Type of contact - Indicate your choices for each type.
DATAPOLICYMail=Emails Setup
DATAPOLICYSUBJECTMAIL=Subject of email
DATAPOLICYCONTENTMAIL=Content of the email
DATAPOLICYSUBSITUTION=You can use the following variables in your email (LINKACCEPT allows to create a link recording the agreement of the person, LINKREFUSED makes it possible to record the refusal of the person):
DATAPOLICYACCEPT=Message after agreement
DATAPOLICYREFUSE=Message after desagreement
SendAgreementText=You can send a GDPR email to all your relevant contacts (who have not yet received an email and for which you have not registered anything about their GDPR agreement). To do this, use the following button.
SendAgreement=Send emails
AllAgreementSend = All emails have been sent
TXTLINKDATAPOLICYACCEPT= Text for the link "agreement"
TXTLINKDATAPOLICYREFUSE= Text for the link "desagreement"
#
# Extrafield
#
DATAPOLICY_BLOCKCHECKBOX = GDPR : Processing of personal data
DATAPOLICY_consentement = Consent obtained for the processing of personal data
DATAPOLICY_opposition_traitement = Opposes the processing of his personal data
DATAPOLICY_opposition_prospection = Opposes the processing of his personal data for the purposes of prospecting
#
# Popup
#
DATAPOLICY_POPUP_ANONYME_TITLE = Anonymize a thirdparty
DATAPOLICY_POPUP_ANONYME_TEXTE = You can not delete this contact from Dolibarr because there are related items. In accordance with the GDPR, you will make all this data anonymous to respect your obligations. Would you like to continue ?
#
# Bouton portabilité
#
DATAPOLICY_PORTABILITE = Portability GDPR
DATAPOLICY_PORTABILITE_TITLE = Export of personal data
DATAPOLICY_PORTABILITE_CONFIRMATION = You want to export the personal data of this contact. Are you sure ?
#
# Note ajoutés lors d'une anonymisation
#
ANONYMISER_AT = Anonymised the %s
#V2
DATAPOLICYReturn=GDPR Validation
DATAPOLICY_date = Date of agreement/desagreement GDPR
DATAPOLICY_send = Date sending agreement email
DATAPOLICYReturn = GDPR Return
DATAPOLICY_SEND = Send GDPR email
MailSent = Email has been sent
#ERROR
ErrorSubjectIsRequired= Error : The subject of email is required. Indicate it in the module setup
=Due to a technical problem, we were unable to register your choice. We apologize for that. Contact us to send us your choice.
NUMBER_MONTH_BEFORE_DELETION = Number of month before deletion

View File

@ -0,0 +1,97 @@
# Copyright (C) 2018 INOVEA CONSEil info@inovea-conseil.com
#
# 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
# the Free Software Foundation, either version 3 of the License, or
# (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
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Générique
#
# Module label 'ModuledatapolicyName'
Module4100Name = Protection des Données
# Module description 'ModuledatapolicyDesc'
Module4100Desc = Module de gestion de la protection des données (RGPD)
#
# Page d'administration
#
datapolicySetup = Configuration du module Protection des données
Settings_DATAPOLICY = Paramétrage du module Protection des données
datapolicySetupPage = Selon la loi de votre pays (Exemple <a href="http://www.privacy-regulation.eu/fr/5.htm" target="_blank">larticle 5</a> du RGPD), les données à caractère personnel doivent être conservées pendant une durée nexcédant pas celle nécessaire au regard des finalités pour lesquelles elles ont été traitées, à lexception de fins archivistiques. La suppression se fera automatiquement après une certaine durée sans évènement (la durée que vous aurez indiquée ci-dessous).
NB_MONTHS = %s mois
ONE_YEAR = 1 an
NB_YEARS = %s ans
DATAPOLICY_TIERS_CLIENT = Client
DATAPOLICY_TIERS_PROSPECT = Prospect
DATAPOLICY_TIERS_PROSPECT_CLIENT = Prospect/Client
DATAPOLICY_TIERS_NIPROSPECT_NICLIENT = Ni prospect / Ni client
DATAPOLICY_TIERS_FOURNISSEUR = Fournisseur
DATAPOLICY_CONTACT_CLIENT = Client
DATAPOLICY_CONTACT_PROSPECT = Prospect
DATAPOLICY_CONTACT_PROSPECT_CLIENT = Prospect/Client
DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT = Ni prospect / Ni client
DATAPOLICY_CONTACT_FOURNISSEUR = Fournisseur
DATAPOLICY_ADHERENT = Adhérent
DATAPOLICY_Tooltip_SETUP = Type du contact - Indiquez vos choix pour chaque type.
DATAPOLICYMail=Paramétrage des emails
DATAPOLICYSUBJECTMAIL=Objet du mail
DATAPOLICYCONTENTMAIL=Contenu du mail
DATAPOLICYSUBSITUTION=Vous pouvez utiliser les variables suivantes dans votre email (LINKACCEPT permet de créer un lien enregistrant l'acceptation de la personne, LINKREFUSED permet d'enregistrer le refus de la personne) :
DATAPOLICYACCEPT=Message suite acceptation
DATAPOLICYREFUSE=Message suite opposition
SendAgreementText=Vous pouvez envoyer un email DATAPOLICY à tous vos contacts concernés (qui n'ont pas encore reçus de mail et pour lesquels vous n'avez rien enregistré concernant leur accord/désaccord DATAPOLICY). Pour cela, utilisez le bouton suivant.
SendAgreement=Envoyer les emails
AllAgreementSend = Tous les e-mails de consentement ont été envoyés
TXTLINKDATAPOLICYACCEPT= Texte du lien d'acceptation
TXTLINKDATAPOLICYREFUSE= Texte du lien d'opposition
#
# Extrafield
#
DATAPOLICY_BLOCKCHECKBOX = DATAPOLICY : Traitement des données à caractère personnel
DATAPOLICY_consentement = Consentement recueilli pour le traitement des données à caractère personnel le concernant
DATAPOLICY_opposition_traitement = Soppose au traitement de ses données à caractère personnel
DATAPOLICY_opposition_prospection = Soppose au traitement de ses données à caractère personnel à des fins de prospection
#
# Popup
#
DATAPOLICY_POPUP_ANONYME_TITLE = Anonymiser un tiers
DATAPOLICY_POPUP_ANONYME_TEXTE = Vous ne pouvez pas supprimer ce contact de Dolibarr car des éléments y sont liés. Conformément au DATAPOLICY, vous allez rendre toutes ces données anonymes afin de respecter vos obligations. Souhaitez-vous continuer ?
#
# Bouton portabilité
#
DATAPOLICY_PORTABILITE = Portabilité DATAPOLICY
DATAPOLICY_PORTABILITE_TITLE = Export des données à caractère personnel
DATAPOLICY_PORTABILITE_CONFIRMATION = Vous souhaitez exporter les données à caractère personnel de ce contact. Etes-vous sûr ?
#
# Note ajoutés lors d'une anonymisation
#
ANONYMISER_AT = Anonymisé le %s
#V2
DATAPOLICYReturn=Validation DATAPOLICY
DATAPOLICY_date=Date d'accord/opposition au traitement
DATAPOLICY_send=Date envoi consentement
DATAPOLICYReturn=Retour DATAPOLICY
DATAPOLICY_SEND=Envoyer l'email de consentement
MailSent=L'email a bien été envoyé
#ERROR
ErrorSubjectIsRequired=Erreur : vous n'avez pas indiqué l'objet de l'email dans la configuration
=Suite à un problème technique, nous n'avons pas pu enregistrer votre choix. Nous nous en excusons. Contactez-nous pour nous transmettre votre choix.
NUMBER_MONTH_BEFORE_DELETION = Nombre de mois avant suppression des données

View File

@ -0,0 +1,78 @@
# Copyright (C) 2018 INOVEA CONSEIl info@inovea-conseil.com - Thanks to Claudio Aschieri
#
# # Module label 'ModuledatapolicyName'
Module4100Name = Data Policy
# Module description 'ModuledatapolicyDesc'
Module4100Desc = Conformità con GDPR
#
# Page d'administration
#
datapolicySetup = Module Setup
Settings_DATAPOLICY = Configurazione modulo GDPR
datapolicySetupPage = In accordo con <a href="http://www.privacy-regulation.eu/it/5.htm" target="_blank">l'art 5 del GDPR </a> i dati personali devono essere conservati per un periodo di tempo che .... ed eliminati se non sono più utili agli scopi per cui sono stati processati.
NB_MONTHS = %s mesi
ONE_YEAR = 1 anno
NB_YEARS = %s anni
DATAPOLICY_TIERS_CLIENT = Cliente
DATAPOLICY_TIERS_PROSPECT = Fornitore
DATAPOLICY_TIERS_PROSPECT_CLIENT = Potenziale Cliente / Cliente
DATAPOLICY_TIERS_NIPROSPECT_NICLIENT = Nè potenziale cliente / Nè cliente
DATAPOLICY_TIERS_FOURNISSEUR = Fornitore
DATAPOLICY_CONTACT_CLIENT = Cliente
DATAPOLICY_CONTACT_PROSPECT = Potenziale cliente
DATAPOLICY_CONTACT_PROSPECT_CLIENT = Potenziale Cliente / Cliente
DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT = Nè potenziale cliente / Nè cliente
DATAPOLICY_CONTACT_FOURNISSEUR = Fornitore
DATAPOLICY_ADHERENT = Membri
DATAPOLICY_Tooltip_SETUP = Tipo di contatto - Indica la scelta per ogni tipologia
DATAPOLICYMail=Configurazione Email
DATAPOLICYSUBJECTMAIL=Subject dell'e-mail
DATAPOLICYCONTENTMAIL=Contenuto dell'e-mail
DATAPOLICYSUBSITUTION=Puoi utilizzare le seguenti variabili nella tua email (LINKACCEPT consente di creare un link per registrare l'accettazione della persona, LINKREFUSED consente di registrare il rifiuto della persona):
DATAPOLICYACCEPT= Messaggio dopo il consenso
DATAPOLICYREFUSE=Messaggio dopo il rifiuto
SendAgreementText=Puoi inviare un'email GDPR a tutti i tuoi contatti rilevanti (che non hanno ancora ricevuto un'e-mail e per i quali non hai registrato nulla sul loro accordo GDPR). Per fare ciò, utilizzare il seguente pulsante.
SendAgreement=Invia emails
AllAgreementSend = Tutte le email sono state inviate
TXTLINKDATAPOLICYACCEPT= Testo per il link "Consenso"
TXTLINKDATAPOLICYREFUSE= Testo per il link "Consenso negato"
#
# Extrafield
#
DATAPOLICY_BLOCKCHECKBOX = GDPR : Trattamento dei dati personali
DATAPOLICY_consentement = Consenso ottenuto al Trattamento dei dati personali
DATAPOLICY_opposition_traitement = Consenso negato al trattamento dei dati personali
DATAPOLICY_opposition_prospection = Consenso negato al trattamento dei dati personali a fini commerciali
#
# Popup
#
DATAPOLICY_POPUP_ANONYME_TITLE = Anonimizza un soggetto terzo
DATAPOLICY_POPUP_ANONYME_TEXTE = Impossibile eliminare questo contatto da Dolibarr perchè vi sono elementi collegati. In conformità con il GDPR, renderai tutti questi dati anonimi per rispettare i tuoi obblighi. Vuoi continuare?
#
# Bouton portabilité
#
DATAPOLICY_PORTABILITE = Portabilità GDPR
DATAPOLICY_PORTABILITE_TITLE = Esporta i dati personali
DATAPOLICY_PORTABILITE_CONFIRMATION = Vuoi davvero esportare i dati personali di questo contatto?
#
# Note ajoutée lors d'une anonymisation
#
ANONYMISER_AT = Anonimizzato il %s
#V2
DATAPOLICYReturn=GDPR Validazione
DATAPOLICY_date = Data di accordo / disaccordo GDPR
DATAPOLICY_send = Data di invio del consenso (e-mail)
DATAPOLICYReturn = GDPR ritorno
DATAPOLICY_SEND = Inviare GDPR e-mail
MailSent=L'email è stata inviata
#ERROR
ErrorSubjectIsRequired= Errore: L'oggetto della mail è obbligatorio. Inserisci l'oggetto nella configurazione del modulo.
=A causa di un problema tecnico, non siamo stati in grado di registrare la tua scelta. Ci scusiamo per questo. Contattaci per inviarci la tua scelta.

View File

@ -16,9 +16,9 @@
*/
/**
* \file datapolicies/lib/datapolicies.lib.php
* \ingroup datapolicies
* \brief Library files with common functions for datapolicies
* \file datapolicy/lib/datapolicy.lib.php
* \ingroup datapolicy
* \brief Library files with common functions for datapolicy
*/
/**
@ -26,29 +26,29 @@
*
* @return array
*/
function datapoliciesAdminPrepareHead()
function datapolicyAdminPrepareHead()
{
global $langs, $conf;
$langs->load("datapolicies@datapolicies");
$langs->load("datapolicy@datapolicy");
$h = 0;
$head = array();
$head[$h][0] = dol_buildpath("/datapolicies/admin/setup.php", 1);
$head[$h][1] = $langs->trans("Settings_DATAPOLICIES");
$head[$h][0] = dol_buildpath("/datapolicy/admin/setup.php", 1);
$head[$h][1] = $langs->trans("Deletion");
$head[$h][2] = 'settings';
$h++;
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
{
$head[$h][0] = dol_buildpath("/datapolicies/admin/setupmail.php", 1);
$head[$h][0] = dol_buildpath("/datapolicy/admin/setupmail.php", 1);
$head[$h][1] = $langs->trans("DATAPOLICIESMail");
$head[$h][2] = 'settings';
$h++;
}
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicies');
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
return $head;
}

View File

@ -16,26 +16,26 @@
*/
/**
* \file datapolicies/mailing.php
* \ingroup datapolicies
* \brief datapolicies mailing page.
* \file datapolicy/mailing.php
* \ingroup datapolicy
* \brief datapolicy mailing page.
*/
require '../../main.inc.php';
dol_include_once('/contact/class/contact.class.php');
dol_include_once('/datapolicies/class/datapolicies.class.php');
dol_include_once('/datapolicy/class/datapolicy.class.php');
$idcontact = GETPOST('idc');
if(!empty($idcontact)){
$contact = new Contact($db);
$contact->fetch($idcontact);
DataPolicies::sendMailDataPoliciesContact($contact);
DataPolicy::sendMailDataPolicyContact($contact);
}else{
$contacts = new DataPolicies($db);
$contacts = new DataPolicy($db);
$contacts->getAllContactNotInformed();
$contacts->getAllCompaniesNotInformed();
$contacts->getAllAdherentsNotInformed();

View File

@ -17,9 +17,9 @@
*/
/**
* \file datapolicies/admin/setup.php
* \ingroup datapolicies
* \brief datapolicies setup page.
* \file datapolicy/admin/setup.php
* \ingroup datapolicy
* \brief datapolicy setup page.
*/
if (!defined('NOLOGIN'))
@ -34,7 +34,7 @@ dol_include_once('/contact/class/contact.class.php');
dol_include_once('/societe/class/societe.class.php');
dol_include_once('/adherents/class/adherent.class.php');
dol_include_once('/user/class/user.class.php');
dol_include_once('/datapolicies/class/datapolicies.class.php');
dol_include_once('/datapolicy/class/datapolicy.class.php');
$idc = GETPOST('c', 'int');
$ids = GETPOST('s', 'int');
@ -45,7 +45,7 @@ $code = GETPOST('key', 'alpha');
$acc = "DATAPOLICIESACCEPT_" . $lang;
$ref = "DATAPOLICIESREFUSE_" . $lang;
$langs->load('datapolicies@datapolicies',0,0,$lang);
$langs->load('datapolicy@datapolicy',0,0,$lang);
if (empty($action) || (empty($idc) && empty($ids) && empty($ida))) {
return 0;
@ -56,18 +56,18 @@ if (empty($action) || (empty($idc) && empty($ids) && empty($ida))) {
if ($check != $code) {
$return = $langs->trans('ErrorEmailDATAPOLICIES');
} elseif ($action == 1) {
$contact->array_options['options_datapolicies_consentement'] = 1;
$contact->array_options['options_datapolicies_opposition_traitement'] = 0;
$contact->array_options['options_datapolicies_opposition_prospection'] = 0;
$contact->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$contact->array_options['options_datapolicy_consentement'] = 1;
$contact->array_options['options_datapolicy_opposition_traitement'] = 0;
$contact->array_options['options_datapolicy_opposition_prospection'] = 0;
$contact->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$acc;
} elseif ($action == 2) {
$contact->no_email = 1;
$contact->array_options['options_datapolicies_consentement'] = 0;
$contact->array_options['options_datapolicies_opposition_traitement'] = 1;
$contact->array_options['options_datapolicies_opposition_prospection'] = 1;
$contact->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$contact->array_options['options_datapolicy_consentement'] = 0;
$contact->array_options['options_datapolicy_opposition_traitement'] = 1;
$contact->array_options['options_datapolicy_opposition_prospection'] = 1;
$contact->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$ref;
}
@ -79,16 +79,16 @@ if (empty($action) || (empty($idc) && empty($ids) && empty($ida))) {
if ($check != $code) {
$return = $langs->trans('ErrorEmailDATAPOLICIES');
} elseif ($action == 1) {
$societe->array_options['options_datapolicies_consentement'] = 1;
$societe->array_options['options_datapolicies_opposition_traitement'] = 0;
$societe->array_options['options_datapolicies_opposition_prospection'] = 0;
$societe->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$societe->array_options['options_datapolicy_consentement'] = 1;
$societe->array_options['options_datapolicy_opposition_traitement'] = 0;
$societe->array_options['options_datapolicy_opposition_prospection'] = 0;
$societe->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$acc;
} elseif ($action == 2) {
$societe->array_options['options_datapolicies_consentement'] = 0;
$societe->array_options['options_datapolicies_opposition_traitement'] = 1;
$societe->array_options['options_datapolicies_opposition_prospection'] = 1;
$societe->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$societe->array_options['options_datapolicy_consentement'] = 0;
$societe->array_options['options_datapolicy_opposition_traitement'] = 1;
$societe->array_options['options_datapolicy_opposition_prospection'] = 1;
$societe->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$ref;
}
@ -100,16 +100,16 @@ if (empty($action) || (empty($idc) && empty($ids) && empty($ida))) {
if ($check != $code) {
$return = $langs->trans('ErrorEmailDATAPOLICIES');
} elseif ($action == 1) {
$adherent->array_options['options_datapolicies_consentement'] = 1;
$adherent->array_options['options_datapolicies_opposition_traitement'] = 0;
$adherent->array_options['options_datapolicies_opposition_prospection'] = 0;
//$adherent->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$adherent->array_options['options_datapolicy_consentement'] = 1;
$adherent->array_options['options_datapolicy_opposition_traitement'] = 0;
$adherent->array_options['options_datapolicy_opposition_prospection'] = 0;
//$adherent->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$acc;
} elseif ($action == 2) {
$adherent->array_options['options_datapolicies_consentement'] = 0;
$adherent->array_options['options_datapolicies_opposition_traitement'] = 1;
$adherent->array_options['options_datapolicies_opposition_prospection'] = 1;
//$adherent->array_options['options_datapolicies_date'] = date('Y-m-d', time());
$adherent->array_options['options_datapolicy_consentement'] = 0;
$adherent->array_options['options_datapolicy_opposition_traitement'] = 1;
$adherent->array_options['options_datapolicy_opposition_prospection'] = 1;
//$adherent->array_options['options_datapolicy_date'] = date('Y-m-d', time());
$return = $conf->global->$ref;
}