21 require
'../../main.inc.php';
22 require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
23 require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
24 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
25 require_once
'../lib/datapolicy.lib.php';
28 $langs->loadLangs(array(
'admin',
'companies',
'members',
'datapolicy'));
32 $action =
GETPOST(
'action',
'aZ09');
33 $backtopage =
GETPOST(
'backtopage',
'alpha');
39 $l = $langs->defaultlang;
50 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
52 if ($action ==
'setvalue' && $user->admin) {
54 $sub =
"DATAPOLICIESSUBJECT_".$l;
56 $cont =
"DATAPOLICIESCONTENT_".$l;
58 $cont =
"TXTLINKDATAPOLICIESACCEPT_".$l;
60 $cont =
"TXTLINKDATAPOLICIESREFUSE_".$l;
62 $sub =
"DATAPOLICIESACCEPT_".$l;
64 $sub =
"DATAPOLICIESREFUSE_".$l;
83 $page_name =
"datapolicySetup";
87 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
89 print
load_fiche_titre($langs->trans($page_name), $linkback,
'object_datapolicy@datapolicy');
96 print
"<script type='text/javascript'>
97 $(document).ready(function(){
98 $('#default_lang').change(function(){
99 lang=$('#default_lang').val();
100 window.location.replace('" . $_SERVER[
'PHP_SELF'].
"?l='+lang);
105 print
'<form method="post" action="'.$_SERVER[
"PHP_SELF"].
'?l='.$l.
'">';
106 print
'<input type="hidden" name="token" value="'.newToken().
'">';
107 print
'<input type="hidden" name="action" value="setvalue">';
109 if ($conf->global->MAIN_MULTILANGS) {
110 print
'<tr><td>'.$form->editfieldkey(
'DefaultLang',
'default_lang',
'',
null, 0).
'</td><td colspan="3" class="maxwidthonsmartphone">'.
"\n";
111 print $formadmin->select_language((
GETPOST(
'l') ?
GETPOST(
'l') : $langs->defaultlang),
'default_lang', 0, 0, 1, 0, 0,
'maxwidth200onsmartphone');
114 $subject =
'DATAPOLICIESSUBJECT_'.$l;
115 $linka =
'TXTLINKDATAPOLICIESACCEPT_'.$l;
116 $linkr =
'TXTLINKDATAPOLICIESREFUSE_'.$l;
117 $content =
'DATAPOLICIESCONTENT_'.$l;
118 $acc =
'DATAPOLICIESACCEPT_'.$l;
119 $ref =
'DATAPOLICIESREFUSE_'.$l;
120 print
'<tr class"oddeven"><td class="fieldrequired">';
121 print $langs->trans(
'DATAPOLICIESSUBJECTMAIL').
'</td><td>';
122 print
'<input type="text" size="100" name="'.$subject.
'" value="'.$conf->global->$subject.
'" />';
124 print
'<tr class"oddeven"><td class="fieldrequired">';
125 print $langs->trans(
'DATAPOLICIESCONTENTMAIL').
'</td><td>';
126 print $langs->trans(
'DATAPOLICIESSUBSITUTION'); echo
'__LINKACCEPT__,__LINKREFUSED__,__FIRSTNAME__,__NAME__,__CIVILITY__';
127 $doleditor =
new DolEditor($content, $conf->global->$content,
'', 250,
'Full',
'',
false,
true, 1, 200, 70);
128 $doleditor->Create();
130 print
'<tr class"oddeven"><td class="fieldrequired">';
131 print $langs->trans(
'TXTLINKDATAPOLICIESACCEPT').
'</td><td>';
132 print
'<input type="text" size="200" name="'.$linka.
'" value="'.$conf->global->$linka.
'" />';
134 print
'<tr class"oddeven"><td class="fieldrequired">';
135 print $langs->trans(
'TXTLINKDATAPOLICIESREFUSE').
'</td><td>';
136 print
'<input type="text" size="200" name="'.$linkr.
'" value="'.$conf->global->$linkr.
'" />';
138 print
'<tr class"oddeven"><td class="fieldrequired">';
140 print $langs->trans(
'DATAPOLICIESACCEPT').
'</td><td>';
142 $doleditor =
new DolEditor($acc, $conf->global->$acc,
'', 250,
'Full',
'',
false,
true, 1, 200, 70);
143 $doleditor->Create();
145 print
'<tr class"oddeven"><td class="fieldrequired">';
146 print $langs->trans(
'DATAPOLICIESREFUSE').
'</td><td>';
148 print $langs->trans(
'');
149 $doleditor =
new DolEditor($ref, $conf->global->$ref,
'', 250,
'Full',
'',
false,
true, 1, 200, 70);
150 $doleditor->Create();
154 print
'<br><center><input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'"></center>';
162 print $langs->trans(
'SendAgreementText');
163 print
'<a class="button" href="'.DOL_URL_ROOT.
'/datapolicy/mailing.php">'.$langs->trans(
'SendAgreement').
'</a>';
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
datapolicyAdminPrepareHead()
Prepare admin pages header.
setEventMessage($mesgs, $style='mesgs')
Set event message in dol_events session object.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.