Swal({ text: "", type: "error", showCancelButton: false, confirmButtonColor: '#d33', confirmButtonText: js_dict.conferma, closeOnConfirm: true }).then(() => { window.location.reload(); }); permission($radice, $postData["codice"]) && tokenVerify($postData["token"])) { $npa = NuovaPiattaformaAppalti::init( null, !empty($postData["codice"]) ? $postData["codice"] : null, $postData["id_scheda"], !empty($postData["modulo_riferimento"]) ? $postData["modulo_riferimento"] : null, !empty($postData["id_riferimento"]) ? $postData["id_riferimento"] : null ); if (!empty($npa)) { if (!$npa->verifyUtente()) { die_forbidden(); } // Checking if the card belongs to a Lot if ($npa->metadataSchede[$npa->scheda["id_scheda"]]["lotto"] && !empty($postData["codice_lotto"])) { $npa->setLotto($postData["codice_lotto"]); } if (empty($npa->scheda) || !$npa->checkLock()) { $result = $npa->save($postData); // Catturiamo eventuali notice da PHP $notices = ob_get_clean(); if (!empty($notices)) { ?> swal({ title: js_dict.attenzione , html: ``, type: "error" }).then(function(){ window.location.reload(); }); scheda["codice"]; $query["scheda"] = $npa->scheda["id_scheda"]; $query["modulo_riferimento"] = $npa->fascicolo["modulo_riferimento"]; $query["id_riferimento"] = $npa->fascicolo["id_riferimento"]; if (!empty($npa->lot["codice_lotto_npa"])) { $query["codice_lotto"] = $npa->lot["codice_lotto_npa"]; } if (!empty($npa->scheda["round_riferimento"])) { $query["round_riferimento"] = $npa->scheda["round_riferimento"]; } $query = http_build_query($query); $url = "/backend/npa/edit.php?{$query}"; die("window.location.href=\"{$url}\""); exit; } ?> swal({ title: js_dict.attenzione, html: `Impossibile salvare, riprova tra poco`, type: "error" }).then(function(){ window.location.reload(); });