2017-08-04 16:28:16 +02:00
|
|
|
<?php
|
2020-09-07 15:04:06 +02:00
|
|
|
/*
|
|
|
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
2021-01-20 15:08:51 +01:00
|
|
|
* Copyright (C) DevCode s.r.l.
|
2020-09-07 15:04:06 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2017-08-04 16:28:16 +02:00
|
|
|
|
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
|
|
|
|
if (empty($id_record)) {
|
|
|
|
echo '
|
|
|
|
<table width="100%" class="datatables table table-striped table-hover table-condensed table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2017-09-04 12:02:29 +02:00
|
|
|
<th width="10%">'.tr('Numero').'</th>
|
|
|
|
<th>'.tr('Nome del file').'</th>
|
2017-08-04 16:28:16 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>';
|
|
|
|
|
|
|
|
for ($c = 1; $c <= count($cmp); ++$c) {
|
|
|
|
echo '
|
2020-09-23 17:53:19 +02:00
|
|
|
<tr class="clickable" onclick="openLink(event, \''.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$c.'\')">
|
2017-08-04 16:28:16 +02:00
|
|
|
<td>'.$c.'</td>
|
2018-02-18 19:53:23 +01:00
|
|
|
<td>'.$cmp[$c - 1][0].'</td>
|
2017-08-04 16:28:16 +02:00
|
|
|
</tr>';
|
|
|
|
}
|
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>';
|
|
|
|
} else {
|
|
|
|
?>
|
2018-02-23 16:04:50 +01:00
|
|
|
<form action="" method="post" id="edit-form" enctype="multipart/form-data">
|
2017-08-04 16:28:16 +02:00
|
|
|
<input type="hidden" name="backto" value="record-edit">
|
|
|
|
<input type="hidden" name="op" value="update">
|
|
|
|
|
|
|
|
<!-- DATI ANAGRAFICI -->
|
|
|
|
<div class="panel panel-primary">
|
|
|
|
<div class="panel-heading">
|
2017-09-04 12:02:29 +02:00
|
|
|
<h3 class="panel-title"><?php echo tr('Componente'); ?></h3>
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "text", "label": "<?php echo tr('Nome file'); ?>", "name": "nomefile", "required": 1, "value": "$nomefile$", "readonly": 1 ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "textarea", "label": "<?php echo tr('Contenuto'); ?>", "name": "contenuto", "required": 1, "class": "autosize", "value": "$contenuto$" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
2018-07-18 15:20:10 +02:00
|
|
|
<a class="btn btn-danger ask" data-backto="record-list" data-nomefile="<?php echo $record['nomefile']; ?>">
|
2017-09-04 12:02:29 +02:00
|
|
|
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
|
2017-08-04 16:28:16 +02:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
}
|