diff options
author | Andrew Dolgov <[email protected]> | 2020-01-25 13:02:11 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-01-25 13:02:11 +0300 |
commit | 776fe4768bc219481f58aac294a442359f0e9b0e (patch) | |
tree | 8066f9710e78e07f9f8e60c18b385369b818f876 | |
parent | 0e9e1ad112bb114ab023e01a3c1e68adad1c788a (diff) |
default password warning: fix close button, don't crash if dialog is recreated (on feed tree reload etc)
-rw-r--r-- | classes/dlg.php | 2 | ||||
-rw-r--r-- | js/Feeds.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/classes/dlg.php b/classes/dlg.php index d3e82ee59..0356ad3aa 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -199,7 +199,7 @@ class Dlg extends Handler_Protected { print "<button dojoType='dijit.form.Button' onclick=\"document.location.href = 'prefs.php'\">". __('Open Preferences')."</button> "; print "<button dojoType='dijit.form.Button' - onclick=\"return CommonDialogs.closeInfoBox()\">". + onclick=\"return dijit.byId('defaultPasswordDlg').hide();\">". __('Close this window')."</button>"; print "</footeer>"; } diff --git a/js/Feeds.js b/js/Feeds.js index ae9352064..9a27de82b 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -221,6 +221,9 @@ define(["dojo/_base/declare"], function (declare) { if (App.getInitParam("is_default_pw")) { console.warn("user password is at default value"); + if (dijit.byId("defaultPasswordDlg")) + dijit.byId("defaultPasswordDlg").destroyRecursive(); + const dialog = new dijit.Dialog({ title: __("Your password is at default value"), href: "backend.php?op=dlg&method=defaultpasswordwarning", |