. */ use Modules\Emails\Template; include_once __DIR__.'/../../core.php'; // Controllo se il template è ancora attivo if (empty($template)) { echo '
'.tr('ATTENZIONE! Questa newsletter risulta collegata ad un template non più presente a sistema').'
'; } $block_edit = $newsletter->state != 'DEV'; $stati = [ [ 'id' => 'DEV', 'text' => 'Bozza', ], [ 'id' => 'WAIT', 'text' => 'Invio in corso', ], [ 'id' => 'OK', 'text' => 'Completata', ], ]; echo '

'.tr('Dati campagna').'

'.Modules::link('Template email', $record['id_template'], null, null, 'class="pull-right"').' {[ "type": "select", "label": "'.tr('Template email').'", "name": "id_template", "values": "query=SELECT `em_templates`.`id`, `em_templates_lang`.`title` AS descrizione FROM `em_templates` LEFT JOIN `em_templates_lang` ON (`em_templates`.`id` = `em_templates_lang`.`id_record` AND `em_templates_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "required": 1, "value": "$id_template$", "readonly": 1 ]}
{[ "type": "text", "label": "'.tr('Nome').'", "name": "name", "required": 1, "value": "$name$" ]}
{[ "type": "select", "label": "'.tr('Stato').'", "name": "state", "values": '.json_encode($stati).', "required": 1, "value": "$state$", "class": "unblockable" ]}
{[ "type": "timestamp", "label": "'.tr('Data di completamento').'", "name": "completed_at", "value": "$completed_at$", "readonly": 1 ]}
{[ "type": "text", "label": "'.tr('Oggetto').'", "name": "subject", "value": "$subject$" ]}
'; echo input([ 'type' => 'ckeditor', 'use_full_ckeditor' => 1, 'label' => tr('Contenuto'), 'name' => 'content', 'value' => $record['content'], ]); echo '

'.tr('Aggiunta destinatari').'

{[ "type": "select", "label": "'.tr('Destinatari').'", "name": "receivers[]", "ajax-source": "destinatari_newsletter", "multiple": 1 ]}
{[ "type": "select", "label": "'.tr('Lista').'", "name": "id_list", "ajax-source": "liste_newsletter" ]}
'; $numero_destinatari = $newsletter->destinatari()->count(); $destinatari_senza_mail = $newsletter->getNumeroDestinatariSenzaEmail(); echo '

'.tr('Destinatari').' ('.$numero_destinatari.')
'.(($destinatari_senza_mail > 0) ? ' '.$destinatari_senza_mail.'' : '') .'

'.tr('Ragione sociale').' '.tr('Tipo').' '.tr('Tipologia').' '.tr('E-mail').' '.tr('Data di invio').' '.tr('Newsletter').' #
'.tr('Elimina tutti').'
{( "name": "filelist_and_upload", "id_module": "$id_module$", "id_record": "$id_record$" )} '.tr('Elimina').' '; if ($block_edit) { echo ' '; } echo ' ';