From: Johan Cwiklinski Date: Mon, 27 Sep 2021 16:59:32 +0000 (+0200) Subject: Add a preference to send emails to member by default X-Git-Tag: 0.9.5.1~94 X-Git-Url: https://git.agnieray.net/?a=commitdiff_plain;h=cebec3d089556062eda6f99c1523115f90866e31;p=galette.git Add a preference to send emails to member by default closes #1481 and closes #1536 --- diff --git a/galette/lib/Galette/Core/Preferences.php b/galette/lib/Galette/Core/Preferences.php index 6d707f738..6b1feb908 100644 --- a/galette/lib/Galette/Core/Preferences.php +++ b/galette/lib/Galette/Core/Preferences.php @@ -7,7 +7,7 @@ * * PHP version 5 * - * Copyright © 2007-2014 The Galette Team + * Copyright © 2007-2021 The Galette Team * * This file is part of Galette (http://galette.tuxfamily.org). * @@ -27,7 +27,7 @@ * @category Core * @package Galette * @author Johan Cwiklinski - * @copyright 2007-2014 The Galette Team + * @copyright 2007-2021 The Galette Team * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version * @link http://galette.tuxfamily.org * @since Available since 0.7dev - 2007-10-14 @@ -50,7 +50,7 @@ use Galette\Repository\Members; * @name Preferences * @package Galette * @author Johan Cwiklinski - * @copyright 2007-2014 The Galette Team + * @copyright 2007-2021 The Galette Team * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version * @link http://galette.tuxfamily.org * @since Available since 0.7dev - 2007-10-14 @@ -74,6 +74,7 @@ use Galette\Repository\Members; * @property string $pref_email * @property string $pref_email_newadh * @property boolean $pref_bool_mailadh + * @property boolean $pref_bool_mailowner * @property boolean $pref_editor_enabled * @property integer $pref_mail_method Mail method, see GaletteMail::METHOD_* * @property string $pref_mail_smtp @@ -202,6 +203,7 @@ class Preferences 'pref_email' => 'mail@domain.com', 'pref_email_newadh' => 'mail@domain.com', 'pref_bool_mailadh' => false, + 'pref_bool_mailowner' => false, 'pref_editor_enabled' => false, 'pref_mail_method' => GaletteMail::METHOD_DISABLED, 'pref_mail_smtp' => '', diff --git a/galette/templates/default/ajouter_contribution.tpl b/galette/templates/default/ajouter_contribution.tpl index e009d4f01..b7e2b84b1 100644 --- a/galette/templates/default/ajouter_contribution.tpl +++ b/galette/templates/default/ajouter_contribution.tpl @@ -160,7 +160,7 @@ {if not $contribution->id and $pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_DISABLED')}

- + pref_bool_mailowner || isset($smarty.post.mail_confirm) and $smarty.post.mail_confirm != ""}checked="checked"{/if}/>
{_T string="Member will receive a notification by email, if he has an address."}

{/if} diff --git a/galette/templates/default/member.tpl b/galette/templates/default/member.tpl index e4abcbf34..862287d64 100644 --- a/galette/templates/default/member.tpl +++ b/galette/templates/default/member.tpl @@ -77,7 +77,7 @@ {_T string="Notify member his account has been created"} {/if} - + pref_bool_mailowner || isset($smarty.post.mail_confirm) and $smarty.post.mail_confirm != ""}checked="checked"{/if}/>
{if $member->id} {_T string="Member will be notified by email his account has been modified."} diff --git a/galette/templates/default/preferences.tpl b/galette/templates/default/preferences.tpl index a7034f5d9..782cffabd 100644 --- a/galette/templates/default/preferences.tpl +++ b/galette/templates/default/preferences.tpl @@ -284,6 +284,11 @@ {_T string="Sends an email each time a new member registers online or edit his/her account"}

+

+ + {_T string="Sends an email each time a member card or a contribution has been added or edited. This can be disabled for each case."} + +

{_T string="Automatically wrap emails texts before sending. Make sure to wrap yourself if you disable that. Please note that current editing mailing will not be affected by a change."}