Browse Source

Fixing autocapitalize invalid html tag see #5116

Julio Montoya 12 years ago
parent
commit
8e5c590033

+ 1 - 1
main/inc/lib/main_api.lib.php

@@ -2813,7 +2813,7 @@ function api_not_allowed($print_headers = false, $message = null) {
 
         //$form->addElement('text', 'login', get_lang('UserName'), array('size' => 17)); //old
         
-        $form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'span3')); //new
+        $form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'span3 autocapitalize_off')); //new
 
         //$form->addElement('password', 'password', get_lang('Password'), array('size' => 17)); //old
         $form->addElement('password', 'password', null, array('placeholder' => get_lang('Password'), 'class' => 'span3')); //new

+ 2 - 2
main/inc/lib/userportal.lib.php

@@ -3,7 +3,6 @@
 
 use \ChamiloSession as Session;
 
-
 class IndexManager {
 	var $tpl 	= false; //An instance of the template engine
 	var $name 	= '';
@@ -647,7 +646,8 @@ class IndexManager {
 		$form = new FormValidator('formLogin', 'POST', null,  null, array('class'=>'form-vertical'));
         // 'placeholder'=>get_lang('UserName')
         //'autocomplete'=>"off",        
-		$form->addElement('text', 'login', get_lang('UserName'), array('class' => 'span2', 'autofocus' => 'autofocus'));
+        
+		$form->addElement('text', 'login', get_lang('UserName'), array('class' => 'span2 autocapitalize_off', 'autofocus' => 'autofocus'));
 		$form->addElement('password', 'password', get_lang('Pass'), array('class' => 'span2'));
 		$form->addElement('style_submit_button','submitAuth', get_lang('LoginEnter'), array('class' => 'btn'));		
 		$html = $form->return_form();

+ 2 - 0
main/template/default/layout/footer.tpl

@@ -75,6 +75,8 @@ $(document).ready( function() {
         }    
     });
     
+    $('.autocapitalize_off').attr('autocapitalize', 'off');
+    
     //Tool tip (in exercises)
     var tip_options = {
         placement : 'right'