2017-09-22 12:31:06 +02:00
< ? php
include_once __DIR__ . '/../../core.php' ;
echo '
2017-09-22 14:37:18 +02:00
< script src = " '. $rootdir .'/assets/dist/js/ckeditor/ckeditor.js " ></ script > ' ;
2017-09-22 12:31:06 +02:00
?>
< form action = " " method = " post " id = " add-form " >
< input type = " hidden " name = " op " value = " update " >
< input type = " hidden " name = " backto " value = " record-edit " >
<!-- DATI -->
< div class = " panel panel-primary " >
< div class = " panel-heading " >
2018-02-18 19:53:23 +01:00
< h3 class = " panel-title " >< ? php echo tr ( 'Dati' ); ?> </h3>
2017-09-22 12:31:06 +02:00
</ div >
< div class = " panel-body " >
< div class = " row " >
2018-02-20 16:46:23 +01:00
< div class = " col-md-8 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Nome'); ?> " , " name " : " name " , " value " : " $name $ " , " required " : 1 ]}
2017-09-22 12:31:06 +02:00
</ div >
2018-02-20 16:46:23 +01:00
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " span " , " label " : " <?php echo tr('Modulo del template'); ?> " , " name " : " module " , " values " : " query=SELECT id, title AS descrizione FROM zz_modules WHERE enabled = 1 " , " value " : " <?php echo Modules::get( $records[0] ['id_module'])['title']; ?> " ]}
2017-09-22 12:31:06 +02:00
</ div >
2018-02-20 16:46:23 +01:00
</ div >
< div class = " row " >
< div class = " col-md-8 " >
{[ " type " : " select " , " label " : " <?php echo tr('Indirizzo email'); ?> " , " name " : " smtp " , " value " : " $id_smtp $ " , " ajax-source " : " smtp " ]}
</ div >
2017-09-22 12:31:06 +02:00
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " checkbox " , " label " : " <?php echo tr('Notifica di lettura'); ?> " , " name " : " read_notify " , " value " : " $read_notify $ " , " placeholder " : " <?php echo tr('Abilita la notifica di lettura'); ?> " ]}
2017-09-22 12:31:06 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-md-8 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Oggetto'); ?> " , " name " : " subject " , " value " : " $subject $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Icona'); ?> " , " name " : " icon " , " value " : " $icon $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('CC'); ?> " , " name " : " cc " , " value " : " $cc $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('BCC'); ?> " , " name " : " port " , " value " : " $bcc $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
< div class = " col-md-4 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Reply to'); ?> " , " name " : " reply_to " , " value " : " $reply_to $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
</ div >
2018-02-22 09:44:26 +01:00
< ? php
// Stampe
$selected_prints = $dbo -> fetchArray ( 'SELECT id_print FROM zz_email_print WHERE id_email = ' . prepare ( $id_record ));
$selected = array_column ( $selected_prints , 'id_print' );
echo '
< div class = " row " >
< div class = " col-md-12 " >
{[ " type " : " select " , " multiple " : " 1 " , " label " : " '.tr('Stampe').' " , " name " : " prints[] " , " value " : " '.implode(',', $selected ).' " , " values " : " query=SELECT id, title AS text FROM zz_prints WHERE id_module = '.prepare( $records[0] ['id_module']).' " ]}
</ div >
</ div > ' ;
?>
2017-09-22 12:31:06 +02:00
< div class = " row " >
< div class = " col-md-12 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " textarea " , " label " : " <?php echo tr('Contenuto'); ?> " , " name " : " body " , " value " : " $body $ " ]}
2017-09-22 12:31:06 +02:00
</ div >
</ div >
</ div >
</ div >
</ form >
< a class = " btn btn-danger ask " data - backto = " record-list " >
< i class = " fa fa-trash " ></ i > < ? php echo tr ( 'Elimina' ); ?>
</ a >
< script >
$ ( document ) . ready ( function (){
2017-09-22 14:37:18 +02:00
CKEDITOR . replace ( " body " );
2017-09-22 12:31:06 +02:00
});
</ script >