2
0
forked from Wavyzz/dolibarr

New: [ task #494 ] Send an email to foundation when a new member has

auto-subscribed
This commit is contained in:
Laurent Destailleur
2012-08-26 22:33:27 +02:00
parent 7fa4b9b423
commit bdaaa1d038
6 changed files with 42 additions and 5 deletions

View File

@@ -35,13 +35,13 @@ For users:
- New: More surface control on stock correction page. - New: More surface control on stock correction page.
- New: Add great britain provinces. - New: Add great britain provinces.
- New: Update libs/tools/logo for DoliWamp. - New: Update libs/tools/logo for DoliWamp.
- New: [ task #494 ] Send an email to foundation when a new member has auto-subscribed
- New: [ task #326 ]: Add a numbering module to suggest automatically a product ref
- New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates
- Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does - Fix: No images into product description lines as PDF generation does
not work with this. not work with this.
- New: [ task #326 ]: Add a numbering module to suggest automatically a product ref
- Fix: Errors weren't being shown in customer's & supplier's orders - Fix: Errors weren't being shown in customer's & supplier's orders
- New: Add conditional substitution IF/ELSEIF/ENDIF for ODT templates
- New: Basic implementation of hooks and triggers for a lot (most) of core modules: action/calendar, trips and expenses, dons, vat payment, contact/society, contract, product lines, expedition, order supplier and order invoice (lines included), intervention card, project, tasks
- Fix: [ bug #499 ]: Supplier order input method not translated
For developers: For developers:
- New: Add webservice for thirdparty creation and list. - New: Add webservice for thirdparty creation and list.
@@ -55,6 +55,9 @@ For developers:
ldap::connect, formadmin::select_lang, ldap::connect, formadmin::select_lang,
html::select_tva html::select_tva
- New: Add custom substitution function for ODT product lines: mymodule_completesubstitutionarray_lines() - New: Add custom substitution function for ODT product lines: mymodule_completesubstitutionarray_lines()
- New: Basic implementation of hooks and triggers for a lot (most) of core modules:
action/calendar, trips and expenses, dons, vat payment, contact/society, contract, product lines,
expedition, order supplier and order invoice (lines included), intervention card, project, tasks.
For translators: For translators:
- New: Update language files (de, tr, pt, ca, es, en, fr). - New: Update language files (de, tr, pt, ca, es, en, fr).

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
* *
* 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
@@ -248,6 +249,8 @@ print '<br>';
* Edition des variables globales non rattache a un theme specifique * Edition des variables globales non rattache a un theme specifique
*/ */
$constantes=array( $constantes=array(
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_NOTIF_MAIL',
'ADHERENT_AUTOREGISTER_MAIL_SUBJECT', 'ADHERENT_AUTOREGISTER_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_MAIL', 'ADHERENT_AUTOREGISTER_MAIL',
'ADHERENT_MAIL_VALID_SUBJECT', 'ADHERENT_MAIL_VALID_SUBJECT',

View File

@@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
* *
* 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
@@ -1093,7 +1094,7 @@ function form_constantes($tableau)
print '</td><td>'; print '</td><td>';
print '<input type="hidden" name="consttype" value="texte">'; print '<input type="hidden" name="consttype" value="texte">';
} }
else if (in_array($const,array('ADHERENT_AUTOREGISTER_MAIL','ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) else if (in_array($const,array('ADHERENT_AUTOREGISTER_NOTIF_MAIL','ADHERENT_AUTOREGISTER_MAIL','ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL')))
{ {
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('constvalue_'.$const,$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60); $doleditor=new DolEditor('constvalue_'.$const,$obj->value,'',160,'dolibarr_notes','',false,false,$conf->fckeditor->enabled,5,60);

View File

@@ -131,6 +131,8 @@ AddSubscription=Add subscription
ShowSubscription=Show subscription ShowSubscription=Show subscription
MemberModifiedInDolibarr=Member modified in Dolibarr MemberModifiedInDolibarr=Member modified in Dolibarr
SendAnEMailToMember=Send information email to member SendAnEMailToMember=Send information email to member
DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet du mail reçu en cas d'auto-inscription d'un invité
DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Mail reçu en cas d'auto-inscription d'un invité
DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=EMail subject for member autosubscription DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=EMail subject for member autosubscription
DescADHERENT_AUTOREGISTER_MAIL=EMail for member autosubscription DescADHERENT_AUTOREGISTER_MAIL=EMail for member autosubscription
DescADHERENT_MAIL_VALID_SUBJECT=EMail subject for member validation DescADHERENT_MAIL_VALID_SUBJECT=EMail subject for member validation

View File

@@ -135,6 +135,8 @@ AddSubscription=Ajouter adhésion/cotisation
ShowSubscription=Afficher adhésion ShowSubscription=Afficher adhésion
MemberModifiedInDolibarr=Adhérent modifié dans Dolibarr MemberModifiedInDolibarr=Adhérent modifié dans Dolibarr
SendAnEMailToMember=Envoyer email d'information à l'adhérent SendAnEMailToMember=Envoyer email d'information à l'adhérent
DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Sujet du mail reçu en cas d'auto-inscription d'un invité
DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Mail reçu en cas d'auto-inscription d'un invité
DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=Sujet du mail envoyé en cas d'auto-inscription d'un invité DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=Sujet du mail envoyé en cas d'auto-inscription d'un invité
DescADHERENT_AUTOREGISTER_MAIL=Mail envoyé en cas d'auto-inscription d'un invité DescADHERENT_AUTOREGISTER_MAIL=Mail envoyé en cas d'auto-inscription d'un invité
DescADHERENT_MAIL_VALID_SUBJECT=Sujet du mail de validation adhérent DescADHERENT_MAIL_VALID_SUBJECT=Sujet du mail de validation adhérent

View File

@@ -260,6 +260,32 @@ if ($action == 'add')
$result=$adh->send_an_email($conf->global->ADHERENT_AUTOREGISTER_MAIL,$conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT,array(),array(),array(),"","",0,-1); $result=$adh->send_an_email($conf->global->ADHERENT_AUTOREGISTER_MAIL,$conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT,array(),array(),array(),"","",0,-1);
} }
// Send email to the foundation to say a new member subscribed with autosubscribe form
if (! empty($conf->global->MAIN_INFO_SOCIETE_MAIL) && ! empty($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT) &&
! empty($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL) )
{
$to=$adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
$from=$conf->global->ADHERENT_MAIL_FROM;
$mailfile = new CMailFile(
$conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT,
$to,
$from,
$adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL),
array(),
array(),
array(),
"",
"",
0,
-1
);
if (! $mailfile->sendfile())
{
dol_syslog($langs->trans("ErrorFailedToSendMail",$from,$to), LOG_ERR);
}
}
if (! empty($backtopage)) $urlback=$backtopage; if (! empty($backtopage)) $urlback=$backtopage;
else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) else if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION)
{ {