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.
72 righe
2.7 KiB
72 righe
2.7 KiB
<? |
|
if (isset($gara) && !$lock) { |
|
$keys = array_keys($procedura["fasi"]); |
|
$key = $keys[0]; |
|
$fase = $procedura["fasi"][$key]; |
|
$forms = []; |
|
if (count($procedura["fasi"]) > 1 && !$fase["obbligatoria"]) { |
|
$titolo = __("Gestione fase facoltativa"); |
|
$msg = __("Vuoi procedere con la gestione della seguente fase?") . "<br><strong>" . __($fase["titolo"]) . "</strong>"; |
|
$forms[] = ["id"=>$key,"class"=>"btn-primary","action"=>__("Procedi con " . $fase["titolo"])]; |
|
$key = $keys[1]; |
|
$fase = $procedura["fasi"][$key]; |
|
} |
|
if ($fase["obbligatoria"]) { |
|
if (empty($forms)) { |
|
$label = "Procedi"; |
|
$class = "btn-primary"; |
|
} else { |
|
$class = "btn-info"; |
|
$label = "Procedi con " . $fase["titolo"]; |
|
} |
|
$forms[] = ["id"=>$key,"class"=>$class,"action"=>__($label)]; |
|
} |
|
if (!empty($forms)) { |
|
alertManager::printWarningBox(__("Avviso blocco modifica"),__("Procedendo non potrai più modificare la tipologia di affidamento e procedura.")); |
|
if (!empty($titolo) && !empty($msg)) { |
|
alertManager::printInfoBox($titolo,$msg); |
|
} |
|
?> |
|
<div class="row"> |
|
<? |
|
$col = 12 / count($forms); |
|
foreach($forms AS $form) { ?> |
|
<div class="col-12 col-lg-<?= $col ?>"> |
|
<form rel="validate" method="post" action="inizializzaFase.php" id="submit-<?= $form["id"] ?>"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input type="hidden" name="codice_gara" value="<?= $record["codice"] ?>"> |
|
<input type="hidden" name="id" value="<?= $form["id"] ?>"> |
|
<button type="button" onclick="confirmSubmit('<?= $form["id"] ?>')" class="btn btn-block <?= $form["class"] ?>"><?= $form["action"] ?></button> |
|
</form> |
|
</div> |
|
<? |
|
} |
|
?> |
|
</div> |
|
<script> |
|
function confirmSubmit(id) { |
|
if ($('#submit-'+id).length > 0) { |
|
Swal({ |
|
title: js_dict["sei-sicuro"], |
|
text: js_dict["msg-conferma"], |
|
type: "error", |
|
showCancelButton: true, |
|
confirmButtonColor: '#3085d6', |
|
cancelButtonColor: '#d33', |
|
confirmButtonText: js_dict.conferma, |
|
cancelButtonText: js_dict.annulla, |
|
closeOnConfirm: true |
|
}).then((result) => { |
|
if (result.value) { |
|
$('#submit-'+id).submit(); |
|
} |
|
}); |
|
} |
|
} |
|
</script> |
|
<? |
|
} else { |
|
alertManager::printAlertBox(__("Errore nell'inizializzazione del modulo"),__("Si prega di contattare l'help desk")); |
|
} |
|
} |
|
?>
|