![](https://www.planitournament.com/image/no_logo.gif)
function forgotPasswordModal(){
$("#modal_login").modal('hide');
$("#modal_login").remove();
createModal({
title:'Forgot your password?',
content:"Email: ",
width:' ',
buttons: [modalButton( { classes:'btn-modal btn btn-primary', label:'Send',click:'forgotPassword()',dismiss:false } )],
id:'forgot_password'
});
}
function FloatingforgotPwdModal(email){
createModal({
title:'Forgot your password?',
content:"Email: ",
width:' ',
buttons: [modalButton( { classes:'btn-modal btn btn-primary', label:'Send',click:'forgotPassword()',dismiss:false } )],
id:'forgot_password'
});
}
function forgotPassword(account_type, id){
var account_type = account_type || 0;
var id = id || 0;
if($("#email_forgot").val()==""){
$("#email_forgot").tooltip( { title:"You must enter your email address!",container:'#forgot_password',placement:'right' } );
$('#email_forgot').tooltip('show');
$('#email_forgot').css("background-color","#FF9999");
$('#email_forgot').keydown(function(){
$(this).tooltip('destroy');
$(this).css("background-color","white");
$(this).unbind('keydown');
})
return;
}
$.ajax({
url: "organization_login.php",
////timeout: 5000,
type:'POST',
data: {
'email_forgot' : $("#email_forgot").val(),
'account_type': account_type,
'id': id
},
dataType: "json",
success: function(data) {
// S'il y a plusieurs comptes pour cette adresse courriel
if (data.multiple_accounts == 1) {
$('#forgot_password').modal('hide');
createModal({
id:'email_forgot_list_modal',
title:"Resetting a password",
content: '' +
"
Ex: Chrome and IE',buttons:buttons,draggable:true, width: '550'}); } } } function updateTournamentIdConcurrency(id) { $.ajax({ url: "https://www.planitournament.com/ajax_call.php", data: { 'update_tournament_id_concurrency' : 1, 'tournament_id':id, }, success: function(data) { reloadPage(); } }); } function reloadPage() { if(location.href.indexOf('tournament_dashboard.php') != -1) { location.href = "https://www.planitournament.com/tournament_dashboard.php"; } else { location.reload(); } } function modalLogin(user,type,del){ $.ajax({ url: "https://www.planitournament.com/organization_login.php", //timeout: 5000, data: { 'modal_login' : 1, 'user':user, 'type':type, 'del':del }, success: function(data) { var buttons = Array(); buttons[0] = modalButton( { id:'btn_login',label:'Login',click:'logIn()',dismiss:false,classes:'btn btn-primary' } ); buttons[1] = modalButton( { id:'btn_cancel',label:'Cancel',dismiss:true,classes:'btn' } ); createModal({ id:'modal_login', title:'Login', content:data, draggable:true, buttons: buttons, width:550, }); $("#login_password").keyup(function(event){ if(event.keyCode == 13){ $("#btn_login").click(); } }); $("#login_email").focus(); }, error: function(x, t, m) { ajaxError(x, t, m); } }); } /*$( window ).resize(function() { alert($(window).width()); });*/ $(document).ready(function() { //alert($(window).width()); // Si l'utilisateur vient tout juste de s'authentifier, on affiche un popup // pour lui indiquer dans quel type de compte il est connect� //ajaxPage(1); // $(".banner-pub-mobile").html('
Enter the email address for your account, an email will be sent.
Enter the email address for your account, an email will be sent.
Warning: We detected multiple accounts with the same email
" + data.html,
buttons: modalButton({label:"Close",dismiss:true}),
draggable: true,
max_height: '60vh',
width: '700'
}, 'true');
} else {
if (data.msg.trim() == 'invalid')
{
if (account_type == 0 && id == 0) {
$("#forgot_password").find('.modal-body').html('This E-mail address does not match any accounts on PlaniTournament / PlaniLeague');
} else {
$("#email_forgot_list_modal").find('.modal-body').html('This E-mail address does not match any accounts on PlaniTournament / PlaniLeague');
}
}
else {
if (account_type == 0 && id == 0) {
$("#forgot_password").find('.modal-body').html('An email with a link to reset your password will be sent to you.');
} else {
$("#email_forgot_list_modal").find('.modal-body').html('An email with a link to reset your password will be sent to you.');
}
}
if (account_type == 0 && id == 0) {
var btn = $("#forgot_password").find('.btn-modal');
btn.unbind('click');
btn.html('Ok');
btn.attr('data-dismiss','modal');
} else {
btn = $("#email_forgot_list_modal").find('.btn-modal');
btn.unbind('click');
btn.html('Ok');
btn.attr('data-dismiss','modal');
}
}
},
error: function(x, t, m) {
ajaxError(x, t, m);
}
});
}
// Fonction qui indique � un manager qu'il ne peut pas g�rer ses joueurs
function showPopupCantManagePlayer(){
button = modalButton({label:'Close'});
createModal({
title: "Player management",
content: "Your entry must be accepted to manage your players.",
isForm: false,
validate: false,
buttons: button,
bold: true
});
}
// Fonction qui indique � un manager qu'il ne peut pas consulter l'horaire de son �quipe
function showPopupUnavailablePage(){
button = modalButton({label:'Close'});
createModal({
title: "Warning",
content: "Your schedule is not available for now.",
isForm: false,
validate: false,
buttons: button,
bold: true
});
}
var TOURNAMENT_ID = $('#smarty_session_tournament_tournament_id').val();
if(typeof TOURNAMENT_ID !== 'undefined' && TOURNAMENT_ID !== '' && TOURNAMENT_ID != null && TOURNAMENT_ID != '' ) {
var source = new EventSource('https://www.planitournament.com//compare_tournament_id.php?tournament_id=' + TOURNAMENT_ID);
source.onmessage = function(event) {
if(event.data != 'none' && CHANGE_TOURNAMENT == true) {
source.close();
buttons = new Array();
buttons[0] = modalButton({label:'Return to my tournament (league)',click:"updateTournamentIdConcurrency(" + event.data + ")",dismiss:false,classes:'btn btn-primary'});
createModal({id:'tournament_change_modal',title:'Warning',isForm : false,content:'The tournament (league) selected has been changed in another page. Please click "Return to my tournament (league)" to reselect the tournament or league underway. If you wish to view and configure two tournaments or league at the same time, use two different browsers. Please select the account whose password you want to reset.
Ex: Chrome and IE',buttons:buttons,draggable:true, width: '550'}); } } } function updateTournamentIdConcurrency(id) { $.ajax({ url: "https://www.planitournament.com/ajax_call.php", data: { 'update_tournament_id_concurrency' : 1, 'tournament_id':id, }, success: function(data) { reloadPage(); } }); } function reloadPage() { if(location.href.indexOf('tournament_dashboard.php') != -1) { location.href = "https://www.planitournament.com/tournament_dashboard.php"; } else { location.reload(); } } function modalLogin(user,type,del){ $.ajax({ url: "https://www.planitournament.com/organization_login.php", //timeout: 5000, data: { 'modal_login' : 1, 'user':user, 'type':type, 'del':del }, success: function(data) { var buttons = Array(); buttons[0] = modalButton( { id:'btn_login',label:'Login',click:'logIn()',dismiss:false,classes:'btn btn-primary' } ); buttons[1] = modalButton( { id:'btn_cancel',label:'Cancel',dismiss:true,classes:'btn' } ); createModal({ id:'modal_login', title:'Login', content:data, draggable:true, buttons: buttons, width:550, }); $("#login_password").keyup(function(event){ if(event.keyCode == 13){ $("#btn_login").click(); } }); $("#login_email").focus(); }, error: function(x, t, m) { ajaxError(x, t, m); } }); } /*$( window ).resize(function() { alert($(window).width()); });*/ $(document).ready(function() { //alert($(window).width()); // Si l'utilisateur vient tout juste de s'authentifier, on affiche un popup // pour lui indiquer dans quel type de compte il est connect� //ajaxPage(1); // $(".banner-pub-mobile").html('
![](https://www.planitournament.com/image/no_logo.gif)