default password warning: fix close button, don't crash if dialog is recreated (on feed tree reload etc)
This commit is contained in:
parent
0e9e1ad112
commit
776fe4768b
|
@ -199,7 +199,7 @@ class Dlg extends Handler_Protected {
|
||||||
print "<button dojoType='dijit.form.Button' onclick=\"document.location.href = 'prefs.php'\">".
|
print "<button dojoType='dijit.form.Button' onclick=\"document.location.href = 'prefs.php'\">".
|
||||||
__('Open Preferences')."</button> ";
|
__('Open Preferences')."</button> ";
|
||||||
print "<button dojoType='dijit.form.Button'
|
print "<button dojoType='dijit.form.Button'
|
||||||
onclick=\"return CommonDialogs.closeInfoBox()\">".
|
onclick=\"return dijit.byId('defaultPasswordDlg').hide();\">".
|
||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
print "</footeer>";
|
print "</footeer>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,6 +221,9 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
if (App.getInitParam("is_default_pw")) {
|
if (App.getInitParam("is_default_pw")) {
|
||||||
console.warn("user password is at default value");
|
console.warn("user password is at default value");
|
||||||
|
|
||||||
|
if (dijit.byId("defaultPasswordDlg"))
|
||||||
|
dijit.byId("defaultPasswordDlg").destroyRecursive();
|
||||||
|
|
||||||
const dialog = new dijit.Dialog({
|
const dialog = new dijit.Dialog({
|
||||||
title: __("Your password is at default value"),
|
title: __("Your password is at default value"),
|
||||||
href: "backend.php?op=dlg&method=defaultpasswordwarning",
|
href: "backend.php?op=dlg&method=defaultpasswordwarning",
|
||||||
|
|
Loading…
Reference in New Issue