Merge branch '1.11.x' of github.com:chamilo/chamilo-lms into 1.11.x

pull/3393/head
Yannick Warnier 5 years ago
commit 15b6988942
  1. 29
      main/install/install.lib.php

@ -1671,7 +1671,11 @@ function display_configuration_parameter(
$html = '<div class="form-group">'; $html = '<div class="form-group">';
$html .= '<label class="col-sm-6 control-label">'.$parameterName.'</label>'; $html .= '<label class="col-sm-6 control-label">'.$parameterName.'</label>';
if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) { if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) {
$html .= '<input type="hidden" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'.$parameterValue; $html .= Display::input(
'hidden',
$formFieldName,
api_htmlentities($parameterValue, ENT_QUOTES)
).$parameterValue;
} else { } else {
$hiddenPasswordClass = ''; $hiddenPasswordClass = '';
$eyeForPassword = ''; $eyeForPassword = '';
@ -1680,13 +1684,24 @@ function display_configuration_parameter(
/* show/hide admin password in step 5*/ /* show/hide admin password in step 5*/
$hiddenPasswordClass = 'inputShowPwd'; $hiddenPasswordClass = 'inputShowPwd';
$inputType = 'password'; $inputType = 'password';
$eyeForPassword = $eyeForPassword = PHP_EOL
'<input type="checkbox" id="showPassword" class="hidden">'.'<label for="showPassword">'. .'<input type="checkbox" id="showPassword" class="hidden">'
Display::returnFontAwesomeIcon('eye', null, true, 'showPasswordEye'). .'<label for="showPassword" style="cursor: pointer;">'
'</label> '; .Display::returnFontAwesomeIcon('eye', null, true, 'showPasswordEye')
.'</label> ';
} }
$html .= '<div class="col-sm-6 '.$hiddenPasswordClass.'"><input class="form-control" type="'.$inputType.'" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, $html .= '<div class="col-sm-6 '.$hiddenPasswordClass.'">'
ENT_QUOTES).'" />'.$eyeForPassword."</div>"; .Display::input(
$inputType,
$formFieldName,
api_htmlentities($parameterValue, ENT_QUOTES),
[
'class' => 'form-control',
'size' => FORM_FIELD_DISPLAY_LENGTH,
'maxlength' => MAX_FORM_FIELD_LENGTH
]
)
.$eyeForPassword."</div>";
} }
$html .= "</div>"; $html .= "</div>";

Loading…
Cancel
Save