| ';
print $langs->trans('CronObject')." | ";
- print "objectname."\" /> ";
+ print "objectname."\" /> ";
print " | ";
print "";
print $form->textwithpicto('', $langs->trans("CronObjectHelp"), 1, 'help');
diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php
index a334b36929e..dde8644571e 100644
--- a/htdocs/datapolicy/admin/setup.php
+++ b/htdocs/datapolicy/admin/setup.php
@@ -27,15 +27,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
require_once '../lib/datapolicy.lib.php';
// Translations
-$langs->load('admin');
-$langs->load('companies');
-$langs->load('members');
-$langs->load('datapolicy@datapolicy');
-
-// Access control
-if (!$user->admin) {
- accessforbidden();
-}
+$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy@datapolicy'));
// Parameters
$action = GETPOST('action', 'aZ09');
@@ -43,35 +35,27 @@ $backtopage = GETPOST('backtopage', 'alpha');
$arrayofparameters = array();
$arrayofparameters['ThirdParty'] = array(
- '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_TIERS_CLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'company', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_TIERS_PROSPECT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'company', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_TIERS_PROSPECT_CLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'company', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_TIERS_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'company', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_TIERS_FOURNISSEUR'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'supplier', 'class="pictofixedwidth"')),
);
if (!empty($conf->global->DATAPOLICY_USE_SPECIFIC_DELAY_FOR_CONTACT)) {
$arrayofparameters['Contact'] = array(
- '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_CONTACT_CLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_CONTACT_PROSPECT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_CONTACT_PROSPECT_CLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_CONTACT_NIPROSPECT_NICLIENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')),
+ 'DATAPOLICY_CONTACT_FOURNISSEUR'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'contact', 'class="pictofixedwidth"')),
);
}
if (!empty($conf->adherent->enabled)) {
$arrayofparameters['Member'] = array(
- 'DATAPOLICY_ADHERENT'=>array('css'=>'minwidth200'),
+ 'DATAPOLICY_ADHERENT'=>array('css'=>'minwidth200', 'picto'=>img_picto('', 'member', 'class="pictofixedwidth"')),
);
}
-
-
-/*
- * Actions
- */
-
-include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
-
$valTab = array(
'' => $langs->trans('Never'),
'6' => $langs->trans('NB_MONTHS', 6),
@@ -85,6 +69,40 @@ $valTab = array(
'240' => $langs->trans('NB_YEARS', 20),
);
+// Access control
+if (!$user->admin) {
+ accessforbidden();
+}
+
+
+/*
+ * Actions
+ */
+
+foreach ($arrayofparameters as $title => $tab) {
+ foreach ($tab as $key => $val) {
+ // Modify constant only if key was posted (avoid resetting key to the null value)
+ if (GETPOSTISSET($key)) {
+ if (preg_match('/category:/', $val['type'])) {
+ if (GETPOST($key, 'int') == '-1') {
+ $val_const = '';
+ } else {
+ $val_const = GETPOST($key, 'int');
+ }
+ } else {
+ $val_const = GETPOST($key, 'alpha');
+ }
+
+ $result = dolibarr_set_const($db, $key, $val_const, 'chaine', 0, '', $conf->entity);
+ if ($result < 0) {
+ $error++;
+ break;
+ }
+ }
+ }
+}
+
+
/*
* View
@@ -96,11 +114,11 @@ llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = ''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans($page_name), $linkback, 'object_generic');
+print load_fiche_titre($langs->trans($page_name), $linkback, 'generic');
// Configuration header
$head = datapolicyAdminPrepareHead();
-print dol_get_fiche_head($head, 'settings', '', -1, "datapolicy@datapolicy");
+print dol_get_fiche_head($head, 'settings', '', -1, '');
// Setup page goes here
echo ''.$langs->trans("datapolicySetupPage").'
';
@@ -118,6 +136,7 @@ if ($action == 'edit') {
print ' |
| ';
+ print $val['picto'];
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
print ' | ';
print ' |
';
$boxstat .= '';
$boxstat .= '';
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index cc2cdc9fb86..bb0ad661c82 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -1464,8 +1464,9 @@ if (!empty($conf->projet->enabled)) {
$formproject = new FormProjets($db);
}
+$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Card');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
-llxHeader('', $langs->trans("Order"), $help_url);
+llxHeader('', $title, $help_url);
$now = dol_now();
diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php
index f52aa20d494..d3618c2fe99 100644
--- a/htdocs/fourn/commande/contact.php
+++ b/htdocs/fourn/commande/contact.php
@@ -98,8 +98,9 @@ if ($action == 'addcontact' && ($user->rights->fournisseur->commande->creer || $
/*
* View
*/
+$title = $langs->trans('SupplierOrder')." - ".$langs->trans('ContactsAddresses');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
-llxHeader('', $langs->trans("Order"), $help_url);
+llxHeader('', $title, $help_url);
$form = new Form($db);
$formcompany = new FormCompany($db);
diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php
index f3dc1d26496..31e59342860 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -94,9 +94,11 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
$form = new Form($db);
+$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Documents');
+$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
+llxHeader('', $title, $help_url);
+
if ($object->id > 0) {
- $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
- llxHeader('', $langs->trans("Order"), $help_url);
$object->fetch_thirdparty();
diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php
index 9260dab0b42..32af16d7dde 100644
--- a/htdocs/fourn/commande/info.php
+++ b/htdocs/fourn/commande/info.php
@@ -112,7 +112,7 @@ if ($id > 0 || !empty($ref)) {
$object->info($object->id);
}
-$title = $langs->trans("SupplierOrder").' - '.$object->ref.' '.$object->name;
+$title = $langs->trans("SupplierOrder").' - '.$langs->trans('Info').' - '.$object->ref.' '.$object->name;
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
$title = $object->ref.' '.$object->name.' - '.$langs->trans("Info");
}
diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php
index c4cc134fee7..cc39e589663 100644
--- a/htdocs/fourn/commande/note.php
+++ b/htdocs/fourn/commande/note.php
@@ -61,8 +61,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
/*
* View
*/
+$title = $langs->trans('SupplierOrder')." - ".$langs->trans('Notes');
$help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores';
-llxHeader('', $langs->trans("Order"), $help_url);
+llxHeader('', $title, $help_url);
$form = new Form($db);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 34852c2ca61..9f4bcfcfbd4 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1768,7 +1768,7 @@ AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting men
AGENDA_REMINDER_BROWSER=Enable event reminder