2017-08-04 16:28:16 +02:00
|
|
|
<?php
|
|
|
|
|
2020-09-04 09:42:38 +02:00
|
|
|
use Util\Ini;
|
|
|
|
|
2017-08-04 16:28:16 +02:00
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
|
2020-08-25 16:14:10 +02:00
|
|
|
function crea_form_componente($contenuto)
|
2017-08-04 16:28:16 +02:00
|
|
|
{
|
2020-09-04 09:42:38 +02:00
|
|
|
$fields = Ini::getFields($contenuto);
|
2017-08-04 16:28:16 +02:00
|
|
|
$title = array_shift($fields);
|
2018-06-26 14:30:26 +02:00
|
|
|
|
2017-08-04 16:28:16 +02:00
|
|
|
foreach ($fields as $key => $value) {
|
|
|
|
$fields[$key] = '<div class="col-md-4">'.$value.'</div>';
|
|
|
|
}
|
2018-06-26 14:30:26 +02:00
|
|
|
|
2020-09-04 09:42:38 +02:00
|
|
|
echo $title.'
|
|
|
|
<div class="row">
|
|
|
|
'.implode(PHP_EOL, $fields).'
|
|
|
|
<script>restart_inputs()</script>
|
|
|
|
</div>';
|
2018-06-26 14:30:26 +02:00
|
|
|
}
|