From: Alan Date: Wed, 28 Jun 2023 05:04:21 +0000 (+0800) Subject: Fix #7724 - Bulk password change X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=89ef78b072ae532d6755774f370162ba71bb63a1 Fix #7724 - Bulk password change --- diff --git a/Pman.Dialog.AdminBulkPassword.bjs b/Pman.Dialog.AdminBulkPassword.bjs new file mode 100644 index 0000000..fdd3f69 --- /dev/null +++ b/Pman.Dialog.AdminBulkPassword.bjs @@ -0,0 +1,129 @@ +{ + "items" : [ + { + "$ xns" : "Roo", + "closable" : false, + "height" : 420, + "items" : [ + { + "$ xns" : "Roo", + "* prop" : "center", + "xtype" : "LayoutRegion" + }, + { + "$ xns" : "Roo", + "items" : [ + { + "$ url" : "baseURL + '/Roo/Core_person'", + "$ xns" : "Roo.form", + "items" : [ + { + "$ xns" : "Roo.form", + "Number height" : 300, + "Number width" : 450, + "actionMode" : "fieldEl", + "fieldLabel" : "email and new password separeted by a space
(note you can not change your password this way)", + "name" : "_bulk_update_passwords", + "xtype" : "TextArea" + } + ], + "labelAlign" : "top", + "labelWidth" : 100, + "listeners" : { + "actioncomplete" : [ + "function (_self, action)", + "{ ", + " if (action.type == 'setdata') {", + "", + " ", + "", + " return;", + " ", + " }", + " if (action.type == 'load') {", + " ", + " return;", + " }", + " if (action.type =='submit') {", + "", + " ", + " _this.dialog.hide();", + "", + "", + " if (_this.callback) {", + " _this.callback.call(_this, action.result.data);", + " }", + " _this.form.reset();", + " return;", + " } ", + "}" + ], + "rendered" : [ + "function (form)", + "{", + " _this.form = form;", + "}" + ] + }, + "style" : "margin:5px", + "xtype" : "Form" + } + ], + "region" : "center", + "xtype" : "ContentPanel" + }, + { + "$ xns" : "Roo", + "* prop" : "buttons[]", + "listeners" : { + "click" : [ + "function (_self, e)", + "{", + " _this.form.reset();", + " _this.dialog.hide();", + "}" + ] + }, + "text" : "Cancel", + "xtype" : "Button" + }, + { + "$ xns" : "Roo", + "* prop" : "buttons[]", + "listeners" : { + "click" : [ + "function (_self, e)", + "{", + " ", + " ", + " _this.form.submit();", + "}" + ] + }, + "text" : "OK", + "xtype" : "Button" + } + ], + "modal" : true, + "resizable" : false, + "title" : "Bulk Change Passwords", + "width" : 500, + "xtype" : "LayoutDialog" + } + ], + "modOrder" : "001", + "name" : "Pman.Dialog.AdminBulkPassword", + "named_strings" : { + "_bulk_update_passwords_fieldLabel" : "6dac324294c8f0378abea84fa382b60c" + }, + "parent" : "", + "path" : "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminBulkPassword.bjs", + "permname" : "", + "strings" : { + "6dac324294c8f0378abea84fa382b60c" : "email and new password separeted by a space
(note you can not change your password this way)", + "e0aa021e21dddbd6d8cecec71e9cf564" : "OK", + "e47ca954fb02edc53af1507ac17d12a0" : "Bulk Change Passwords", + "ea4788705e6873b424c65e91c2846b19" : "Cancel" + }, + "title" : "" +} \ No newline at end of file diff --git a/Pman.Dialog.AdminBulkPassword.js b/Pman.Dialog.AdminBulkPassword.js new file mode 100644 index 0000000..868391b --- /dev/null +++ b/Pman.Dialog.AdminBulkPassword.js @@ -0,0 +1,151 @@ +//