107 lines
2.1 KiB
JavaScript
107 lines
2.1 KiB
JavaScript
// javascript per gestione campi obbligatori///
|
|
// barili//
|
|
|
|
///////////////////////////////////////////
|
|
////////T O O L B A R /////////////////////
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
/////////////////////////////////////////////7
|
|
function checkFields()
|
|
/////////////////////////////////////////////7
|
|
{
|
|
var l_flgAzienda=Ab.prendiElementoDaId('flgAzienda').value;
|
|
if(l_flgAzienda==1)
|
|
return Ab.validateForm('nominativo','Ragione Sociale','R');
|
|
else
|
|
return Ab.validateForm('cognome','Cognome','R','nome','Nome','R');
|
|
|
|
}
|
|
|
|
|
|
function checkBoxes()
|
|
/////////////////////////////////////////////
|
|
{
|
|
/* Ab.setChekBoxValue("dettaglio","flgArt8","1","0");
|
|
Ab.setChekBoxValue("dettaglio","flgAzienda","1","0");
|
|
Ab.setChekBoxValue("dettaglio","flgPrivTrattamento","1","0");
|
|
Ab.setChekBoxValue("dettaglio","flgPrivComunicazione","1","0");
|
|
*/
|
|
|
|
}
|
|
|
|
function checkRadio()
|
|
{
|
|
//Ab.setRadioButtonValue("dettaglio","flgPlaAntPos");
|
|
}
|
|
|
|
function checkBoxesCR()
|
|
/////////////////////////////////////////////
|
|
{
|
|
//Ab.setChekBoxValue("ricerca","flgSommaCRL","1","0");
|
|
}
|
|
|
|
function checkRadioCR()
|
|
{
|
|
//Ab.setRadioButtonValue("ricerca","flgPlaAntPos");
|
|
|
|
}
|
|
|
|
function delUser(l_id)
|
|
/////////////////////////////////////////////
|
|
{
|
|
if (Ab.confirmDelete())
|
|
{
|
|
var f = document.main;
|
|
f.action=f.actionPage.value;
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="gr";
|
|
f.act.value="delUser";
|
|
f.id_users.value=l_id;
|
|
f.submit();
|
|
}
|
|
|
|
}
|
|
|
|
function modUser(l_id)
|
|
/////////////////////////////////////////////
|
|
{
|
|
|
|
var f = document.main;
|
|
f.action="../Users.abl";
|
|
// FACCIO IL SUBMIT
|
|
f.cmd.value="md";
|
|
f.act.value="";
|
|
f.id_users.value=l_id;
|
|
f.submit();
|
|
|
|
}
|
|
|
|
|
|
|
|
function aziendaClick()
|
|
{
|
|
checkBoxes();
|
|
var rowRagSoc=Ab.prendiElementoDaId('RAGIONE_SOCIALE');
|
|
var rowCognomeNome=Ab.prendiElementoDaId('COGNOMENOME');
|
|
var rowNascita=Ab.prendiElementoDaId('NASCITA');
|
|
var l_flgAzienda=Ab.prendiElementoDaId('flgAzienda').value;
|
|
if(l_flgAzienda==1)
|
|
{
|
|
rowRagSoc.style.display="table-row";
|
|
rowCognomeNome.style.display="none";
|
|
rowNascita.style.display="none";
|
|
}
|
|
else
|
|
{
|
|
rowRagSoc.style.display="none";
|
|
rowCognomeNome.style.display="table-row";
|
|
rowNascita.style.display="table-row";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|