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.
55 righe
1.4 KiB
55 righe
1.4 KiB
<h3> |
|
<i class="fa fa-info"></i> |
|
Importa da NPA (BDNCP) - Integrazione CPV |
|
</h3> |
|
<hr> |
|
|
|
<p> |
|
Per proseguire con l'importazione, sarà necessario indicare i codici CPV di questa procedura: |
|
</p> |
|
|
|
|
|
|
|
<div class="form-group" id="cpv-import-form"> |
|
<?php cpvManager::printForm([], "npa-import"); ?> |
|
</div> |
|
<button class="btn btn-primary" onclick="return onSelectCPV(event)" > |
|
Seleziona CPV |
|
</button> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
(() => { |
|
|
|
window.onSelectCPV = function(e) { |
|
|
|
let query = ''; |
|
<?php foreach ($_GET as $key => $value): ?> |
|
<?php |
|
$key = htmlspecialchars($key); |
|
$value = htmlspecialchars($value); |
|
?> |
|
query += `<?= $key ?>=<?= $value ?>&`; |
|
<?php endforeach; ?> |
|
|
|
|
|
const cpvElements = document.querySelectorAll("#cpv-import-form input.selected-cpv"); |
|
if(!cpvElements) { |
|
Swal({title:js_dict.attenzione, text:"Scegli i codici CPV.", type:'error'}); |
|
e.preventDefault(); |
|
return false; |
|
} |
|
for (const cpv of cpvElements) { |
|
query += `cpv[]=${encodeURIComponent(cpv.value)}&`; |
|
} |
|
|
|
|
|
showModalWithURL(`/backend/npa/ajax/import.php?${query}` ); |
|
e.preventDefault(); |
|
return false; |
|
} |
|
})(); |
|
</script> |