<commit_before>{% load i18n %}
{% load ndf_tags %}


<div class = "row">
  <div class = "medium-3 column" id = "captcha-content" >
     <!-- Area to append captcha -->
  </div>
  
  <br>

  <div class = "medium-4 column" ends>
  	<label class='fi-refresh js-captcha-refresh'>  </button>
  </div>
  		
</div>
<div class = "invalid-captcha">
  	
</div>
<script type="text/javascript">
   
   var formData = [];
   $('form').submit(function(event){
		event.preventDefault();
		
		$('form').find("input[name]").each(function (index, node) {
	    formData.push(String(node.name) + ":"+ String(node.value));
	    });	
		
		$.ajax({
				url: "{% url 'captcha_validate' %}",
				type:"POST",
				data:{
						formData,
						csrfmiddlewaretoken: '{{ csrf_token }}'},	
				success:function(data)
					{   if (data == 'True')
						{   //Diconnect the on Submit action from form
							$('form').off("submit")
							//Trigger the submit action manually
							$('form').submit()
						}
						else
						{	$('.invalid-captcha').empty();
							$('.invalid-captcha').append("<labe style = 'color:red;'> {% trans 'invalid captcha Try Again' %} !! </label>")
						}
					}
			   });
	});
  
  $(document).ready(function(){
			get_new_captcha();  	   
   });	
  

  function get_new_captcha(){
  	$.ajax({
				url:"{% url 'new_captcha' %}",
				type:"GET",
				success:function(data)
					{
						$('#captcha-content').empty()
						$('#captcha-content').append(data)
					}
  		});
  }
  
  $('.js-captcha-refresh').click(function(){
    		get_new_captcha();
  });


</script>    <commit_msg>Changed Templates for Mobile View<commit_after>{% load i18n %}
{% load ndf_tags %}


<div class = "row">
  <div class = "small-9  medium-5 large-3 columns"   id = "captcha-content" >
     <!-- Area to append captcha -->
  </div>
  
  <br>

  <div class="small-3 medium-3 large-3 columns" ends>
  	<label class='fi-refresh js-captcha-refresh'>  </button>
  </div>
  		
</div>
<div class = "invalid-captcha">
  	
</div>
<script type="text/javascript">
   
   var formData = [];
   $('form').submit(function(event){
		event.preventDefault();
		
		$('form').find("input[name]").each(function (index, node) {
	    formData.push(String(node.name) + ":"+ String(node.value));
	    });	
		
		$.ajax({
				url: "{% url 'captcha_validate' %}",
				type:"POST",
				data:{
						formData,
						csrfmiddlewaretoken: '{{ csrf_token }}'},	
				
				success:function(data)
					{   if (data == 'True')
						{   //Diconnect the on Submit action from form
							$('form').off("submit")
							//Trigger the submit action manually
							$('form').submit()
						}
						else
						{	$('.invalid-captcha').empty();
							$('.invalid-captcha').append("<label style = 'color:red;'> {% trans 'invalid captcha Try Again' %} !! </label>")
						}
					}
			   });
	});
  
  $(document).ready(function(){
			get_new_captcha(); 	
	});	
  

  function get_new_captcha(){
  	$.ajax({
				url:"{% url 'new_captcha' %}",
				type:"GET",
				success:function(data)
					{
						$('#captcha-content').empty()
						$('#captcha-content').append(data)
						$('.invalid-captcha').empty();	
					},
				complete:function()
					{
						$("#id_captcha_1").attr("tabindex", "3");
					}	
  		});
  }
  
  $('.js-captcha-refresh').click(function(){
    		get_new_captcha();

  });


</script>    
{'fraction_non_alphanumeric': 0.20813397129186603, 'fraction_numerical': 0.004186602870813397, 'mean_word_length': 2.5210526315789474, 'pattern_counts': {'":': 2, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, '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': '7316664', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1166, 'n_words': 209}