]> git.agnieray.net Git - galette.git/commitdiff
One sender mail is enough, multiple is never used
authorJohan Cwiklinski <jcwiklinski@teclib.com>
Sat, 16 Nov 2019 13:28:35 +0000 (14:28 +0100)
committerJohan Cwiklinski <jcwiklinski@teclib.com>
Sat, 16 Nov 2019 17:59:34 +0000 (18:59 +0100)
galette/lib/Galette/Core/Preferences.php
galette/templates/default/member.tpl
galette/templates/default/preferences.tpl

index b64a7b728c2bcf3b471d13587fa4f07b9875b7b6..d9c3372f09954e993b2a3daf81b21d8211ac1036 100644 (file)
@@ -762,7 +762,7 @@ class Preferences
     public function __get($name)
     {
         $forbidden = array('logged', 'admin', 'active', 'defaults');
-        $virtuals = array('vpref_email', 'vpref_email_newadh');
+        $virtuals = array('vpref_email_newadh');
 
         if (!in_array($name, $forbidden) && isset($this->prefs[$name])) {
             if (GALETTE_MODE === 'DEMO'
@@ -780,7 +780,7 @@ class Preferences
                     }
                 }
 
-                if (in_array($name, ['pref_email', 'pref_email_newadh'])) {
+                if (in_array($name, ['pref_email_newadh'])) {
                     $values = explode(',', $value);
                     $value = $values[0]; //take first as default
                 }
@@ -846,10 +846,10 @@ class Preferences
             //"The Name <mail@domain.com>,The Other <other@mail.com>" expect for reply_to.
             $addresses = [];
             if (trim($value) != '') {
-                if ($name == 'pref_email_reply_to') {
-                    $addresses = [$value];
-                } else {
+                if ($name == 'pref_email_newadh') {
                     $addresses = explode(',', $value);
+                } else {
+                    $addresses = [$value];
                 }
             }
             foreach ($addresses as $address) {
index 7d51255883d8c96065463514b8fc0b6824edc290..eb425dcb1cb6df16d905287ceb0678c162db6a2b 100644 (file)
             {include file="js_chosen_adh.tpl" js_chosen_id="#parent_id"}
             $(function() {
                 $('#is_company').change(function(){
-                    //console.log(this.checked);
                     $('#company_field').toggleClass('hidden');
                     $('#company_field').backgroundFade(
                         {
index 72b825a71d74d7f2de338c6de066f1d1b95195bb..ab09773e9974016c67c9b58512667b6c7526e056 100644 (file)
                 </p>
                 <p>
                     <label for="pref_email" class="bline">{_T string="Sender Email:"}</label>
-        {assign var="pref_email" value=""}
-        {foreach from=$preferences->vpref_email item=vmail}
-            {if $vmail@first }
-                {assign var="pref_email" value=$vmail}
-            {else}
-                {assign var="pref_email" value=$pref_email|cat:",{$vmail}"}
-            {/if}
-        {/foreach}
-                    <input type="text" name="pref_email" id="pref_email" value="{$pref_email}" maxlength="100" size="30"{if isset($required.pref_email) and $required.pref_email eq 1} required="required"{/if}/>
-                    <span class="exemple">{_T string="(You can enter several emails separated with a comma. First address will be the default one.)"}</span>
+                    <input type="text" name="pref_email" id="pref_email" value="{$pref.pref_email}" maxlength="100" size="30"{if isset($required.pref_email) and $required.pref_email eq 1} required="required"{/if}/>
                 </p>
                 <p>
                     <label for="pref_email_reply_to" class="bline tooltip">{_T string="Reply-To Email:"}</label>