2017-09-22 11:13:36 +02:00
< ? php
include_once __DIR__ . '/../../core.php' ;
?>
2018-02-23 16:04:50 +01:00
< form action = " " method = " post " id = " edit-form " >
2017-09-22 11:13:36 +02:00
< 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 11:13:36 +02:00
</ div >
< div class = " panel-body " >
< div class = " row " >
2017-09-22 15:16:56 +02:00
< div class = " col-md-6 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Nome account'); ?> " , " name " : " name " , " value " : " $name $ " , " required " : 1 ]}
2017-09-22 11:13:36 +02:00
</ div >
< div class = " col-md-3 " >
2018-08-11 15:49:46 +02:00
{[ " type " : " checkbox " , " label " : " <?php echo tr('Indirizzo PEC'); ?> " , " name " : " pec " , " value " : " $pec $ " ]}
2017-09-22 15:16:56 +02:00
</ div >
< div class = " col-md-3 " >
2018-09-27 12:54:57 +02:00
{[ " type " : " checkbox " , " label " : " <?php echo tr('Indirizzo predefinito'); ?> " , " name " : " predefined " , " value " : " $predefined $ " , " help " : " <?php echo tr('Account da utilizzare per l \ 'invio di tutte le email dal gestionale.'); ?> " ]}
2017-09-22 11:13:36 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-md-6 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Nome visualizzato'); ?> " , " name " : " from_name " , " value " : " $from_name $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
2018-12-27 19:08:23 +01:00
< div class = " col-md-3 " >
2018-03-01 20:35:25 +01:00
{[ " type " : " email " , " label " : " <?php echo tr('Email mittente'); ?> " , " name " : " from_address " , " value " : " $from_address $ " , " required " : 1 ]}
2017-09-22 11:13:36 +02:00
</ div >
2018-12-27 19:08:23 +01:00
< div class = " col-md-3 " >
{[ " type " : " checkbox " , " label " : " <?php echo tr('Non verificare il certificato SSL'); ?> " , " name " : " ssl_no_verify " , " value " : " $ssl_no_verify $ " ]}
</ div >
2017-09-22 11:13:36 +02:00
</ div >
< div class = " row " >
< div class = " col-md-6 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Server SMTP'); ?> " , " name " : " server " , " required " : 1 , " value " : " $server $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
< div class = " col-md-3 " >
2018-03-02 17:19:15 +01:00
{[ " type " : " number " , " label " : " <?php echo tr('Porta SMTP'); ?> " , " name " : " port " , " required " : 1 , " class " : " text-center " , " decimals " : " 0 " , " max-value " : " 65535 " , " value " : " $port $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
< div class = " col-md-3 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " select " , " label " : " <?php echo tr('Sicurezza SMTP'); ?> " , " name " : " encryption " , " values " : " list= \" \" : \" <?php echo tr('Nessuna'); ?> \" , \" tls \" : \" TLS \" , \" ssl \" : \" SSL \" " , " value " : " $encryption $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-md-6 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " text " , " label " : " <?php echo tr('Username SMTP'); ?> " , " name " : " username " , " value " : " $username $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
< div class = " col-md-6 " >
2018-12-29 04:53:21 +01:00
{[ " type " : " password " , " label " : " <?php echo tr('Password SMTP'); ?> " , " class " : " " , " name " : " password " , " value " : " $password $ " , " icon-after " : " <i title= \" <?php echo tr('Visualizza password'); ?> \" class= \" fa fa-eye clickable \" ></i> " ]}
2017-09-22 11:13:36 +02:00
</ div >
</ div >
< div class = " row " >
< div class = " col-md-12 " >
2018-02-18 19:53:23 +01:00
{[ " type " : " textarea " , " label " : " <?php echo tr('Note'); ?> " , " name " : " note " , " value " : " $note $ " ]}
2017-09-22 11:13:36 +02:00
</ div >
</ div >
</ div >
</ div >
</ form >
2018-09-05 10:43:12 +02:00
< ? php
// Collegamenti diretti
// Template email collegati a questo account
$elementi = $dbo -> fetchArray ( 'SELECT `id`, `name` FROM `zz_emails` WHERE `id_smtp` = ' . prepare ( $id_record ));
if ( ! empty ( $elementi )) {
echo '
< div class = " box box-warning collapsable collapsed-box " >
< div class = " box-header with-border " >
< h3 class = " box-title " >< i class = " fa fa-warning " ></ i > '.tr(' Template email collegati : _NUM_ ' , [
2018-09-19 09:57:30 +02:00
'_NUM_' => count ( $elementi ),
2018-09-05 10:43:12 +02:00
]) . ' </ h3 >
< div class = " box-tools pull-right " >
< button type = " button " class = " btn btn-box-tool " data - widget = " collapse " >< i class = " fa fa-plus " ></ i ></ button >
</ div >
</ div >
< div class = " box-body " >
< ul > ' ;
foreach ( $elementi as $elemento ) {
echo '
< li > '.Modules::link(' Template email ', $elemento[' id '], $elemento[' name ']).' </ li > ' ;
}
echo '
</ ul >
</ div >
</ div > ' ;
} else {
echo '
2017-09-22 11:13:36 +02:00
< a class = " btn btn-danger ask " data - backto = " record-list " >
2018-09-05 10:43:12 +02:00
< i class = " fa fa-trash " ></ i > '.tr(' Elimina ').'
</ a > ' ;
}
2018-12-29 04:53:21 +01:00
?>
< script type = " text/javascript " >
$ ( document ) . ready ( function () {
$ ( " .input-group-addon " ) . on ( 'click' , function () {
if ( $ ( this ) . parent () . find ( " i " ) . hasClass ( 'fa-eye' )) {
$ ( " #password " ) . attr ( " type " , " text " );
$ ( this ) . parent () . find ( " i " ) . removeClass ( 'fa-eye' ) . addClass ( 'fa-eye-slash' );
2018-12-29 12:03:22 +01:00
$ ( this ) . parent () . find ( " i " ) . attr ( 'title' , '<?php echo tr(' Nascondi password '); ?>' );
2018-12-29 04:53:21 +01:00
} else {
$ ( " #password " ) . attr ( " type " , " password " );
$ ( this ) . parent () . find ( " i " ) . removeClass ( 'fa-eye-slash' ) . addClass ( 'fa-eye' );
2018-12-29 12:03:22 +01:00
$ ( this ) . parent () . find ( " i " ) . attr ( 'title' , '<?php echo tr(' Visualizza password '); ?>' );
2018-12-29 04:53:21 +01:00
}
});
});
</ script >