Add toggle_password_visibility option for MQTT password

This commit is contained in:
Isaac Connor 2021-12-29 18:25:44 -05:00
parent b37c894ffc
commit 2912256790
1 changed files with 1 additions and 0 deletions

View File

@ -513,6 +513,7 @@ foreach ( array_map('basename', glob('skins/'.$skin.'/css/*', GLOB_ONLYDIR)) as
echo '<input type="text" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL; echo '<input type="text" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL;
} else if ( $value['Type'] == 'password' ) { } else if ( $value['Type'] == 'password' ) {
echo '<input type="password" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL; echo '<input type="password" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL;
echo '<span class="material-icons md-18" data-on-click-this="toggle_password_visibility" data-password-input="'.$name.'">visibility</span>';
} else { } else {
echo '<input type="text" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL; echo '<input type="text" class="form-control-sm" id="'.$name.'" name="newConfig['.$name.']" value="'.validHtmlStr($value['Value']).'" '.($canEdit?'':' disabled="disabled"' ).'/>'.PHP_EOL;
} }