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.
190 righe
9.8 KiB
190 righe
9.8 KiB
<? |
|
if (!empty($this)) { |
|
$lock = $this->checkLock("elaborazione"); |
|
$formsDisponibili = FormManager::listFormEnte($_SESSION["ente"]->codice); |
|
|
|
if (!$lock) { |
|
?> |
|
<form rel="validate" method="post" action="save.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $this->info["codice"] ?>"> |
|
<div id="commands" class="mb-5"> |
|
<div class="commands container-fluid"> |
|
<div class="row"> |
|
<div class="col-12 text-right"> |
|
<button class="btn btn-sm btn-primary"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
<? } else { ?><div id="edit-form"><? } ?> |
|
<div class="card mb-3"> |
|
<div class="card-header"> |
|
<h5 class="card-title"> |
|
<?= __("Richieste") ?> |
|
</h5> |
|
</div> |
|
<div class="card-body" id="richieste"> |
|
<? |
|
$modulo = $this->getModulo(); |
|
$richieste = $this->getRichieste(); |
|
if (!empty($richieste)) { |
|
foreach ($richieste as $input) { |
|
$id = $input["codice"]; |
|
include(__DIR__ . "/richieste/tr-edit.php"); |
|
} |
|
} |
|
?> |
|
</div> |
|
<? if (!$lock) { ?> |
|
<div class="card-footer"> |
|
<button onclick="aggiungi('/backend/common/elenchi/views/richieste/tr-edit.php?modulo=<?= $modulo ?>','#richieste'); return false" class="btn btn-sm btn-info btn-block"><span class="fa fa-plus-circle"></span> <?= __("Aggiungi nuovo") ?></button> |
|
</div> |
|
<? } ?> |
|
</div> |
|
<script> |
|
$("#richieste").sortable({ |
|
handle: ".handle", |
|
update: function(event, ui) { |
|
$(".input-edit", "#richieste").each(function(index, el) { |
|
$(this).find(".ordinamento").val(index); |
|
}); |
|
} |
|
}); |
|
// $( "#sortable" ).disableSelection(); |
|
</script> |
|
<? if ($this->soaRichiedibili() || $this->serviziTecniciRichiedibili()) { ?> |
|
<div class="card mb-3"> |
|
<div class="card-header"> |
|
<h5 class="card-title"><?= __("Dati obbligatori nel profilo") ?></h5> |
|
</div> |
|
<div class="card-body m-0 p-0"> |
|
<table class="m-0 table table-striped"> |
|
<? |
|
if ($this->soaRichiedibili()) { |
|
?> |
|
<tr> |
|
<td><?= __("Attestazioni SOA obbligatorie") ?></td> |
|
<td width="30%"> |
|
<select name="obbligo_soa" id="obbligo_soa" rel="S;1;1;A" title="<?= __("Attestazioni SOA Obbligatorie") ?>"> |
|
<option value=""><?= __("Seleziona") ?>...</option> |
|
<option <?= $this->info["obbligo_soa"] == "S" ? "selected" : "" ?> value="S"><?= __("Si") ?></option> |
|
<option <?= $this->info["obbligo_soa"] == "F" ? "selected" : "" ?> value="F"><?= __("Si, possibile indicare anche i fatturati equivalenti") ?></option> |
|
<option <?= $this->info["obbligo_soa"] == "N" ? "selected" : "" ?> value="N"><?= __("No") ?></option> |
|
</select> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
if ($this->serviziTecniciRichiedibili()) { |
|
?> |
|
<tr> |
|
<td><?= __("Esperienze servizi tecnici obbligatorie") ?></td> |
|
<td width="30%"> |
|
<select name="obbligo_servizi_tecnici" id="obbligo_servizi_tecnici" rel="S;1;1;A" title="<?= __("Esperienze servizi tecnici obbligatorie") ?>"> |
|
<option value=""><?= __("Seleziona") ?>...</option> |
|
<option <?= $this->info["obbligo_servizi_tecnici"] == "S" ? "selected" : "" ?> value="S"><?= __("Si") ?></option> |
|
<option <?= $this->info["obbligo_servizi_tecnici"] == "N" ? "selected" : "" ?> value="N"><?= __("No") ?></option> |
|
</select> |
|
</td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</table> |
|
</div> |
|
</div> |
|
<? } ?> |
|
<? if (!empty($formsDisponibili)) { |
|
$formSelezionati = $this->getForms(); |
|
?> |
|
<div class="card mb-3"> |
|
<div class="card-header"> |
|
<h5 class="card-title"><?= __("Questionari") ?></h5> |
|
</div> |
|
<div class="card-body m-0 p-0" id="questionari"> |
|
<div class="text-right p-3"> |
|
<span class="fa fa-search"></span> <input type="text" onkeyup="filtra($(this).val(),'#questionari','tr');" class="input-sm" placeholder="<?= __("Cerca") ?>"> |
|
</div> |
|
<table class="table table-striped table-hover"> |
|
<thead> |
|
<tr> |
|
<th><?= __("Titolo") ?></th> |
|
<th style="width:1%"></th> |
|
<th style="width:1%"></th> |
|
</tr> |
|
</thead> |
|
<tbody id="questionari"> |
|
<? |
|
foreach ($formsDisponibili AS $form) { |
|
$form["titolo"] = json_decode($form["titolo"],true); |
|
$form["descrizione"] = json_decode($form["descrizione"],true); |
|
?> |
|
<tr> |
|
<td> |
|
<strong><?= $form["titolo"][$_SESSION["language"]] ?></strong><br> |
|
<?= $form["descrizione"][$_SESSION["language"]] ?> |
|
</td> |
|
<td style="width:1%"> |
|
<button type="button" title="<?= __("anteprima") ?>" class="btn btn-sm btn-default" onclick="showModalWithURL('/backend/form/preview.php?codice=<?= $form["codice"] ?>');"><span class='fa fa-search'></span></button> |
|
</td> |
|
<td style="width:1%"><input <?= (array_search($form["codice"],$formSelezionati) !== false) ? 'checked' : '' ?> class="big-checkbox checkbox-questionario" onchange="checkRichiestaFirma()" type="checkbox" name="forms[]" value="<?= $form["codice"] ?>"></td> |
|
</tr> |
|
<? |
|
} |
|
?> |
|
</tbody> |
|
</table> |
|
</div> |
|
<div class="card-footer collapse" id="foot-questionari"> |
|
<?= __("Richiedi firma su compilazione questionari") ?><br> |
|
<select name="richiedi_firma" id="richiedi_firma" rel="S;1;1;A" title="<?= __("Richiedi firma su compilazione questionari") ?>"> |
|
<option value=""><?= __("Seleziona") ?>...</option> |
|
<option <?= $this->info["richiedi_firma"] == "S" ? "selected" : "" ?> value="S"><?= __("Si") ?></option> |
|
<option <?= $this->info["richiedi_firma"] == "N" ? "selected" : "" ?> value="N"><?= __("No") ?></option> |
|
</select> |
|
</div> |
|
<script> |
|
function checkRichiestaFirma() { |
|
let showRequest = false; |
|
$(".checkbox-questionario").each(function() { |
|
if ($(this).prop("checked")) { |
|
showRequest = true; |
|
} |
|
}); |
|
if (showRequest) { |
|
$("#foot-questionari").show(); |
|
} else { |
|
$("#foot-questionari").hide(); |
|
} |
|
} |
|
checkRichiestaFirma(); |
|
</script> |
|
</div> |
|
<? } ?> |
|
<?php if (settingsManager::getValue("qualificaAutomatica") == "S") : ?> |
|
<div class="card"> |
|
<div class="card-header"> |
|
<h5 class="card-title"><?= __("Abilitazione automatica") ?></h5> |
|
</div> |
|
<div class="card-body" id="foot-questionari"> |
|
<?= __("Vuoi accogliere automaticamente le istanze complete inviate dagli Operatori Economici?") ?><br> |
|
<select name="abilitazione_automatica" id="abilitazione_automatica" rel="S;1;1;A" title="<?= __("Accettazione automatica") ?>"> |
|
<option value=""><?= __("Seleziona") ?>...</option> |
|
<option <?= $this->info["abilitazione_automatica"] == "S" ? "selected" : "" ?> value="S"><?= __("Si") ?></option> |
|
<option <?= $this->info["abilitazione_automatica"] == "N" ? "selected" : "" ?> value="N"><?= __("No") ?></option> |
|
</select> |
|
</div> |
|
</div> |
|
<?php endif ?> |
|
<? if (!$lock) { ?> |
|
<button class="btn btn-block btn-lg btn-primary"><span class="fa fa-save"></span> <?= __("Salva") ?></button> |
|
</form> |
|
<? } else { ?> |
|
</div> |
|
<script> |
|
$(":input").not(".ignore-lock").attr("disabled", "disabled").trigger("chosen:updated"); |
|
</script> |
|
<? } |
|
} |
|
?>
|