mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
Gestione azioni di gruppo allegati
This commit is contained in:
@@ -19,24 +19,35 @@
|
||||
|
||||
use Models\Upload;
|
||||
|
||||
$id_allegato = filter('id_allegato');
|
||||
$allegato = Upload::find($id_allegato);
|
||||
$id_allegati = json_decode(filter('id_allegati'));
|
||||
$id_allegato = json_decode(filter('id_allegato'));
|
||||
|
||||
// Form di inserimento riga documento
|
||||
echo '
|
||||
<form action="" method="post" id="modifica-allegato">
|
||||
<input type="hidden" name="id_allegati" value="'.implode(';',$id_allegati).'">
|
||||
<input type="hidden" name="id_allegato" value="'.$id_allegato.'">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="modifica-allegato">
|
||||
|
||||
<div class="row">
|
||||
<div class="row">';
|
||||
if ($id_allegato) {
|
||||
$allegato = Upload::find($id_allegato);
|
||||
echo '
|
||||
<div class="col-md-6">
|
||||
{[ "type": "text", "label": "'.tr('Nome').'", "name": "nome_allegato", "value": "'.$allegato->name.'" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{[ "type": "text", "label": "'.tr('Categoria').'", "name": "categoria_allegato", "value": "'.$allegato->category.'", "disabled": "'.intval(in_array($allegato->category, ['Fattura Elettronica'])).'" ]}
|
||||
</div>
|
||||
</div>';
|
||||
} else {
|
||||
$allegato = Upload::find($id_allegati[0]);
|
||||
echo '
|
||||
<div class="col-md-6">
|
||||
{[ "type": "text", "label": "'.tr('Categoria').'", "name": "categoria_allegato", "value": "" ]}
|
||||
</div>';
|
||||
}
|
||||
echo '
|
||||
</div>
|
||||
|
||||
<!-- PULSANTI -->
|
||||
|
Reference in New Issue
Block a user