add label for inputs id ref CT#7836

1.10.x
aragonc 9 years ago
parent bfb46c21ad
commit 7d9c1556c1
  1. 3
      app/Resources/public/css/base.css
  2. 2
      main/inc/lib/api.lib.php
  3. 4
      main/inc/lib/pear/HTML/QuickForm/Renderer/Default.php
  4. 1
      main/inc/lib/pear/HTML/QuickForm/text.php
  5. 5
      main/inc/lib/template.lib.php

@ -85,6 +85,9 @@ a.thumbnail:hover{
margin-top: 10px;
margin-bottom: 10px;
}
#formLogin label{
display: none;
}
#login_block #formLogin .form-group{
display: none;
}

@ -4209,7 +4209,7 @@ function api_display_language_form($hide_if_no_choice = false)
</script>';
$html .= '<form id="lang_form" name="lang_form" method="post" action="'.api_get_self().'">';
$html .= '<label style="display: none;" for="language_list">' . get_lang('Language') . '</label>';
$html .= '<select id="language_list" class="chzn-select" name="language_list" onchange="javascript: jumpMenu(\'parent\',this,0);">';
$html .= '<select id="language_list" class="selectpicker show-tick form-control" name="language_list" onchange="javascript: jumpMenu(\'parent\',this,0);">';
foreach ($original_languages as $key => $value) {
if ($folder[$key] == $user_selected_language) {

@ -280,7 +280,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
{
$name = $element->getName();
$label = $element->getLabel();
$labelForId = $element->getLabelFor();
$labelForId = $element->getAttribute('id');
$icon = $element->getIconToHtml();
if (is_array($label)) {
@ -289,7 +289,7 @@ class HTML_QuickForm_Renderer_Default extends HTML_QuickForm_Renderer
$nameLabel = $label;
}
$labelFor = !empty($labelForId) ? 'for="' . $labelForId . '"' : '';
$labelFor = !empty($labelForId) ? 'for="' . $labelForId . '"' : 'for="' . $element->getName() . '"';
if (isset($this->_templates[$name])) {
// Custom template

@ -164,6 +164,7 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
break;
case FormValidator::LAYOUT_BOX_NO_LABEL:
return '
<label {label-for}>{label}</label>
<div class="input-group">
{icon}
{element}

@ -1207,14 +1207,13 @@ class Template
'login',
get_lang('UserName'),
true,
array('id' => 'login', 'autofocus' => 'autofocus', 'icon' => 'user')
);
array('id' => 'login', 'autofocus' => 'autofocus', 'icon' => 'user', 'placeholder' => get_lang('UserName')));
$form->addElement(
'password',
'password',
get_lang('Pass'),
array('id' => 'password', 'icon' => 'lock')
array('id' => 'password', 'icon' => 'lock', 'placeholder' => get_lang('Pass'))
);
// Captcha

Loading…
Cancel
Save