transform into box
This commit is contained in:
parent
5dd0b3b1c6
commit
96fbee5eaf
@ -193,7 +193,8 @@ class modAdherent extends DolibarrModules
|
|||||||
//-------
|
//-------
|
||||||
$this->boxes = array(
|
$this->boxes = array(
|
||||||
0=>array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'),
|
0=>array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'),
|
||||||
2=>array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home')
|
2=>array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home'),
|
||||||
|
3=>array('file'=>'box_last_modified_members', 'enabledbydefaulton'=>'membersindex'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
@ -341,10 +342,8 @@ class modAdherent extends DolibarrModules
|
|||||||
// Add extra fields
|
// Add extra fields
|
||||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
|
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||||
{
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
|
||||||
{
|
|
||||||
$fieldname = 'extra.'.$obj->name;
|
$fieldname = 'extra.'.$obj->name;
|
||||||
$fieldlabel = ucfirst($obj->label);
|
$fieldlabel = ucfirst($obj->label);
|
||||||
$this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : '');
|
$this->import_fields_array[$r][$fieldname] = $fieldlabel.($obj->fieldrequired ? '*' : '');
|
||||||
@ -399,24 +398,22 @@ class modAdherent extends DolibarrModules
|
|||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|
||||||
//ODT template
|
// ODT template
|
||||||
/*
|
/*
|
||||||
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt';
|
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/orders/template_order.odt';
|
||||||
$dirodt=DOL_DATA_ROOT.'/doctemplates/orders';
|
$dirodt=DOL_DATA_ROOT.'/doctemplates/orders';
|
||||||
$dest=$dirodt.'/template_order.odt';
|
$dest=$dirodt.'/template_order.odt';
|
||||||
|
|
||||||
if (file_exists($src) && ! file_exists($dest))
|
if (file_exists($src) && ! file_exists($dest)) {
|
||||||
{
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
dol_mkdir($dirodt);
|
||||||
dol_mkdir($dirodt);
|
$result=dol_copy($src,$dest,0,0);
|
||||||
$result=dol_copy($src,$dest,0,0);
|
if ($result < 0) {
|
||||||
if ($result < 0)
|
$langs->load("errors");
|
||||||
{
|
$this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest);
|
||||||
$langs->load("errors");
|
return 0;
|
||||||
$this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest);
|
}
|
||||||
return 0;
|
}*/
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
$sql = array(
|
$sql = array(
|
||||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type='member' AND entity = ".$conf->entity,
|
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type='member' AND entity = ".$conf->entity,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user