<commit_before>
<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '347670992472912',
      cookie     : true,
      xfbml      : true,
      version    : 'v3.2'
    });
      
    FB.AppEvents.logPageView();   
      
  };

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/fr_CA/sdk.js#xfbml=1&version=v3.2&appId=347670992472912&autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

function loginFBUser()
{
    FB.getLoginStatus(function(response) 
    {
        
        var scope = angular.element($("#admin-container")).scope();

        scope.socialLogin = true;
        
        scope.$apply();
        
        // Log the user if he is connected. 
        if(response.status  === 'connected')
        {
            // Send the auth token to the server
            $.ajax(
            {
                type : "POST", 
                url : "<?php echo site_url("account/facebook_login"); ?>", 
                data : { token : response.authResponse}, 
                dataType : "json",
                success : function(loginResponse)
                {
                    scope.socialLogin = true;

                    scope.$apply();

                    // Redirect
                    if(loginResponse.success)
                    {
                        location.href = "<?php echo site_url(); ?>".concat("/").concat(loginResponse.redirect);
                    }
                }
            });
        }
        else
        {
            scope.message = "Échec de l'authentification.";
            scope.socialLogin = true;
            scope.$apply();
        }
    });
}

  
</script>

<link href="<?php echo base_url("assets/css/login.css"); ?>" rel="stylesheet">


<div id="admin-container" class="container mainbox" ng-controller="AccountController as ctrl" ng-cloak>
   <div id="loginbox" class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
      <div class="panel panel-info" >
        
        <md-toolbar class="md-primary">
            <div>
                <h2 class="md-toolbar-tools">Se connecter</h2>
            </div>
        </md-toolbar>  
          
        <md-content class="login-box">
            
            <div id="login-alert" class="alert alert-danger col-sm-12" ng-show="message">
               <p>{{message}}</p>
            </div>
            
             <div class="col-12" style="text-align: center; margin : 10px;">
                <div class="fb-login-button" onlogin="loginFBUser()" data-max-rows="1" data-scope="public_profile,email,user_location" data-size="large" data-button-type="continue_with" data-auto-logout-link="false" data-use-continue-as="true"></div>
            </div>
            
            <div ng-if="socialLogin" layout="row" layout-sm="column" layout-align="space-around">
                <md-progress-circular md-mode="indeterminate"></md-progress-circular>
            </div> 
            
            <form name="loginForm" class="form-horizontal" role="form" ng-submit="login()" novalidate>

                <md-input-container class="md-block col-md-12" flex-gt-sm>
                    <label class="md-no-float">Email</label>
                    <md-icon class="md-primary"><i class="material-icons">email</i></md-icon>
                    <input required name="email" ng-model="user.email" />
                    <div ng-messages="loginForm.email.$error">
                        <div ng-message="required">Veillez entrer votre addresse email.</div>
                    </div>
                </md-input-container>

                <md-input-container class="md-block col-md-12">
                    <label class="md-no-float">Mot de passe</label>
                    <md-icon class="md-primary"><i class="material-icons">lock</i></md-icon>
                    <input style="border-left : none; border-right : none;border-top : none;" type="password" required name="password" ng-model="user.password" />
                    <div ng-messages="loginForm.password.$error">
                        <div ng-message="required">Veillez entrer un mot de passe.</div>
                    </div>
                </md-input-container>
                
                <div class="col-sm-12">
                    <md-checkbox class="pull-left" ng-model="user.rememberme" aria-label="Rester connecté">
                        Rester connecté
                    </md-checkbox><commit_msg>Update login page<commit_after>
<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '347670992472912',
      cookie     : true,
      xfbml      : true,
      version    : 'v3.2'
    });
      
    FB.AppEvents.logPageView();   
      
  };

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/fr_CA/sdk.js#xfbml=1&version=v3.2&appId=347670992472912&autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

function loginFBUser()
{
    FB.getLoginStatus(function(response) 
    {
        
        var scope = angular.element($("#admin-container")).scope();

        scope.socialLogin = true;
        
        scope.$apply();
        
        // Log the user if he is connected. 
        if(response.status  === 'connected')
        {
            // Send the auth token to the server
            $.ajax(
            {
                type : "POST", 
                url : "<?php echo site_url("account/facebook_login"); ?>", 
                data : { token : response.authResponse}, 
                dataType : "json",
                success : function(loginResponse)
                {
                    scope.socialLogin = true;

                    scope.$apply();

                    // Redirect
                    if(loginResponse.success)
                    {
                        location.href = "<?php echo site_url(); ?>".concat("/").concat(loginResponse.redirect);
                    }
                }
            });
        }
        else
        {
            scope.message = "Échec de l'authentification.";
            scope.socialLogin = true;
            scope.$apply();
        }
    });
}

  
</script>

<link href="<?php echo base_url("assets/css/login.css"); ?>" rel="stylesheet">


<div id="admin-container" class="container mainbox" ng-controller="AccountController as ctrl" ng-cloak>
   <div id="loginbox" class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
      <div class="panel panel-info" >
        
        <md-toolbar class="md-primary">
            <h2 class="md-toolbar-tools">Se connecter</h2>
        </md-toolbar>  
          
        <md-content class="login-box" style="background-color: #f5f7fa;">
            
            <div layout="row" layout-align="center">
                <img src="<?php echo base_url("assets/img/logo.png"); ?>" style="height : 50px; margin : 10px;" />
            </div>
            
            <div id="login-alert" class="alert alert-danger col-sm-12" ng-show="message">
               <p>{{message}}</p>
            </div>
            
            <div layout="row" layout-align="center center" layout-padding>
                <div class="fb-login-button" onlogin="loginFBUser()" data-max-rows="1" data-scope="public_profile,email,user_location" data-size="large" data-button-type="continue_with" data-auto-logout-link="false" data-use-continue-as="true"></div>
            </div>
            
            <div ng-if="socialLogin" layout="row" layout-sm="column" layout-align="space-around">
                <md-progress-circular md-mode="indeterminate"></md-progress-circular>
            </div> 
            
            <form name="loginForm" class="form-horizontal" role="form" ng-submit="login()" novalidate>

                <md-input-container class="md-block col-md-12" flex-gt-sm>
                    <label class="md-no-float">Email</label>
                    <md-icon class="md-primary"><i class="material-icons">email</i></md-icon>
                    <input required name="email" ng-model="user.email" />
                    <div ng-messages="loginForm.email.$error">
                        <div ng-message="required">Veillez entrer votre addresse email.</div>
                    </div>
                </md-input-container>

                <md-input-container class="md-block col-md-12">
                    <label class="md-no-float">Mot de passe</label>
                    <md-icon class="md-primary"><i class="material-icons">lock</i></md-icon>
                    <input style="border-left : none; border-right : none;border-top : none;" type="password" required name="password" ng-model="user.password" />
                    <div ng-messages="loginForm.password.$error">
                        <div ng-message="required">Veillez entrer un mot de passe.</div>
                    </div>
                </md-input-container>
                
                <div class="col-sm-12">
                    <md-checkbox class="pull-left" ng-model="user.rememberme" aria-label="Rester connecté">
                        Rester connecté
                    </md-checkbox>
{'fraction_non_alphanumeric': 0.15112574341546303, 'fraction_numerical': 0.012107051826677994, 'mean_word_length': 1.7006022368798395, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 125, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5881657', 'n_tokens_mistral': 2844, 'n_tokens_neox': 2667, 'n_words': 470}