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 .= '<label class="col-sm-6 control-label">'.$parameterName.'</label>';
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 {
$hiddenPasswordClass = '';
$eyeForPassword = '';
@ -1680,13 +1684,24 @@ function display_configuration_parameter(
/* show/hide admin password in step 5*/
$hiddenPasswordClass = 'inputShowPwd';
$inputType = 'password';
$eyeForPassword =
'<input type="checkbox" id="showPassword" class="hidden">'.'<label for="showPassword">'.
Display::returnFontAwesomeIcon('eye', null, true, 'showPasswordEye').
'</label> ';
$eyeForPassword = PHP_EOL
.'<input type="checkbox" id="showPassword" class="hidden">'
.'<label for="showPassword" style="cursor: pointer;">'
.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,
ENT_QUOTES).'" />'.$eyeForPassword."</div>";
$html .= '<div class="col-sm-6 '.$hiddenPasswordClass.'">'
.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>";

Loading…
Cancel
Save