mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Suppress default password warning (#830)
This commit is contained in:
@@ -152,8 +152,13 @@ $(document).ready(function () {
|
||||
$("#main-nav").removeAttr('style')
|
||||
$("#top-navbar").removeAttr('style')
|
||||
|
||||
if (window.defaultPasswordIsSet === true)
|
||||
showNotification('warning', $.i18n('dashboard_message_default_password'), $.i18n('dashboard_message_default_password_t'), '<a style="cursor:pointer" onClick="changePassword()"> ' + $.i18n('InfoDialog_changePassword_title') + '</a>')
|
||||
if (window.defaultPasswordIsSet === true && getStorage("suppressDefaultPwWarning") !== "true" )
|
||||
{
|
||||
var supprPwWarnCheckbox = '<div class="text-right">'+$.i18n('dashboard_message_do_not_show_again')
|
||||
+ ' <input id="chk_suppressDefaultPw" type="checkbox" onChange="suppressDefaultPwWarning()"> </div>'
|
||||
showNotification('warning', $.i18n('dashboard_message_default_password'), $.i18n('dashboard_message_default_password_t'), '<a style="cursor:pointer" onClick="changePassword()">'
|
||||
+ $.i18n('InfoDialog_changePassword_title') + '</a>' + supprPwWarnCheckbox)
|
||||
}
|
||||
else
|
||||
//if logged on and pw != default show option to lock ui
|
||||
$("#btn_lock_ui").removeAttr('style')
|
||||
@@ -308,6 +313,14 @@ $(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
function suppressDefaultPwWarning(){
|
||||
|
||||
if (document.getElementById('chk_suppressDefaultPw').checked)
|
||||
setStorage("suppressDefaultPwWarning", "true");
|
||||
else
|
||||
setStorage("suppressDefaultPwWarning", "false");
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var sidebar = $('#side-menu'); // cache sidebar to a variable for performance
|
||||
sidebar.delegate('a.inactive', 'click', function () {
|
||||
|
Reference in New Issue
Block a user