]> git.proxmox.com Git - proxmox-widget-toolkit.git/blob - window/PasswordEdit.js
fix #1784: allow to set UTC as Timezone
[proxmox-widget-toolkit.git] / window / PasswordEdit.js
1 Ext.define('Proxmox.window.PasswordEdit', {
2 extend: 'Proxmox.window.Edit',
3 alias: 'proxmoxWindowPasswordEdit',
4
5 subject: gettext('Password'),
6
7 url: '/api2/extjs/access/password',
8
9 fieldDefaults: {
10 labelWidth: 120
11 },
12
13 items: [
14 {
15 xtype: 'textfield',
16 inputType: 'password',
17 fieldLabel: gettext('Password'),
18 minLength: 5,
19 allowBlank: false,
20 name: 'password',
21 listeners: {
22 change: function(field){
23 field.next().validate();
24 },
25 blur: function(field){
26 field.next().validate();
27 }
28 }
29 },
30 {
31 xtype: 'textfield',
32 inputType: 'password',
33 fieldLabel: gettext('Confirm password'),
34 name: 'verifypassword',
35 allowBlank: false,
36 vtype: 'password',
37 initialPassField: 'password',
38 submitValue: false
39 },
40 {
41 xtype: 'hiddenfield',
42 name: 'userid'
43 }
44 ],
45
46 initComponent : function() {
47 var me = this;
48
49 if (!me.userid) {
50 throw "no userid specified";
51 }
52
53 me.callParent();
54 me.down('[name=userid]').setValue(me.userid);
55 }
56 });