According to El Comercio, there are more than 150 abandoned cats just in the Parque Universitario, and in the Lima area there are around 4 million abandoned cats and dogs.
It is truly shocking that, every weekend, around 60 cats are abandoned in the Parque Universitario, located in the heart of the city of Lima. Even with the help of shelters, the population of abandoned cats continues to increase and although there is the 30407 law against animal abuse and abandonment, people continue to ignore it and abandon cats. .
Moreover, it is truly unacceptable to see how newborn cats are left in the open. That is why we condemn this act and ask that a sterilization campaign be carried out by taking part of the taxes paid in each district in order to reduce the population of abandoned cats in Lima.
$('.forgotpass-btn').on('click', function() {
$('#login-form').hide();
$('#login-password-form').hide();
$('#forgot-password-email').val($('#login-email').val());
$('#forgot-password-form').css('display', 'flex');
$('#forgot-password-email').focus();
});
function closePopup() {
$('#login-form').css('display', 'flex');
$('#signup-form').hide();
$('#popup-connexion').hide();
$('#create-account-error').empty();
$('#code-form').hide();
$('#forgot-password-form').hide();
$('#password-form').hide();
$('#login-password-form').hide();
$('#sucess-login').hide();
$('.c-error').hide();
}
function verifLogin() {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
email : $('#login-email').val()
};
wsRequestCommon('/connexionws/connexion', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
if (response.message == 1) {
$('#mailUser').val($('#login-email').val());
$('#login-form').hide();
$('#login-password-form').css('display', 'flex');
$('#email-login-password').text($('#login-email').val());
$('#login-password').focus();
} else if (response.message == 2) {
// Mdp vide => inscription
$('#mailUser').val($('#login-email').val());
$('#login-form').hide();
$('#code-form').css('display', 'flex');
$('#txt-code-form').text("Il s'agit de votre première connexion sur votre profil MesOpinions.com. Pour y accéder, un code vous permettant de créer votre mot de passe personnalisé vous a été envoyé par mail.");
}
}
});
}
function verifLoginPassword() {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
email : $('#mailUser').val(),
password: $('#login-password').val(),
url : document.location.href
};
wsRequestCommon('/connexionws/connexionPassword', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
if($('#typeLogin').val() == 1) {
submitFormCreatePetition();
} else {
location.reload();
}
}
});
}
$('#forgot-password-email').on('keypress', function(event) {
if (event.keyCode==13){
verifForgotPassword();
}
});
$('#valid-forgot-password-form').on('click', function(event) {
verifForgotPassword();
});
function verifForgotPassword() {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
email: $('#forgot-password-email').val()
};
wsRequestCommon('/connexionws/forgotPassword', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
$('#mailUser').val($('#forgot-password-email').val());
$('#forgot-password-form').hide();
$('#code-form').css('display', 'flex');
$('#txt-code-form').text("Veuillez entrer ci-dessous le code que vous avez reçu par mail. Celui-ci vous permettra de créer votre mot de passe personnalisé.");
}
});
}
$('input').on('keypress', function(event) {
$(this).removeClass('error-input');
});
$(document).on('updateAutoVilleCP', function(event) {
$('#city').removeClass('error-input');
$('#zipcode').removeClass('error-input');
$('#verif-zipcode-error').hide();
$('#verif-city-error').hide();
});
$('#valid-signup-form').on('click', function(event) {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
gender : $("input[name=gender]:checked").val(),
fname : $('#fname-popup').val(),
name : $('#name-popup').val(),
email : $('#email-popup').val(),
password : $('#signup-password').val(),
optin : $('input[name=optin]').is(':checked'),
optinComm : $('input[name=aboCommercial').is(':checked'),
isregistration: 'true'
};
$('#mailUser').val($('#email-popup').val());
wsRequestCommon('/connexionws/register', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
if (response.message == 1) {
// Si l'enregistrement vient du formulaire de la page soutenir
if($("#formRegisterPA").val() == 1){
// On ferme le formulaire d'inscription et procède au paiement
closePopup();
if($('#typePay').val() == 'paypal') {
$('#paypal-button-container').click();
hideLoaderShowPayBtn('paypal');
} else {
$("#pay-button").click();
}
// Sinon, on recharge la page
} else {
if($('#typeLogin').val() == 1) {
submitFormCreatePetition();
} else {
location.reload();
}
}
}
}
});
});
$('#valid-code-form').on('click', function(event) {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
code : $("#code-validation").val(),
email : $('#mailUser').val()
};
wsRequestCommon('/connexionws/verifyCode', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
if (response.message == 1) {
$('#code-form').hide();
$('#password-form').css('display', 'flex');
$('#password-email').text($('#mailUser').val());
}
}
});
});
$('#valid-password-form').on('click', function() {
$('.c-error').text('').hide();
$('.block-input').removeClass('form-error');
let data = {
password: $("#password-popup").val(),
email : $('#mailUser').val()
};
wsRequestCommon('/connexionws/newPassword', 'GET', data, false, function(response, err) {
if (err) {
response.errors.forEach(function(element) {
$('#' + Object.getOwnPropertyNames(element)[0] + '-error').html(element[Object.getOwnPropertyNames(element)[0]]);
$('.' + Object.getOwnPropertyNames(element)[0] + '-input').addClass('error-input');
$('.block-input-' + Object.getOwnPropertyNames(element)[0]).addClass('form-error');
});
$('.c-error').show();
} else {
if (response.message == 1) {
if($('#typeLogin').val() == 1) {
submitFormCreatePetition();
} else {
location.reload();
}
}
}
});
});
});
$("#comm-fb-connect-div, #comm-fb-register-div").on('click', function() {
FB.login(
function(response) {
if (response.authResponse) {
wsRequestCommon('/connexionws/registerFacebook', 'POST', {}, false, function(response, err) {
if($('#typeLogin').val() == 1) {
submitFormCreatePetition();
} else {
location.reload();
}
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
},
{
scope:'email',
auth_type: 'rerequest'
}
);
});
Like this:
Like Loading...
Related