Add autocapitalize = none

1.10.x
jmontoyaa 10 years ago
parent d542df949b
commit 1df72cd51b
  1. 14
      main/auth/gotocourse.php
  2. 16
      main/inc/lib/api.lib.php
  3. 20
      main/inc/lib/template.lib.php
  4. 17
      main/template/default/layout/footer.js.tpl

@ -27,8 +27,18 @@ if (isset($_GET['firstpage'])) {
$action = api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']);
$action = str_replace('&', '&', $action);
$form = new FormValidator('formLogin', 'post', $action, null, array('class'=>'form-stacked'));
$form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'autocapitalize_off')); //new
$form->addElement('password', 'password', null, array('placeholder' => get_lang('Password'))); //new
$form->addElement(
'text',
'login',
null,
array('placeholder' => get_lang('UserName'), 'autocapitalize' => 'none')
);
$form->addElement(
'password',
'password',
null,
array('placeholder' => get_lang('Password'), 'autocapitalize' => 'none')
);
$form->addButtonNext(get_lang('LoginEnter'), 'submitAuth');
// see same text in main_api.lib.php function api_not_allowed
if (api_is_cas_activated()) {

@ -3418,8 +3418,18 @@ function api_not_allowed($print_headers = false, $message = null)
array(),
FormValidator::LAYOUT_BOX_NO_LABEL
);
$form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'autocapitalize_off'));
$form->addElement('password', 'password', null, array('placeholder' => get_lang('Password')));
$form->addElement(
'text',
'login',
null,
array('placeholder' => get_lang('UserName'), 'autocapitalize' => 'none')
);
$form->addElement(
'password',
'password',
null,
array('placeholder' => get_lang('Password'), 'autocapitalize' => 'none')
);
$form->addButton('submitAuth', get_lang('LoginEnter'), '', 'primary');
// see same text in auth/gotocourse.php and main_api.lib.php function api_not_allowed (above)
@ -3472,7 +3482,7 @@ function api_not_allowed($print_headers = false, $message = null)
$action = api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']);
$action = str_replace('&', '&', $action);
$form = new FormValidator('formLogin', 'post', $action, null, array('class'=>'form-stacked'));
$form->addElement('text', 'login', null, array('placeholder' => get_lang('UserName'), 'class' => 'col-md-3 autocapitalize_off')); //new
$form->addElement('text', 'login', null, array('autocapitalize' => 'none', 'placeholder' => get_lang('UserName'), 'class' => 'col-md-3'));
$form->addElement('password', 'password', null, array('placeholder' => get_lang('Password'), 'class' => 'col-md-3')); //new
$form->addButtonNext(get_lang('LoginEnter'), 'submitAuth');

@ -1115,7 +1115,7 @@ class Template
$tpl = $this->get_template('layout/show_footer.tpl');
$this->display($tpl);
}
/**
* Show footer js template.
*/
@ -1288,18 +1288,30 @@ class Template
'login',
get_lang('UserName'),
true,
array('id' => 'login', 'autofocus' => 'autofocus', 'icon' => 'user fa-fw', 'placeholder' => get_lang('UserName')));
array(
'id' => 'login',
'autofocus' => 'autofocus',
'icon' => 'user fa-fw',
'placeholder' => get_lang('UserName'),
'autocapitalize' => 'none'
)
);
$form->addElement(
'password',
'password',
get_lang('Pass'),
array('id' => 'password', 'icon' => 'lock fa-fw', 'placeholder' => get_lang('Pass'))
array(
'id' => 'password',
'icon' => 'lock fa-fw',
'placeholder' => get_lang('Pass'),
'autocapitalize' => 'none',
)
);
// Captcha
$captcha = api_get_setting('allow_captcha');
$allowCaptcha = $captcha == 'true';
$allowCaptcha = $captcha === 'true';
if ($allowCaptcha) {
$useCaptcha = isset($_SESSION['loginFailed']) ? $_SESSION['loginFailed'] : null;

@ -1,14 +1,4 @@
<script>
$("form").on("click", ' .advanced_parameters', function() {
/*var id = $(this).attr('id') + '_options';
console.log(id);
$("#"+id).toggleClass('active');
var button = $(this);
$("#"+id).toggle(function() {
$("#"+id).toggleClass('active');
});*/
});
/* Makes row highlighting possible */
$(document).ready( function() {
// Date time settings.
@ -87,7 +77,6 @@
$("form .data_table input:checkbox").click(function () {
if ($(this).is(":checked")) {
$(this).parentsUntil("tr").parent().addClass("row_selected");
} else {
$(this).parentsUntil("tr").parent().removeClass("row_selected");
}
@ -98,16 +87,10 @@
$("input[name=login]").focus();
}
/* For IOS users */
$('.autocapitalize_off').attr('autocapitalize', 'off');
// Tool tip (in exercises)
var tip_options = {
placement: 'right'
};
$('.boot-tooltip').tooltip(tip_options);
});
</script>

Loading…
Cancel
Save