mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Bugfix plugin sedi e referenti
This commit is contained in:
parent
fc3ca2b145
commit
9580b3a7cd
@ -8,6 +8,9 @@ echo '
|
|||||||
<input type="hidden" name="backto" value="record-edit">
|
<input type="hidden" name="backto" value="record-edit">
|
||||||
<input type="hidden" name="op" value="addreferente">
|
<input type="hidden" name="op" value="addreferente">
|
||||||
|
|
||||||
|
<!-- Fix creazione da Anagrafica -->
|
||||||
|
<input type="hidden" name="id_record" value="">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{[ "type": "text", "label": "'.tr('Nominativo').'", "name": "nome", "required": 1 ]}
|
{[ "type": "text", "label": "'.tr('Nominativo').'", "name": "nome", "required": 1 ]}
|
||||||
|
@ -6,7 +6,6 @@ $operazione = filter('op');
|
|||||||
|
|
||||||
switch ($operazione) {
|
switch ($operazione) {
|
||||||
case 'addsede':
|
case 'addsede':
|
||||||
|
|
||||||
if (!empty(post('nomesede'))) {
|
if (!empty(post('nomesede'))) {
|
||||||
$dbo->insert('an_sedi', [
|
$dbo->insert('an_sedi', [
|
||||||
'idanagrafica' => $id_parent,
|
'idanagrafica' => $id_parent,
|
||||||
@ -37,8 +36,7 @@ switch ($operazione) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'updatesede':
|
case 'updatesede':
|
||||||
$id = filter('id');
|
$dbo->update('an_sedi', [
|
||||||
$array = [
|
|
||||||
'nomesede' => post('nomesede'),
|
'nomesede' => post('nomesede'),
|
||||||
'indirizzo' => post('indirizzo'),
|
'indirizzo' => post('indirizzo'),
|
||||||
'codice_destinatario' => post('codice_destinatario'),
|
'codice_destinatario' => post('codice_destinatario'),
|
||||||
@ -58,9 +56,7 @@ switch ($operazione) {
|
|||||||
'gaddress' => post('gaddress'),
|
'gaddress' => post('gaddress'),
|
||||||
'lat' => post('lat'),
|
'lat' => post('lat'),
|
||||||
'lng' => post('lng'),
|
'lng' => post('lng'),
|
||||||
];
|
], ['id' => $id_record]);
|
||||||
|
|
||||||
$dbo->update('an_sedi', $array, ['id' => $id]);
|
|
||||||
|
|
||||||
flash()->info(tr('Salvataggio completato!'));
|
flash()->info(tr('Salvataggio completato!'));
|
||||||
|
|
||||||
|
@ -8,11 +8,15 @@ echo '
|
|||||||
<input type="hidden" name="backto" value="record-edit">
|
<input type="hidden" name="backto" value="record-edit">
|
||||||
<input type="hidden" name="op" value="addsede">
|
<input type="hidden" name="op" value="addsede">
|
||||||
|
|
||||||
|
<!-- Fix creazione da Anagrafica -->
|
||||||
|
<input type="hidden" name="id_record" value="">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
{[ "type": "text", "label": "'.tr('Nome sede').'", "name": "nomesede", "required": 1 ]}
|
{[ "type": "text", "label": "'.tr('Nome sede').'", "name": "nomesede", "required": 1 ]}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
{[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "required": 0 ]}
|
{[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "required": 0 ]}
|
||||||
|
@ -15,7 +15,7 @@ echo '
|
|||||||
<form action="" method="post" role="form" id="form_sedi">
|
<form action="" method="post" role="form" id="form_sedi">
|
||||||
<input type="hidden" name="id_plugin" value="'.$id_plugin.'">
|
<input type="hidden" name="id_plugin" value="'.$id_plugin.'">
|
||||||
<input type="hidden" name="id_parent" value="'.$id_parent.'">
|
<input type="hidden" name="id_parent" value="'.$id_parent.'">
|
||||||
<input type="hidden" name="id" value="'.$record['id'].'">
|
<input type="hidden" name="id_record" value="'.$record['id'].'">
|
||||||
<input type="hidden" name="backto" value="record-edit">
|
<input type="hidden" name="backto" value="record-edit">
|
||||||
<input type="hidden" name="op" value="updatesede">
|
<input type="hidden" name="op" value="updatesede">
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user