This commit is contained in:
Matteo 2018-11-02 17:51:12 +01:00
commit 3512de4c12
3 changed files with 44 additions and 36 deletions

View File

@ -94,37 +94,41 @@ if (!$cliente) {
</div>
<div class="row">
<div class="col-md-4">
<div class="col-md-<?php echo (empty($record['indirizzo2'])) ? '6' : '4'; ?>">
{[ "type": "text", "label": "<?php echo tr('Indirizzo'); ?>", "name": "indirizzo", "value": "$indirizzo$" ]}
</div>
<div class="col-md-4">
<div class="col-md-2<?php echo (empty($record['indirizzo2'])) ? ' hide' : ''; ?>">
{[ "type": "text", "label": "<?php echo tr('Indirizzo2'); ?>", "name": "indirizzo2", "value": "$indirizzo2$" ]}
</div>
<div class="col-md-2">
{[ "type": "text", "label": "<?php echo tr('C.A.P.'); ?>", "name": "cap", "maxlength": 5, "class": "text-center", "value": "$cap$" ]}
</div>
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Città'); ?>", "name": "citta", "class": "text-center", "value": "$citta$" ]}
</div>
</div>
<div class="row">
<div class="col-md-2">
{[ "type": "select", "label": "<?php echo tr('Nazione'); ?>", "name": "id_nazione", "values": "query=SELECT id AS id, nome AS descrizione FROM an_nazioni ORDER BY nome ASC", "value": "$id_nazione$" ]}
</div>
<div class="col-md-4">
{[ "type": "select", "label": "<?php echo tr('Zona'); ?>", "name": "idzona", "values": "query=SELECT id, CONCAT_WS( ' - ', nome, descrizione) AS descrizione FROM an_zone ORDER BY descrizione ASC", "value": "$idzona$", "placeholder": "<?php echo tr('Nessuna zona'); ?>", "icon-after": "add|<?php echo Modules::get('Zone')['id']; ?>" ]}
</div>
<div class="col-md-2">
{[ "type": "text", "label": "<?php echo tr('C.A.P.'); ?>", "name": "cap", "maxlength": 5, "class": "text-center", "value": "$cap$" ]}
</div>
<div class="col-md-2">
<div class="col-md-3">
{[ "type": "text", "label": "<?php echo tr('Provincia'); ?>", "name": "provincia", "maxlength": 2, "class": "text-center", "value": "$provincia$" ]}
</div>
<div class="col-md-2">
<div class="col-md-3">
{[ "type": "select", "label": "<?php echo tr('Nazione'); ?>", "name": "id_nazione", "values": "query=SELECT id AS id, nome AS descrizione FROM an_nazioni ORDER BY nome ASC", "value": "$id_nazione$" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "<?php echo tr('Zona'); ?>", "name": "idzona", "values": "query=SELECT id, CONCAT_WS( ' - ', nome, descrizione) AS descrizione FROM an_zone ORDER BY descrizione ASC", "value": "$idzona$", "placeholder": "<?php echo tr('Nessuna zona'); ?>", "icon-after": "add|<?php echo Modules::get('Zone')['id']; ?>" ]}
</div>
<div class="col-md-3">
{[ "type": "number", "label": "<?php echo tr('Distanza'); ?>", "name": "km", "decimals":"1", "class": "text-center", "value": "$km$", "icon-after": "Km" ]}
</div>
</div>

View File

@ -21,7 +21,7 @@ include_once __DIR__.'/../../core.php';
</div>
<div class="col-md-4">
{[ "type": "select", "label": "<?php echo tr('Modulo'); ?>", "name": "module", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_modules WHERE ( enabled = 1 AND options != 'custom' ) OR id = <?php echo $record['id_module']; ?> ORDER BY name ASC", "value": "$id_module$", "extra": "<?php echo ($record['predefined']) ? 'readonly' : ''; ?>" ]}
{[ "type": "select", "label": "<?php echo tr('Modulo'); ?>", "name": "module", "required": 1, "values": "query=SELECT id, name AS descrizione FROM zz_modules WHERE ( enabled = 1 AND options != 'custom' ) OR id = <?php echo $record['id_module']; ?> ORDER BY name ASC", "value": "<?php echo $record['id_module']; ?>", "extra": "<?php echo ($record['predefined']) ? 'readonly' : ''; ?>" ]}
</div>
<div class="col-md-4">

View File

@ -35,18 +35,20 @@ echo '
echo '
<td colspan=2>
'.tr('P.Iva').': <b>'.strtoupper($c_piva).'</b>
</td>
</tr>';
</td>';
} else {
echo '
<td colspan=2>
'.tr('C.F.').': <b>'.strtoupper($c_codicefiscale).'</b>
</td>
</tr>';
</td>';
}
// riga 2
echo '
echo '</tr>';
//Indirizzo
if (!empty($c_indirizzo) or !empty($c_cap) or !empty($c_citta) or !empty($c_provincia)) {
echo '
<tr>
<td colspan="4">
'.((!empty($c_indirizzo)) ? tr('Via').': <b>'.$c_indirizzo.'</b>' : '').'
@ -56,13 +58,15 @@ echo '
</td>
</tr>';
}
echo '
<tr>
<td colspan="4">
'.tr('Telefono').': <b>'.$c_telefono.'</b>';
if (!empty($c_cellulare)) {
if (!empty($c_cellulare)) {
echo' - '.tr('Cellulare').': <b>'.$c_cellulare.'</b>';
}
}
echo '
</td>
</tr>';