.d-none{
display: none !important;
}
.disabled {
pointer-events: none;
cursor: default;
opacity: 0.5;
}
.section-fonia-int,
.operatore_adsl{
margin: 25px 0px;
}
#btn-ctr{
display: flex;
justify-self: center;
margin: 20px auto;
}
.r-container .text-center{
display: grid;
justify-content: center;
}
.section-numberPortability{
margin: 15px 0px;
}
.section-numberPortability label{
padding: 15px 0px;
}
.et_pb_contact .form-input {
-webkit-appearance: none;
background-color: #eee;
border-width: 0;
font-size: 15px;
padding: 16px;
border-radius: 20px;
}
#number_portability,
#adsl_provider,
#provider,
#promo_24{
margin: 15px 0px 15px 15px;
}
.form-select{
margin-left: 20px;
border: 1px solid #D0112B;
color: #D0112B;
background: #fff;
}
/***********************
TABLE
***********************/
.table-bordered td, .table-bordered tr {
border-bottom-width: 2px;
}
.table tr {
vertical-align: bottom;
border-bottom: 2px solid #dee2e6;
border-bottom-width: 2px;
}
.table-bordered td, .table-bordered tr {
border: 1px solid #dee2e6;
border-bottom-color: rgb(222, 226, 230);
border-bottom-style: solid;
border-bottom-width: 1px;
}
.table td, .table tr {
padding: .75rem;
vertical-align: baseline;
border-top: 1px solid #dee2e6;
}
th {
text-align: inherit;
}
table {
border-collapse: collapse;
}
.table-bordered {
border: 1px solid #dee2e6;
}
.table {
width: 100%;
margin-bottom: 1rem;
background-color: transparent;
}
.table .form-select{
width: -moz-available;
}
.entry-content table:not(.variations), body.et-pb-preview #main-content .container table {
border: none;
}
//SCRIPT PER REGULAR EXPRESS FOR INPUT NUMBER
var inputTel = document.querySelector("#phone_number");
iti = window.intlTelInput(inputTel, {
initialCountry: "IT",
allowDropdown: false
});
//TIPO DI TECNOLOGIA DALLA COPERTURA
if(jQuery.session.get("ftth")){
jQuery("#section_ftth").removeClass("d-none");
}else if(jQuery.session.get("fttc")){
jQuery("#section_fttc").removeClass("d-none");
}else if(jQuery.session.get("fwa")){
jQuery("#section_fwa, #section_t_fwa").removeClass("d-none");
}else if(jQuery.session.get("adsl")){
jQuery("#section_adsl").removeClass("d-none");
}else{
jQuery(".title-init").append("
ERRORE!! DEVI ANDARE SULLA PAGINA COPERTURA.
")
}
jQuery.session.get("province");
//SELEZIONE CONTRATTO
jQuery(".et_pb_button.btn-price").click(function(){
jQuery(".et_pb_button.btn-price").html("Seleziona")
jQuery(this).html("✓");
jQuery("#btn-fonia").removeClass("d-none");
if(jQuery(this).attr("class").indexOf("incluso") >= 0){
jQuery("#section-fonia").removeClass("d-none");
jQuery(".question-fonia").addClass("d-none");
jQuery("#btn-fonia").addClass("incluso");
}else{
jQuery("#section-fonia").addClass("d-none");
jQuery("#section-request-fonia").addClass("d-none");
}
jQuery(".title-init").hide();
return false
});
//ADD CTR IN SESSION
jQuery(".et_pb_button.btn-price").click(function() {
jQuery("#ctr").val(jQuery(this).attr('id'));
jQuery.session.set("ctr", jQuery("#ctr").val());
});
//BTN AVANTI
jQuery("#btn-fonia").click(function(){
jQuery("#section_fttc").hide();
jQuery("#section_ftth").hide();
jQuery("#section_t_fwa").hide();
jQuery("#section_fwa").hide();
jQuery("#section_adsl").hide();
jQuery("#section-request-fonia, .question-fonia, .section-fonia-int, .operatore_adsl").removeClass("d-none");
jQuery("#number_portability").attr("value", "SI");
jQuery("#phone_number").attr("value", "");
if(jQuery(this).attr("class").indexOf("incluso") >= 0){
jQuery(".r-container, #section-request-fonia").removeClass("d-none");
jQuery(".question-fonia").addClass("d-none");
jQuery("#number_portability").attr("value", "SI");
jQuery("#phone_number").attr("value", "");
}
jQuery(this).hide();
});
//BTN NO PHONE NON INCLUSO
jQuery("#no_phone").click(function(){
jQuery(".r-container").removeClass("d-none");
jQuery(".section-numberPortability").addClass("d-none");
jQuery("#provider").attr("required", "required");
jQuery("#adsl_provider").attr("required", "required");
jQuery("#adsl_provider").attr('value', "");
jQuery("#phone_number").removeAttr('required');
jQuery("#number_portability").attr("value", "NO");
});
//BTN SI PHONE NON INCLUSO
jQuery("#yes_phone").click(function(){
jQuery(".r-container").removeClass("d-none");
jQuery("#phone_number, .section-numberPortability, .section-fonia-int, .numberPortabilityTelefono").removeClass("d-none");
jQuery("#number_portability").attr("value", "SI");
jQuery("#provider").attr("value", "");
jQuery("#phone_number").attr("required", "required");
jQuery("#provider").attr("required", "required");
jQuery("#adsl_provider").attr("required", "required");
});
//SELECT SI E NO
jQuery("#number_portability").change(function(){
if(jQuery(this).val() !== "SI"){
jQuery(".numberPortabilityTelefono").addClass("d-none");
jQuery("#phone_number").addClass("d-none");
jQuery(".numberPortabilityTelefono").addClass("d-none");
jQuery("#phone_number").removeAttr("required");
jQuery("#provider").attr("required", "required");
jQuery("#adsl_provider").attr("required", "required");
} else {
jQuery(".numberPortabilityTelefono").removeClass("d-none");
jQuery("#phone_number").removeClass("d-none");
jQuery(".numberPortabilityTelefono").removeClass("d-none");
jQuery("#phone_number").attr("required", "required");
jQuery("#provider").attr("required", "required");
jQuery("#adsl_provider").attr("required", "required");
}
});
jQuery("#provider").change(function(){
if(jQuery(this).val() === ""){
jQuery(this).attr("required", "required");
}
});
jQuery("#adsl_provider").change(function(){
if(jQuery(this).val() === ""){
jQuery(this).attr("required", "required");
}
});
jQuery(".et_pb_button.btn-price").click(function(){
if( jQuery(this).html() === "✓" ){
jQuery(".font-35.value_price").addClass("price");
if(jQuery(".font-35.value_price").attr("class").indexOf("price") >= 0){
var price = jQuery(".value_price").html();
console.log(price);
jQuery.session.set("value_price", price);
}
}
});
//BTN PER L'ABBONAMENTO
jQuery("#form-ctr").submit(function(){
if(jQuery("#btn-fonia").attr("class").indexOf("incluso") >= 0){
if(jQuery("#phone_number").val().length >= 9){
jQuery("#form-ctr").submit();
jQuery("#phone_number").attr('value', iti.getNumber());
}
}
//SESSION GET CLUSTER NAME
var cluster_name = jQuery.session.get("cluster_name");
jQuery("#cluster_name").attr('value', cluster_name);
});