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.
121 righe
5.3 KiB
121 righe
5.3 KiB
<!-- MODAL --> |
|
<? |
|
$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; |
|
include_once($configPath); |
|
|
|
if (!empty($_SESSION["utente"]) && !empty($_GET['codice_contratto'])) { |
|
$codice_contratto = purify($_GET['codice_contratto']); |
|
|
|
$associazione_diretta = 'N'; |
|
if (!empty($_GET['associazione_diretta'])) { |
|
$associazione_diretta = purify($_GET['associazione_diretta']); |
|
} |
|
|
|
if (!empty($_GET['codice_soggetto_oe'])) { |
|
$managerRubrica = Rubrica::init(); |
|
$soggetto_oe = $managerRubrica->getInfo($_GET['codice_soggetto_oe'])->info; |
|
$soggetto = $soggetto_oe['soggetto']; |
|
} else { |
|
$soggetto_oe = get_campi('b_soggetti_oe'); |
|
$soggetto = purify($_GET['soggetto']); |
|
} |
|
|
|
|
|
|
|
?> |
|
<div class="card"> |
|
<div class="card-header"> |
|
<h3 class="card-title m-0"> |
|
<?= ($soggetto == '10') ? __('Aggiungi Anagrafica') : __('Aggiungi Strumentazione') ?> |
|
</h3> |
|
</div> |
|
<div class="card-body"> |
|
<form rel="validate" action="/contratti/rubrica/save.php" id="edit-form"> |
|
<input id="token" type="hidden" name="token" value="<?= tokenGen() ?>"> |
|
<input id="codice" type="hidden" name="codice_contratto" value="<?= $codice_contratto ?>"> |
|
<input id="codice" type="hidden" name="codice" value="<?= $soggetto_oe["codice"] ?>"> |
|
<input id="soggetto" type="hidden" name="soggetto" value="<?= $soggetto ?>"> |
|
<input id="soggetto" type="hidden" name="associazione_diretta" value="<?= $associazione_diretta ?>"> |
|
|
|
<div class="card"> |
|
<div class="card-body"> |
|
<div class="row"> |
|
<div class="col-12 <?= ($soggetto == '10') ? 'col-lg-4' : 'col-lg-6' ?>"> |
|
<div class="form-group"> |
|
<label for="nome"> |
|
<?= __('Nome*') ?> |
|
</label> |
|
<input type="text" id="nome" class="form-control" name="nome" title="<?= __('Nome') ?>" rel="S;0;0;A" value="<?= !empty($soggetto_oe['nome']) ? $soggetto_oe['nome'] : null?>"> |
|
</div> |
|
</div> |
|
|
|
<? if($soggetto == '10'){ ?> |
|
<div class="col-12 col-lg-4"> |
|
<div class="form-group"> |
|
<label for="cognome"> |
|
<?= __('Cognome*') ?> |
|
</label> |
|
<input type="text" id="cognome" class="form-control" name="cognome" title="<?= __('Cognome') ?>" rel="S;0;0;A" value="<?= !empty($soggetto_oe['cognome']) ? $soggetto_oe['cognome'] : null?>"> |
|
</div> |
|
</div> |
|
<? } ?> |
|
|
|
<div class="col-12 <?= ($soggetto == '10') ? 'col-lg-4' : 'col-lg-6' ?>"> |
|
<div class="form-group"> |
|
<label for="id_univoco"> |
|
<? |
|
if($soggetto == 10 ){ |
|
$label = __('Codice Fiscale'); |
|
}elseif($soggetto == 15){ |
|
$label = __('N° Matricola/Targa'); |
|
}else{ |
|
$label = __('Identificativo'); |
|
} |
|
?> |
|
<?= __("$label*") ?> |
|
</label> |
|
<input type="text" id="id_univoco" class="form-control" name="id_univoco" title="<?= $label ?>" rel="S;0;0;A" value="<?= !empty($soggetto_oe['id_univoco']) ? $soggetto_oe['id_univoco'] : null?>"> |
|
</div> |
|
</div> |
|
|
|
<? if($soggetto == '10'){ ?> |
|
<? foreach(Rubrica::getAnagraficaExtraInfo() as $key => $field){ ?> |
|
<div class="col-12 col-lg-4"> |
|
<label for="extra_info[<?=$key?>]"><?= __($field['traduzione']) ?></label> |
|
<input type="text" id="extra_info[<?=$key?>]" class="<?= $field['class'] ?>" name="extra_info[<?=$key?>]" title="<?= __($field['traduzione']) ?>" rel="N;0;0;A" value="<?= !empty($soggetto_oe['extra_info'][$key]) ? $soggetto_oe['extra_info'][$key] : null?>"> |
|
</div> |
|
<? } ?> |
|
<? } ?> |
|
|
|
<div class="col-12 mt-3"> |
|
<div class="form-group"> |
|
<label for="note"> |
|
<?= __('Note:') ?> |
|
</label> |
|
<textarea rows='10' class="ckeditor_full" name="note" cols='80' id="note" title="<?= __("Note") ?>" rel="N;0;0;A"> |
|
<?= (!empty($soggetto_oe['note'])) ? $soggetto_oe["note"] : null ?> |
|
</textarea> |
|
</div> |
|
</div> |
|
|
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div class="d-flex justify-content-between mt-3"> |
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?=__('Chiudi')?></button> |
|
<button type="submit" class="btn btn-primary"><?= __('Salva') ?></button> |
|
</div> |
|
|
|
</form> |
|
</div> |
|
</div> |
|
<? |
|
|
|
}else{ |
|
?> |
|
<?= alertManager::printAlertBox(__("Errore durante la visualizazione")); ?> |
|
<? |
|
} |
|
?>
|