[pve-devel] [RFC manager 16/28] use window.PasswordEdit from widget toolkit
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Dec 11 16:26:05 CET 2017
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
www/manager6/dc/UserView.js | 55 +--------------------------------------------
1 file changed, 1 insertion(+), 54 deletions(-)
diff --git a/www/manager6/dc/UserView.js b/www/manager6/dc/UserView.js
index 740465f4..1fc8a2d2 100644
--- a/www/manager6/dc/UserView.js
+++ b/www/manager6/dc/UserView.js
@@ -1,56 +1,3 @@
-Ext.define('PVE.window.PasswordEdit', {
- extend: 'Proxmox.window.Edit',
-
- initComponent : function() {
- var me = this;
-
- if (!me.userid) {
- throw "no userid specified";
- }
-
- var verifypw;
- var pwfield;
-
- var validate_pw = function() {
- if (verifypw.getValue() !== pwfield.getValue()) {
- return gettext("Passwords does not match");
- }
- return true;
- };
-
- verifypw = Ext.createWidget('textfield', {
- inputType: 'password',
- fieldLabel: gettext('Confirm password'),
- name: 'verifypassword',
- submitValue: false,
- validator: validate_pw
- });
-
- pwfield = Ext.createWidget('textfield', {
- inputType: 'password',
- fieldLabel: gettext('Password'),
- minLength: 5,
- name: 'password',
- validator: validate_pw
- });
-
- Ext.apply(me, {
- subject: gettext('Password'),
- url: '/api2/extjs/access/password',
- items: [
- pwfield, verifypw,
- {
- xtype: 'hiddenfield',
- name: 'userid',
- value: me.userid
- }
- ]
- });
-
- me.callParent();
- }
-});
-
Ext.define('PVE.dc.UserView', {
extend: 'Ext.grid.GridPanel',
@@ -140,7 +87,7 @@ Ext.define('PVE.dc.UserView', {
disabled: true,
selModel: sm,
handler: function(btn, event, rec) {
- var win = Ext.create('PVE.window.PasswordEdit',{
+ var win = Ext.create('Proxmox.window.PasswordEdit', {
userid: rec.data.userid
});
win.on('destroy', reload);
--
2.11.0
More information about the pve-devel
mailing list