Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dasc3er 2021-07-15 18:14:22 +02:00
commit d5e7fa2a5a
2 changed files with 26 additions and 21 deletions

View File

@ -28,7 +28,7 @@ $smtp = $template->account;
$body = $module->replacePlaceholders($id_record, $template['body']);
$subject = $module->replacePlaceholders($id_record, $template['subject']);
$email = $module->replacePlaceholders($id_record, '{email}');
$emails = explode( ';', $module->replacePlaceholders($id_record, '{email}') );
$id_anagrafica = $module->replacePlaceholders($id_record, '{id_anagrafica}');
// Campi mancanti
@ -80,10 +80,17 @@ if (!empty($template['bcc'])) {
echo '
<b>'.tr('Destinatari').' <span class="tip" title="'.tr('Email delle sedi, dei referenti o agente collegato all\'anagrafica.').'"><i class="fa fa-question-circle-o"></i></span></b>
<div class="row" id="lista-destinatari">
<div class="col-md-12">
{[ "type": "email", "name": "destinatari[0]", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 1 ]}
</div>
<div class="row" id="lista-destinatari">';
$idx = 0;
foreach( $emails as $email ){
echo '
<div class="col-md-12">
{[ "type": "email", "name": "destinatari['.$idx++.']", "value": "'.$email.'", "icon-before": "choice|email", "extra": "onkeyup=\'aggiungiDestinatario();\'", "class": "destinatari", "required": 1 ]}
</div>';
}
echo '
</div>
<br>

View File

@ -165,6 +165,14 @@ echo '
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Cliente').'", "name": "idanagrafica", "required": 1, "value": "'.(!$id_cliente ? $id_anagrafica : $id_cliente).'", "ajax-source": "clienti", "icon-after": "add|'.$module_anagrafiche['id'].'|tipoanagrafica=Cliente&readonly_tipo=1", "readonly": "'.((empty($id_anagrafica) && empty($id_cliente)) ? 0 : 1).'" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Sede destinazione').'", "name": "idsede_destinazione", "value": "'.$id_sede.'", "ajax-source": "sedi" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Per conto di').'", "name": "idclientefinale", "value": "'.$id_cliente_finale.'", "ajax-source": "clienti" ]}
</div>
</div>
<div class="row">
@ -217,20 +225,6 @@ echo '
<div class="box-body">
<div class="row">
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Zona').'", "name": "idzona", "values": "query=SELECT id, CONCAT_WS(\' - \', nome, descrizione) AS descrizione FROM an_zone ORDER BY nome", "placeholder": "'.tr('Nessuna zona').'", "help": "'.tr('La zona viene definita automaticamente in base al cliente selezionato').'.", "readonly": "1", "value": "'.$id_zona.'" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Sede destinazione').'", "name": "idsede_destinazione", "value": "'.$id_sede.'", "ajax-source": "sedi" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Per conto di').'", "name": "idclientefinale", "value": "'.$id_cliente_finale.'", "ajax-source": "clienti" ]}
</div>
</div>
<div class="row">
<div class="col-md-4">
{[ "type": "timestamp", "label": "'.tr('Data/ora scadenza').'", "name": "data_scadenza", "required": 0, "value": "'.$data_scadenza.'" ]}
</div>
@ -295,13 +289,17 @@ echo '
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div class="col-md-4">
{[ "type": "timestamp", "label": "'.tr('Inizio attività').'", "name": "orario_inizio", "required": '.($origine_dashboard ? 1 : 0).', "value": "'.$inizio_sessione.'" ]}
</div>
<div class="col-md-6">
<div class="col-md-4">
{[ "type": "timestamp", "label": "'.tr('Fine attività').'", "name": "orario_fine", "required": '.($origine_dashboard ? 1 : 0).', "value": "'.$fine_sessione.'" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Zona').'", "name": "idzona", "values": "query=SELECT id, CONCAT_WS(\' - \', nome, descrizione) AS descrizione FROM an_zone ORDER BY nome", "placeholder": "'.tr('Nessuna zona').'", "help": "'.tr('La zona viene definita automaticamente in base al cliente selezionato').'.", "readonly": "1", "value": "'.$id_zona.'" ]}
</div>
</div>
<div class="row">