diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php
index fc384046256..2734bacea2a 100755
--- a/htdocs/admin/pdf.php
+++ b/htdocs/admin/pdf.php
@@ -68,6 +68,20 @@ if ($action == 'update')
exit;
}
+if ($action == 'activate_pdfsecurity')
+{
+ dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity);
+ header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
+ exit;
+}
+else if ($action == 'disable_pdfsecurity')
+{
+ dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity);
+ header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
+ exit;
+}
+
+
/*
* View
@@ -366,31 +380,61 @@ else // Show
print_fiche_titre($langs->trans("Other"),'','').'
';
$var=true;
print '
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | |||
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | |||
| '.$langs->trans("HideAnyVATInformationOnPDF").' | '; + print ' | |||
| '.$langs->trans("HideAnyVATInformationOnPDF").' | '; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); print ' | |||
| '; + $text = $langs->trans("ProtectAndEncryptPdfFiles"); + $desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); + print $desc; + print ' | '; + print ''; + if($conf->global->PDF_SECURITY_ENCRYPTION == 1) + { + print img_picto($langs->trans("Active"),'tick'); + } + print ' | '; + print ''; + if ($conf->global->PDF_SECURITY_ENCRYPTION == 0) + { + print ''.$langs->trans("Activate").''; + } + if($conf->global->PDF_SECURITY_ENCRYPTION == 1) + { + print ''.$langs->trans("Disable").''; + } + print " | "; + + print ""; + print '||
| '.$langs->trans("HideDescOnPDF").' | '; + print ' | |||
| '.$langs->trans("HideDescOnPDF").' | '; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1); print ' | |||
| '.$langs->trans("HideRefOnPDF").' | '; + print ' | |||
| '.$langs->trans("HideRefOnPDF").' | '; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1); print ' | |||
| '.$langs->trans("HideDetailsOnPDF").' | '; + print ' | |||
| '.$langs->trans("HideDetailsOnPDF").' | '; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); print ' | |||
| '; -$text = $langs->trans("ProtectAndEncryptPdfFiles"); -$desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); -print $desc; -print ' | '; -print ''; -if($conf->global->PDF_SECURITY_ENCRYPTION == 1) -{ - print img_picto($langs->trans("Active"),'tick'); -} - -print ' | '; - -print ''; -if ($conf->global->PDF_SECURITY_ENCRYPTION == 0) -{ - print ''.$langs->trans("Activate").''; -} -if($conf->global->PDF_SECURITY_ENCRYPTION == 1) -{ - print ''.$langs->trans("Disable").''; -} -print " | "; - -print ""; -print '||