Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
51 righe
2.0 KiB
51 righe
2.0 KiB
<? |
|
if (!isset($root)) { |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
$categoria = get_campi("b_gare_progettazione"); |
|
$categoria["codice"] = $_POST["id"]; |
|
$categoria["prevalente"] = "N"; |
|
} |
|
if (!empty($_SESSION["utente"]->gerarchia) && $_SESSION["utente"]->gerarchia < 100 && !empty($categoria)) { |
|
if (!isset($categorieProgettazione)) { |
|
$categorieProgettazione = getCategorieServiziTecnici(); |
|
} |
|
if (empty($categoria["importo"])) { |
|
$categoria["importo"] = 0; |
|
} |
|
$id = $categoria["codice"]; |
|
?> |
|
<tr> |
|
<td> |
|
<div class="form-group" style="max-width:800px !important"> |
|
<select class="form-control" name="categoria[<?= $id ?>][codice_categoria]" title="<?= __("Categoria") ?>" rel="S;1;0;N"> |
|
<option value="">...</option> |
|
<? |
|
foreach($categorieProgettazione AS $codice_elemento => $elemento) { |
|
?> |
|
<option value="<?= $codice_elemento ?>" <?= ($codice_elemento == $categoria["codice_categoria"]) ? "selected" : "" ?>> |
|
<?= $elemento["id"] ?> - <?= $elemento["descrizione"] ?> |
|
</option> |
|
<? |
|
} |
|
?> |
|
</select> |
|
</div> |
|
</td> |
|
<td> |
|
<div class="form-group"> |
|
<input name="categoria[<?= $id ?>][importo]" title="<?= __("Importo") ?>" rel="S;1;0;N" class="form-control importo" value="<?= number_format($categoria["importo"],2,".","") ?>" onChange="updateSomma();"> |
|
</div> |
|
</td> |
|
<td width="10"> |
|
<input type="hidden" name="categoria[<?= $id ?>][prevalente]" rel="S;1;1;A" value="<?= $categoria["prevalente"] ?>"> |
|
<? if ($categoria["prevalente"] != "S") { ?> |
|
<button class="btn btn-danger btn-sm" type="button" onClick="$(this).parent().parent().slideUp('fast',function() { $(this).remove(); updateSomma(); });"> |
|
<span class="fa fa-times"></span> |
|
</button> |
|
<? } ?> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?>
|