config/SyncView.js \
config/DataStoreConfig.js \
window/UserEdit.js \
+ window/UserPassword.js \
window/RemoteEdit.js \
window/SyncJobEdit.js \
window/ACLEdit.js \
}).show();
},
+ setPassword: function() {
+ let me = this;
+ let view = me.getView();
+ let selection = view.getSelection();
+
+ if (selection.length < 1) return;
+
+ Ext.create('PBS.window.UserPassword', {
+ url: '/api2/extjs/access/users/' + selection[0].data.userid,
+ }).show();
+ },
+
renderUsername: function(userid) {
return Ext.String.htmlEncode(userid.match(/^(.+)@([^@]+)$/)[1]);
},
handler: 'editUser',
disabled: true,
},
+ {
+ xtype: 'proxmoxButton',
+ text: gettext('Password'),
+ handler: 'setPassword',
+ disabled: true,
+ },
{
xtype: 'proxmoxStdRemoveButton',
baseurl: '/access/users/',
--- /dev/null
+Ext.define('PBS.window.UserPassword', {
+ extend: 'Proxmox.window.Edit',
+ alias: 'widget.pbsUserPassword',
+
+ userid: undefined,
+
+ method: 'PUT',
+
+ subject: gettext('User Password'),
+
+ fieldDefaults: { labelWidth: 120 },
+
+ items: [
+ {
+ xtype: 'textfield',
+ inputType: 'password',
+ fieldLabel: gettext('Password'),
+ minLength: 5,
+ allowBlank: false,
+ name: 'password',
+ listeners: {
+ change: function(field) {
+ field.next().validate();
+ },
+ blur: function(field) {
+ field.next().validate();
+ },
+ },
+ },
+ {
+ xtype: 'textfield',
+ inputType: 'password',
+ fieldLabel: gettext('Confirm password'),
+ name: 'verifypassword',
+ vtype: 'password',
+ initialPassField: 'password',
+ allowBlank: false,
+ submitValue: false,
+ },
+ ],
+});