Aggiunta selezione stampe predefinite per template
This commit is contained in:
parent
013ff189d1
commit
830982c089
|
@ -486,7 +486,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) {
|
||||||
|
|
||||||
// db_host
|
// db_host
|
||||||
echo '
|
echo '
|
||||||
<div class="">
|
<div class="col-md-12">
|
||||||
{[ "type": "text", "label": "'.tr('Host del database').'", "name": "db_host", "placeholder": "'.tr("Indirizzo dell'host del database").'", "value": "'.$host.'", "help": "'.tr('Esempio').': localhost", "show-help": 1, "required": 1 ]}
|
{[ "type": "text", "label": "'.tr('Host del database').'", "name": "db_host", "placeholder": "'.tr("Indirizzo dell'host del database").'", "value": "'.$host.'", "help": "'.tr('Esempio').': localhost", "show-help": 1, "required": 1 ]}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,6 +30,8 @@ switch (post('op')) {
|
||||||
'read_notify' => $post['read_notify'],
|
'read_notify' => $post['read_notify'],
|
||||||
], ['id' => $id_record]);
|
], ['id' => $id_record]);
|
||||||
|
|
||||||
|
$dbo->sync('zz_email_print', ['id_email' => $id_record], ['id_print' => (array) $post['prints']]);
|
||||||
|
|
||||||
$_SESSION['infos'][] = tr('Informazioni salvate correttamente!');
|
$_SESSION['infos'][] = tr('Informazioni salvate correttamente!');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -66,6 +66,22 @@ echo '
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?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>';
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{[ "type": "textarea", "label": "<?php echo tr('Contenuto'); ?>", "name": "body", "value": "$body$" ]}
|
{[ "type": "textarea", "label": "<?php echo tr('Contenuto'); ?>", "name": "body", "value": "$body$" ]}
|
||||||
|
|
Loading…
Reference in New Issue