Login Form updated in google chrome Problem with bootstrap3

1.10.x
aragonc 11 years ago
parent f26fb9c45a
commit 3b506a89f8
  1. 5
      main/auth/openid/login.php
  2. 4
      main/css/base.css
  3. 2
      main/inc/lib/formvalidator/FormValidator.class.php
  4. 8
      main/inc/lib/pear/HTML/QuickForm/label.php
  5. 2
      main/inc/lib/template.lib.php
  6. 19
      main/inc/lib/userportal.lib.php

@ -20,9 +20,10 @@ require_once 'xrds.lib.php';
function openid_form() { function openid_form() {
//get_lang('OpenIdAuthentication') //get_lang('OpenIdAuthentication')
$form = new FormValidator('openid_login', 'post', null, null, array('class' => 'form-vertical form_login')); $form = new FormValidator('openid_login', 'post', null, null, array('class' => 'form-vertical form_login'));
$form->addElement('text', 'openid_url', array(get_lang('OpenIDURL'), Display::url(get_lang('OpenIDWhatIs'), 'main/auth/openid/whatis.php')), array('class' => 'openid_input')); $form -> addElement('text', 'openid_url', array(get_lang('OpenIDURL'), Display::url(get_lang('OpenIDWhatIs'), 'main/auth/openid/whatis.php')), array('class' => 'openid_input'));
$form->addElement('button', 'submit', get_lang('Login')); $form -> addElement('button', 'submit', get_lang('Login'));
return $form->return_form(); return $form->return_form();
/* /*
return '<label for="openid_url">'.get_lang('OpenIDURL').' <a href="main/auth/openid/whatis.php" title="'.get_lang('OpenIDWhatIs').'">'.Display::return_icon('info3.gif',get_lang('Info')).'</a></label> return '<label for="openid_url">'.get_lang('OpenIDURL').' <a href="main/auth/openid/whatis.php" title="'.get_lang('OpenIDWhatIs').'">'.Display::return_icon('info3.gif',get_lang('Info')).'</a></label>

@ -471,7 +471,9 @@ span.form_required {
form .formw { form .formw {
margin-left: 170px; margin-left: 170px;
} }
form .form-button-login{
margin-top: 5px;
}
form .formw input { form .formw input {
float:left; float:left;
} }

@ -57,7 +57,7 @@ class FormValidator extends HTML_QuickForm
$renderer->setFormTemplate($formTemplate); $renderer->setFormTemplate($formTemplate);
// Element template // Element template
if (isset($attributes['class']) && $attributes['class'] == 'well form-inline') { if (isset($attributes['class']) && $attributes['class'] == 'form-inline') {
$elementTemplate = ' {label} {element} '; $elementTemplate = ' {label} {element} ';
$renderer->setElementTemplate($elementTemplate); $renderer->setElementTemplate($elementTemplate);
} elseif (isset($attributes['class']) && $attributes['class'] == 'form-search') { } elseif (isset($attributes['class']) && $attributes['class'] == 'form-search') {

@ -55,12 +55,6 @@ class HTML_QuickForm_label extends HTML_QuickForm_static
public function toHtml() public function toHtml()
{ {
$for = $this->getLabelFor(); $for = $this->getLabelFor();
return '<div class="control-group "> return '<label class="control-label"' . (empty($for) ? '' : ' for="' . $for . '"') . '>' . $this->getLabel() . '</label>' . HTML_QuickForm_static::toHtml();
<label class="control-label"' . (empty($for) ? '' : ' for="' . $for . '"') . '>' . $this->getLabel() . '</label>
<div class="controls">
' . HTML_QuickForm_static::toHtml() . '
</div>
</div>
';
} }
} }

@ -486,7 +486,7 @@ class Template
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css';
} }
// $css[] = api_get_path(WEB_CSS_PATH).'font_awesome/css/font-awesome.css'; $css[] = api_get_path(WEB_CSS_PATH).'font-awesome.css';
$css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/mediaelementplayer.css'; $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/mediaelement/mediaelementplayer.css';
//THEME CSS STYLE //THEME CSS STYLE
// $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'responsive.css'); // $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'responsive.css');

@ -696,10 +696,18 @@ class IndexManager
*/ */
function display_login_form() function display_login_form()
{ {
$form = new FormValidator('formLogin', 'POST', null, null, array('class'=>'form-inline'));
$form->addElement('text', 'login', get_lang('UserName'), array('id' => 'login', 'class' => 'form-control autocapitalize_off', 'autofocus' => 'autofocus')); $form = new FormValidator('formLogin', 'POST', null, null, array('class'=>'form-inline'));
$form->addElement('password', 'password', get_lang('Pass'), array('id' => 'password', 'class' => 'form-control')); $form->addElement('label',get_lang('UserName'));
$form->addHtml('<div class="input-group">');
$form->addHtml('<span class="input-group-addon"><i class="fa fa-user"></i></span>');
$form->addElement('text', 'login','', array('id' => 'login', 'class' => 'form-control autocapitalize_off', 'autofocus' => 'autofocus'));
$form->addHtml('</div>');
$form->addElement('label',get_lang('Pass'));
$form->addHtml('<div class="input-group">');
$form->addHtml('<span class="input-group-addon"><i class="fa fa-lock"></i></span>');
$form->addElement('password', 'password','', array('id' => 'password', 'class' => 'form-control'));
$form->addHtml('</div>');
global $_configuration; global $_configuration;
// Captcha // Captcha
@ -738,8 +746,9 @@ class IndexManager
$form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question); $form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question);
} }
} }
$form->addHtml('<div class="form-button-login">');
$form->addElement('style_submit_button','submitAuth', get_lang('LoginEnter'), array('class' => 'btn btn-default')); $form->addElement('style_submit_button','submitAuth', get_lang('LoginEnter'), array('class' => 'btn-primary btn-block'));
$form->addHtml('</div>');
$html = $form->return_form(); $html = $form->return_form();
// The validation is located in the local.inc // The validation is located in the local.inc

Loading…
Cancel
Save