replace html code by html5 in contact
This commit is contained in:
parent
a1d2d3bddc
commit
167a857f4c
@ -126,7 +126,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
<td class="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table><br>
|
</table><br>
|
||||||
|
|||||||
@ -149,7 +149,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" align="center">
|
<td colspan="4" class="center">
|
||||||
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
|
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
|
||||||
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
|
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -588,7 +588,7 @@ else
|
|||||||
$rowspan=3;
|
$rowspan=3;
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
||||||
|
|
||||||
print '<td valign="middle" align="center" rowspan="'.$rowspan.'">';
|
print '<td class="valignmiddle center" rowspan="'.$rowspan.'">';
|
||||||
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
print '<a href="#" id="copyaddressfromsoc">'.$langs->trans('CopyAddressFromSoc').'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -379,16 +379,16 @@ if ($sql_select)
|
|||||||
print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle');
|
print $formother->select_month($month?$month:-1, 'month', 1, 0, 'valignmiddle');
|
||||||
$formother->select_year($year?$year:-1, 'year', 1, 20, 1);
|
$formother->select_year($year?$year:-1, 'year', 1, 20, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
|
print '<input class="flat" type="text" name="sprod_fulldescr" size="15" value="'.dol_escape_htmltag($sprod_fulldescr).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">'; // TODO: Add filters !
|
print '<td class="liste_titre center">'; // TODO: Add filters !
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre center">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
$searchpicto=$form->showFilterAndCheckAddButtons(0);
|
||||||
@ -399,8 +399,8 @@ if ($sql_select)
|
|||||||
// Titles with sort buttons
|
// Titles with sort buttons
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder);
|
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre('ContactType', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
@ -427,10 +427,10 @@ if ($sql_select)
|
|||||||
print '<td class="nobordernopadding nowrap" width="100">';
|
print '<td class="nobordernopadding nowrap" width="100">';
|
||||||
print $documentstatic->getNomUrl(1);
|
print $documentstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
|
print '<td class="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<td align="center">';
|
print '<td class="center">';
|
||||||
if ($type_element == 'contract')
|
if ($type_element == 'contract')
|
||||||
{
|
{
|
||||||
print $documentstaticline->getLibStatut(2);
|
print $documentstaticline->getLibStatut(2);
|
||||||
@ -616,17 +616,15 @@ if ($sql_select)
|
|||||||
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
} elseif (empty($type_element) || $type_element == -1) {
|
||||||
elseif (empty($type_element) || $type_element == -1)
|
|
||||||
{
|
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
||||||
|
|
||||||
print '<table class="liste" width="100%">'."\n";
|
print '<table class="liste" width="100%">'."\n";
|
||||||
// Titles with sort buttons
|
// Titles with sort buttons
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'align="center" width="150"', $sortfield, $sortorder);
|
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, 'width="150"', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_status', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -634,8 +632,7 @@ elseif (empty($type_element) || $type_element == -1)
|
|||||||
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
|
print '<tr class="oddeven"><td class="opacitymedium" colspan="5">'.$langs->trans("SelectElementAndClick", $langs->transnoentitiesnoconv("Search")).'</td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements').' '.$typeElementString.' '.$button, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', '');
|
||||||
|
|
||||||
print '<table class="liste" width="100%">'."\n";
|
print '<table class="liste" width="100%">'."\n";
|
||||||
|
|||||||
@ -688,7 +688,9 @@ if (! empty($arrayfields['p.zip']['checked'])) print_liste_field
|
|||||||
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($arrayfields['p.town']['label'], $_SERVER["PHP_SELF"], "p.town", $begin, $param, '', $sortfield, $sortorder);
|
||||||
//if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder);
|
||||||
//if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
|
//if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, 'align="center"', $sortfield, $sortorder);
|
if (! empty($arrayfields['country.code_iso']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder);
|
||||||
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
|
if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
|
||||||
@ -702,14 +704,27 @@ if (! empty($arrayfields['p.priv']['checked'])) print_liste_field
|
|||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
|
$parameters = array(
|
||||||
|
'arrayfields'=>$arrayfields,
|
||||||
|
'param'=>$param,
|
||||||
|
'sortfield'=>$sortfield,
|
||||||
|
'sortorder'=>$sortorder,
|
||||||
|
);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
if (! empty($arrayfields['p.datec']['checked'])) {
|
||||||
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center ');
|
}
|
||||||
if (! empty($arrayfields['p.import_key']['checked'])) print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
if (! empty($arrayfields['p.tms']['checked'])) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
|
print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
}
|
||||||
|
if (! empty($arrayfields['p.statut']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
|
if (! empty($arrayfields['p.import_key']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -157,13 +157,13 @@ if ($action == 'edit')
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
print '<td align="center" class="hideonsmartphone" valign="middle" rowspan="6">';
|
print '<td class="center hideonsmartphone valignmiddle" rowspan="6">';
|
||||||
print $form->showphoto('contact', $object)."\n";
|
print $form->showphoto('contact', $object)."\n";
|
||||||
if ($object->photo) print "<br>\n";
|
if ($object->photo) print "<br>\n";
|
||||||
|
|
||||||
print '<table class="nobordernopadding">';
|
print '<table class="nobordernopadding">';
|
||||||
|
|
||||||
if ($object->photo) print '<tr><td align="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
if ($object->photo) print '<tr><td class="center"><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
||||||
print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
|
print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -2017,30 +2017,30 @@ function cleanCorruptedTree($db, $tabletocleantree, $fieldfkparent)
|
|||||||
/**
|
/**
|
||||||
* Get an array with properties of an element
|
* Get an array with properties of an element
|
||||||
*
|
*
|
||||||
* @param string $element_type Element type: 'action', 'facture', 'project_task' or 'object@modulext'...
|
* @param string $element_type Element type: 'action', 'facture', 'project_task' or 'object@modulext'...
|
||||||
* @return array (module, classpath, element, subelement, classfile, classname)
|
* @return array (module, classpath, element, subelement, classfile, classname)
|
||||||
*/
|
*/
|
||||||
function getElementProperties($element_type)
|
function getElementProperties($element_type)
|
||||||
{
|
{
|
||||||
// Parse element/subelement (ex: project_task)
|
// Parse element/subelement (ex: project_task)
|
||||||
$module = $element = $subelement = $element_type;
|
$module = $element_type;
|
||||||
|
$element = $element_type;
|
||||||
|
$subelement = $element_type;
|
||||||
|
|
||||||
// If we ask an resource form external module (instead of default path)
|
// If we ask an resource form external module (instead of default path)
|
||||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $element_type, $regs))
|
if (preg_match('/^([^@]+)@([^@]+)$/i', $element_type, $regs)) {
|
||||||
{
|
|
||||||
$element = $subelement = $regs[1];
|
$element = $subelement = $regs[1];
|
||||||
$module = $regs[2];
|
$module = $regs[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
//print '<br>1. element : '.$element.' - module : '.$module .'<br>';
|
//print '<br>1. element : '.$element.' - module : '.$module .'<br>';
|
||||||
if ( preg_match('/^([^_]+)_([^_]+)/i', $element, $regs))
|
if ( preg_match('/^([^_]+)_([^_]+)/i', $element, $regs)) {
|
||||||
{
|
|
||||||
$module = $element = $regs[1];
|
$module = $element = $regs[1];
|
||||||
$subelement = $regs[2];
|
$subelement = $regs[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
// For compat
|
// For compat
|
||||||
if($element_type == "action") {
|
if ($element_type == "action") {
|
||||||
$classpath = 'comm/action/class';
|
$classpath = 'comm/action/class';
|
||||||
$subelement = 'Actioncomm';
|
$subelement = 'Actioncomm';
|
||||||
$module = 'agenda';
|
$module = 'agenda';
|
||||||
@ -2049,13 +2049,13 @@ function getElementProperties($element_type)
|
|||||||
// To work with non standard path
|
// To work with non standard path
|
||||||
if ($element_type == 'facture' || $element_type == 'invoice') {
|
if ($element_type == 'facture' || $element_type == 'invoice') {
|
||||||
$classpath = 'compta/facture/class';
|
$classpath = 'compta/facture/class';
|
||||||
$module='facture';
|
$module ='facture';
|
||||||
$subelement='facture';
|
$subelement = 'facture';
|
||||||
}
|
}
|
||||||
if ($element_type == 'commande' || $element_type == 'order') {
|
if ($element_type == 'commande' || $element_type == 'order') {
|
||||||
$classpath = 'commande/class';
|
$classpath = 'commande/class';
|
||||||
$module='commande';
|
$module = 'commande';
|
||||||
$subelement='commande';
|
$subelement = 'commande';
|
||||||
}
|
}
|
||||||
if ($element_type == 'propal') {
|
if ($element_type == 'propal') {
|
||||||
$classpath = 'comm/propal/class';
|
$classpath = 'comm/propal/class';
|
||||||
@ -2142,8 +2142,7 @@ function getElementProperties($element_type)
|
|||||||
*/
|
*/
|
||||||
function fetchObjectByElement($element_id, $element_type, $element_ref = '')
|
function fetchObjectByElement($element_id, $element_type, $element_ref = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf, $db;
|
||||||
global $db,$conf;
|
|
||||||
|
|
||||||
$element_prop = getElementProperties($element_type);
|
$element_prop = getElementProperties($element_type);
|
||||||
if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled)
|
if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled)
|
||||||
@ -2270,7 +2269,7 @@ function getModuleDirForApiClass($module)
|
|||||||
$moduledirforclass = 'commande';
|
$moduledirforclass = 'commande';
|
||||||
}
|
}
|
||||||
elseif ($module == 'shipments') {
|
elseif ($module == 'shipments') {
|
||||||
$moduledirforclass = 'expedition';
|
$moduledirforclass = 'expedition';
|
||||||
}
|
}
|
||||||
elseif ($module == 'facture' || $module == 'invoice' || $module == 'invoices') {
|
elseif ($module == 'facture' || $module == 'invoice' || $module == 'invoices') {
|
||||||
$moduledirforclass = 'compta/facture';
|
$moduledirforclass = 'compta/facture';
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file datapolicy/admin/setup.php
|
* \file htdocs/datapolicy/admin/setup.php
|
||||||
* \ingroup datapolicy
|
* \ingroup datapolicy
|
||||||
* \brief datapolicy setup page.
|
* \brief datapolicy setup page.
|
||||||
*/
|
*/
|
||||||
@ -25,7 +25,6 @@
|
|||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
||||||
require_once '../lib/datapolicy.lib.php';
|
require_once '../lib/datapolicy.lib.php';
|
||||||
//require_once "../class/myclass.class.php";
|
|
||||||
|
|
||||||
// Translations
|
// Translations
|
||||||
$langs->load('admin');
|
$langs->load('admin');
|
||||||
@ -61,22 +60,22 @@ $arrayofparameters=array(
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||||
|
|
||||||
if (DOL_VERSION < '7' && $action == 'update') {
|
// if (DOL_VERSION < '7' && $action == 'update') {
|
||||||
foreach ($arrayofparameters as $k => $v) {
|
// foreach ($arrayofparameters as $k => $v) {
|
||||||
$res = dolibarr_set_const($db, $k, GETPOST($k), 'chaine', 0, '', $conf->entity);
|
// $res = dolibarr_set_const($db, $k, GETPOST($k), 'chaine', 0, '', $conf->entity);
|
||||||
if (! $res > 0) $error++;
|
// if (! $res > 0) $error++;
|
||||||
}
|
// }
|
||||||
if (! $error)
|
// if (! $error)
|
||||||
{
|
// {
|
||||||
$db->commit();
|
// $db->commit();
|
||||||
if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
// if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
$db->rollback();
|
// $db->rollback();
|
||||||
if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors');
|
// if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
$arrayofparameters=array(
|
$arrayofparameters=array(
|
||||||
@ -108,8 +107,8 @@ $valTab = array(
|
|||||||
'48' => $langs->trans('NB_YEARS', 4),
|
'48' => $langs->trans('NB_YEARS', 4),
|
||||||
'60' => $langs->trans('NB_YEARS', 5),
|
'60' => $langs->trans('NB_YEARS', 5),
|
||||||
'120' => $langs->trans('NB_YEARS', 10),
|
'120' => $langs->trans('NB_YEARS', 10),
|
||||||
'180' => $langs->trans('NB_YEARS', 15),
|
'180' => $langs->trans('NB_YEARS', 15),
|
||||||
'240' => $langs->trans('NB_YEARS', 20),
|
'240' => $langs->trans('NB_YEARS', 20),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -135,15 +134,15 @@ echo '<span class="opacitymedium">'.$langs->trans("datapolicySetupPage").'</span
|
|||||||
|
|
||||||
if ($action == 'edit')
|
if ($action == 'edit')
|
||||||
{
|
{
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
foreach($arrayofparameters as $title => $tab)
|
foreach($arrayofparameters as $title => $tab)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre"><td class="titlefield" colspan="2">'.$langs->trans($title).'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield" colspan="2">'.$langs->trans($title).'</td></tr>';
|
||||||
foreach($tab as $key => $val)
|
foreach($tab as $key => $val)
|
||||||
{
|
{
|
||||||
@ -159,21 +158,19 @@ if ($action == 'edit')
|
|||||||
print '</select>';
|
print '</select>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br><div class="center">';
|
print '<br><div class="center">';
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
} else {
|
||||||
else
|
print '<table class="noborder" width="100%">';
|
||||||
{
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
print '<table class="noborder" width="100%">';
|
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
||||||
|
|
||||||
foreach($arrayofparameters as $title => $tab)
|
foreach($arrayofparameters as $title => $tab)
|
||||||
{
|
{
|
||||||
@ -186,11 +183,11 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -293,12 +293,12 @@ class ActionsDatapolicy
|
|||||||
/**
|
/**
|
||||||
* Execute action
|
* Execute action
|
||||||
*
|
*
|
||||||
* @param array $parameters Array of parameters
|
* @param array $parameters Array of parameters
|
||||||
* @param Object $object Object output on PDF
|
* @param Object $object Object output on PDF
|
||||||
* @param string $action 'add', 'update', 'view'
|
* @param string $action 'add', 'update', 'view'
|
||||||
* @return int <0 if KO,
|
* @return int <0 if KO,
|
||||||
* =0 if OK but we want to process standard actions too,
|
* =0 if OK but we want to process standard actions too,
|
||||||
* >0 if OK and we want to replace standard actions.
|
* >0 if OK and we want to replace standard actions.
|
||||||
*/
|
*/
|
||||||
function beforePDFCreation($parameters, &$object, &$action)
|
function beforePDFCreation($parameters, &$object, &$action)
|
||||||
{
|
{
|
||||||
@ -336,46 +336,46 @@ class ActionsDatapolicy
|
|||||||
|
|
||||||
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
|
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
|
||||||
{
|
{
|
||||||
$dialog = '<div id="dialogdatapolicy" 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 class="confirmmessage">' . img_help('', '') . ' ' . $langs->trans('DATAPOLICIES_PORTABILITE_CONFIRMATION') . '</div>';
|
||||||
$dialog .= "</div>";
|
$dialog .= "</div>";
|
||||||
$dialog .= '<script>
|
$dialog .= '<script>
|
||||||
$( function() {
|
$( function() {
|
||||||
$("#rpgpdbtn").on("click", function(){
|
$("#rpgpdbtn").on("click", function(){
|
||||||
var href = $(this).attr("href");
|
var href = $(this).attr("href");
|
||||||
$( "#dialogdatapolicy" ).dialog({
|
$( "#dialogdatapolicy" ).dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
buttons: {
|
buttons: {
|
||||||
"OK": function() {
|
"OK": function() {
|
||||||
window.open(href);
|
window.open(href);
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
},
|
},
|
||||||
"' . $langs->trans('Cancel') . '": function() {
|
"' . $langs->trans('Cancel') . '": function() {
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
} );
|
} );
|
||||||
</script>';
|
</script>';
|
||||||
echo $dialog;
|
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) {
|
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=datapolicy_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') {
|
} 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=datapolicy_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') {
|
} 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=datapolicy_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_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) {
|
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>';
|
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') {
|
} 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>';
|
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') {
|
} 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>';
|
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>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,11 +30,11 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
|||||||
*/
|
*/
|
||||||
Class DataPolicy
|
Class DataPolicy
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* getAllContactNotInformed
|
* getAllContactNotInformed
|
||||||
*
|
*
|
||||||
* @return number
|
* @return number
|
||||||
*/
|
*/
|
||||||
function getAllContactNotInformed()
|
function getAllContactNotInformed()
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
@ -144,71 +144,71 @@ Class DataPolicy
|
|||||||
*/
|
*/
|
||||||
function sendMailDataPolicyContact($contact)
|
function sendMailDataPolicyContact($contact)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
||||||
|
|
||||||
$sendto = $contact->email;
|
$sendto = $contact->email;
|
||||||
$code= md5($contact->email);
|
$code= md5($contact->email);
|
||||||
if (!empty($contact->default_lang)) {
|
if (!empty($contact->default_lang)) {
|
||||||
$l = $contact->default_lang;
|
$l = $contact->default_lang;
|
||||||
} else {
|
} else {
|
||||||
$l = $langs->defaultlang;
|
$l = $langs->defaultlang;
|
||||||
}
|
}
|
||||||
$s = "DATAPOLICIESSUBJECT_" . $l;
|
$s = "DATAPOLICIESSUBJECT_" . $l;
|
||||||
$ma = "DATAPOLICIESCONTENT_" . $l;
|
$ma = "DATAPOLICIESCONTENT_" . $l;
|
||||||
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
||||||
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
||||||
|
|
||||||
$subject = $conf->global->$s;
|
$subject = $conf->global->$s;
|
||||||
$message = $conf->global->$ma;
|
$message = $conf->global->$ma;
|
||||||
$linka = $conf->global->$la;
|
$linka = $conf->global->$la;
|
||||||
$linkr = $conf->global->$lr;
|
$linkr = $conf->global->$lr;
|
||||||
$sendtocc = $sendtobcc = '';
|
$sendtocc = $sendtobcc = '';
|
||||||
$filepath = $mimetype = $filename = array();
|
$filepath = $mimetype = $filename = array();
|
||||||
$deliveryreceipt = 0;
|
$deliveryreceipt = 0;
|
||||||
|
|
||||||
$substitutionarray = array(
|
$substitutionarray = array(
|
||||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&c='.$contact->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</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>',
|
'__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,
|
'__FIRSTNAME__' => $contact->firstname,
|
||||||
'__NAME__' => $contact->lastname,
|
'__NAME__' => $contact->lastname,
|
||||||
'__CIVILITY__' => $contact->civility,
|
'__CIVILITY__' => $contact->civility,
|
||||||
);
|
);
|
||||||
$subject = make_substitutions($subject, $substitutionarray);
|
$subject = make_substitutions($subject, $substitutionarray);
|
||||||
$message = make_substitutions($message, $substitutionarray);
|
$message = make_substitutions($message, $substitutionarray);
|
||||||
|
|
||||||
$actiontypecode = 'AC_EMAIL';
|
$actiontypecode = 'AC_EMAIL';
|
||||||
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
||||||
if ($message) {
|
if ($message) {
|
||||||
if ($sendtocc)
|
if ($sendtocc)
|
||||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||||
$actionmsg = dol_concatdesc($actionmsg, $message);
|
$actionmsg = dol_concatdesc($actionmsg, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Send mail
|
// Send mail
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
||||||
|
|
||||||
if ($mailfile->error) {
|
if ($mailfile->error) {
|
||||||
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
||||||
} else {
|
} else {
|
||||||
$result4 = $mailfile->sendfile();
|
$result4 = $mailfile->sendfile();
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
|
||||||
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
||||||
$contact->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
$contact->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
||||||
$contact->update($contact->id);
|
$contact->update($contact->id);
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setEventMessage($resultmasssend);
|
setEventMessage($resultmasssend);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -219,44 +219,44 @@ Class DataPolicy
|
|||||||
*/
|
*/
|
||||||
function sendMailDataPolicyCompany($societe)
|
function sendMailDataPolicyCompany($societe)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
||||||
|
|
||||||
$sendto = $societe->email;
|
$sendto = $societe->email;
|
||||||
|
|
||||||
$code= md5($societe->email);
|
$code= md5($societe->email);
|
||||||
if (!empty($societe->default_lang)) {
|
if (!empty($societe->default_lang)) {
|
||||||
$l = $societe->default_lang;
|
$l = $societe->default_lang;
|
||||||
} else {
|
} else {
|
||||||
$l = $langs->defaultlang;
|
$l = $langs->defaultlang;
|
||||||
}
|
}
|
||||||
$s = "DATAPOLICIESSUBJECT_" . $l;
|
$s = "DATAPOLICIESSUBJECT_" . $l;
|
||||||
$ma = "DATAPOLICIESCONTENT_" . $l;
|
$ma = "DATAPOLICIESCONTENT_" . $l;
|
||||||
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
||||||
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
||||||
|
|
||||||
$subject = $conf->global->$s;
|
$subject = $conf->global->$s;
|
||||||
$message = $conf->global->$ma;
|
$message = $conf->global->$ma;
|
||||||
$linka = $conf->global->$la;
|
$linka = $conf->global->$la;
|
||||||
$linkr = $conf->global->$lr;
|
$linkr = $conf->global->$lr;
|
||||||
$sendtocc = $sendtobcc = '';
|
$sendtocc = $sendtobcc = '';
|
||||||
$filepath = $mimetype = $filename = array();
|
$filepath = $mimetype = $filename = array();
|
||||||
$deliveryreceipt = 0;
|
$deliveryreceipt = 0;
|
||||||
|
|
||||||
$substitutionarray = array(
|
$substitutionarray = array(
|
||||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&s='.$societe->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</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>',
|
'__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);
|
$subject = make_substitutions($subject, $substitutionarray);
|
||||||
$message = make_substitutions($message, $substitutionarray);
|
$message = make_substitutions($message, $substitutionarray);
|
||||||
|
|
||||||
$actiontypecode = 'AC_EMAIL';
|
$actiontypecode = 'AC_EMAIL';
|
||||||
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
||||||
if ($message) {
|
if ($message) {
|
||||||
if ($sendtocc) {
|
if ($sendtocc) {
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||||
}
|
}
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||||
@ -264,23 +264,23 @@ Class DataPolicy
|
|||||||
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send mail
|
// Send mail
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
||||||
if ($mailfile->error) {
|
if ($mailfile->error) {
|
||||||
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
||||||
} else {
|
} else {
|
||||||
$result4 = $mailfile->sendfile();
|
$result4 = $mailfile->sendfile();
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
||||||
$societe->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
$societe->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
||||||
$societe->update($societe->id);
|
$societe->update($societe->id);
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setEventMessage($resultmasssend);
|
setEventMessage($resultmasssend);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -291,66 +291,66 @@ Class DataPolicy
|
|||||||
*/
|
*/
|
||||||
function sendMailDataPolicyAdherent($adherent)
|
function sendMailDataPolicyAdherent($adherent)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $db, $user;
|
global $langs, $conf, $db, $user;
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
$from = $user->getFullName($langs) . ' <' . $user->email . '>';
|
||||||
|
|
||||||
$sendto = $adherent->email;
|
$sendto = $adherent->email;
|
||||||
|
|
||||||
$code= md5($adherent->email);
|
$code= md5($adherent->email);
|
||||||
if (!empty($adherent->default_lang)) {
|
if (!empty($adherent->default_lang)) {
|
||||||
$l = $adherent->default_lang;
|
$l = $adherent->default_lang;
|
||||||
} else {
|
} else {
|
||||||
$l = $langs->defaultlang;
|
$l = $langs->defaultlang;
|
||||||
}
|
}
|
||||||
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
$la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
|
||||||
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
$lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
||||||
|
|
||||||
$subject = $conf->global->$s;
|
$subject = $conf->global->$s;
|
||||||
$message = $conf->global->$ma;
|
$message = $conf->global->$ma;
|
||||||
$linka = $conf->global->$la;
|
$linka = $conf->global->$la;
|
||||||
$linkr = $conf->global->$lr;
|
$linkr = $conf->global->$lr;
|
||||||
$sendtocc = $sendtobcc = '';
|
$sendtocc = $sendtobcc = '';
|
||||||
$filepath = $mimetype = $filename = array();
|
$filepath = $mimetype = $filename = array();
|
||||||
$deliveryreceipt = 0;
|
$deliveryreceipt = 0;
|
||||||
|
|
||||||
$substitutionarray = array(
|
$substitutionarray = array(
|
||||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicy/public/index.php?action=1&a='.$adherent->id.'&l='.$l.'&key='.$code, 3).'" target="_blank">'.$linka.'</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>',
|
'__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);
|
$subject = make_substitutions($subject, $substitutionarray);
|
||||||
$message = make_substitutions($message, $substitutionarray);
|
$message = make_substitutions($message, $substitutionarray);
|
||||||
|
|
||||||
$actiontypecode = 'AC_EMAIL';
|
$actiontypecode = 'AC_EMAIL';
|
||||||
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
||||||
if ($message) {
|
if ($message) {
|
||||||
if ($sendtocc) {
|
if ($sendtocc) {
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||||
}
|
}
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||||
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Send mail
|
// Send mail
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
|
||||||
if ($mailfile->error) {
|
if ($mailfile->error) {
|
||||||
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
$resultmasssend .= '<div class="error">' . $mailfile->error . '</div>';
|
||||||
} else {
|
} else {
|
||||||
$result4 = $mailfile->sendfile();
|
$result4 = $mailfile->sendfile();
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
$resultmasssend .= $langs->trans("MailSent") . ': ' . $sendto . "<br>";
|
||||||
$adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
$adherent->array_options['options_datapolicy_send'] = date('Y-m-d', time());
|
||||||
$adherent->update($user);
|
$adherent->update($user);
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setEventMessage($resultmasssend);
|
setEventMessage($resultmasssend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file datapolicy/class/datapolicycron.class.php
|
* \file htdocs/datapolicy/class/datapolicycron.class.php
|
||||||
* \ingroup datapolicy
|
* \ingroup datapolicy
|
||||||
* \brief Example hook overload.
|
* \brief Example hook overload.
|
||||||
*/
|
*/
|
||||||
@ -27,11 +27,11 @@
|
|||||||
*/
|
*/
|
||||||
class DataPolicyCron
|
class DataPolicyCron
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function exec
|
* Function exec
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function exec()
|
public function exec()
|
||||||
{
|
{
|
||||||
global $conf, $db, $langs, $user;
|
global $conf, $db, $langs, $user;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file datapolicy/lib/datapolicy.lib.php
|
* \file htdocs/datapolicy/lib/datapolicy.lib.php
|
||||||
* \ingroup datapolicy
|
* \ingroup datapolicy
|
||||||
* \brief Library files with common functions for datapolicy
|
* \brief Library files with common functions for datapolicy
|
||||||
*/
|
*/
|
||||||
@ -28,27 +29,26 @@
|
|||||||
*/
|
*/
|
||||||
function datapolicyAdminPrepareHead()
|
function datapolicyAdminPrepareHead()
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$langs->load("datapolicy@datapolicy");
|
$langs->load("datapolicy@datapolicy");
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/datapolicy/admin/setup.php", 1);
|
$head[$h][0] = DOL_URL_ROOT."/datapolicy/admin/setup.php";
|
||||||
$head[$h][1] = $langs->trans("Deletion");
|
$head[$h][1] = $langs->trans("Deletion");
|
||||||
$head[$h][2] = 'settings';
|
$head[$h][2] = 'settings';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS))
|
if (! empty($conf->global->DATAPOLICIES_ENABLE_EMAILS)) {
|
||||||
{
|
$head[$h][0] = DOL_URL_ROOT."/datapolicy/admin/setupmail.php";
|
||||||
$head[$h][0] = dol_buildpath("/datapolicy/admin/setupmail.php", 1);
|
$head[$h][1] = $langs->trans("DATAPOLICIESMail");
|
||||||
$head[$h][1] = $langs->trans("DATAPOLICIESMail");
|
$head[$h][2] = 'settings';
|
||||||
$head[$h][2] = 'settings';
|
$h++;
|
||||||
$h++;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
|
complete_head_from_modules($conf, $langs, $object, $head, $h, 'datapolicy');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,22 +17,22 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file datapolicy/mailing.php
|
* \file htdocs/datapolicy/mailing.php
|
||||||
* \ingroup datapolicy
|
* \ingroup datapolicy
|
||||||
* \brief datapolicy mailing page.
|
* \brief datapolicy mailing page.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
dol_include_once('/contact/class/contact.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
dol_include_once('/datapolicy/class/datapolicy.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php';
|
||||||
|
|
||||||
$idcontact = GETPOST('idc');
|
$idcontact = GETPOST('idc');
|
||||||
|
|
||||||
if(!empty($idcontact)){
|
if (!empty($idcontact)) {
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$contact->fetch($idcontact);
|
$contact->fetch($idcontact);
|
||||||
DataPolicy::sendMailDataPolicyContact($contact);
|
DataPolicy::sendMailDataPolicyContact($contact);
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
$contacts = new DataPolicy($db);
|
$contacts = new DataPolicy($db);
|
||||||
$contacts->getAllContactNotInformed();
|
$contacts->getAllContactNotInformed();
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file datapolicy/admin/setup.php
|
* \file htdocs/datapolicy/admin/setup.php
|
||||||
* \ingroup datapolicy
|
* \ingroup datapolicy
|
||||||
* \brief datapolicy setup page.
|
* \brief datapolicy setup page.
|
||||||
*/
|
*/
|
||||||
@ -30,11 +30,11 @@ if (!defined('NOREQUIREMENU'))
|
|||||||
define('NOREQUIREMENU', '1');
|
define('NOREQUIREMENU', '1');
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
dol_include_once('/contact/class/contact.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
dol_include_once('/societe/class/societe.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
dol_include_once('/adherents/class/adherent.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
dol_include_once('/user/class/user.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
dol_include_once('/datapolicy/class/datapolicy.class.php');
|
require_once DOL_DOCUMENT_ROOT.'/datapolicy/class/datapolicy.class.php';
|
||||||
|
|
||||||
$idc = GETPOST('c', 'int');
|
$idc = GETPOST('c', 'int');
|
||||||
$ids = GETPOST('s', 'int');
|
$ids = GETPOST('s', 'int');
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class Donations extends DolibarrApi
|
|||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->don = new Don($this->db);
|
$this->don = new Don($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -933,7 +933,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['e.ref']['checked'])) {
|
if (! empty($arrayfields['e.ref']['checked'])) {
|
||||||
// We are on a specific warehouse card, no filter on other should be possible
|
// We are on a specific warehouse card, no filter on other should be possible
|
||||||
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, "", $sortfield, $sortorder);
|
||||||
|
}
|
||||||
if (! empty($arrayfields['m.fk_user_author']['checked'])) {
|
if (! empty($arrayfields['m.fk_user_author']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['m.fk_user_author']['label'], $_SERVER["PHP_SELF"], "m.fk_user_author", "", $param, "", $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -763,7 +763,7 @@ if (! empty($id) || ! empty($ref))
|
|||||||
<td class="liste_titre center"><?php echo $langs->trans('OnBuy') ?></td>
|
<td class="liste_titre center"><?php echo $langs->trans('OnBuy') ?></td>
|
||||||
<td class="liste_titre"></td>
|
<td class="liste_titre"></td>
|
||||||
<?php
|
<?php
|
||||||
print '<td class="liste_titre" align="middle">';
|
print '<td class="liste_titre center">';
|
||||||
$searchpicto=$form->showCheckAddButtons('checkforselect', 1);
|
$searchpicto=$form->showCheckAddButtons('checkforselect', 1);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -802,7 +802,7 @@ if (! empty($id) || ! empty($ref))
|
|||||||
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>
|
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap center">';
|
||||||
if ($productCombinations || $massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
if ($productCombinations || $massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
{
|
{
|
||||||
$selected=0;
|
$selected=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user