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'
}
}
- 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
}
//"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) {
{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(
{
</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>