Bill.reg.Login = Ext.extend(Bill.reg.FieldSet, {
    initComponent: function() {
        var uniqueId = Ext.id(); 
        Ext.apply(this, {
            title: 'Выберите логин и пароль доступа в личный кабинет:',
            monitorValid: true,
            defaults: {
                inputType: 'password',
                allowBlank: false
            },
            defaultType: 'textfield', 
            items: [{
                fieldLabel: 'Логин',
                name: 'login',
                allowBlank: false
            },{
		minLength: 6,
                fieldLabel: 'Пароль',
                name: 'password',
                id: uniqueId,
                allowBlank: false,
                inputType: 'password'
            },{
                fieldLabel: 'Повтор пароля',
                name: 'passwordCfrm',
                vtype: 'password',
                initialPassField: uniqueId,
                allowBlank: false,
                inputType: 'password'
            }]
        });
        Bill.reg.Login.superclass.initComponent.apply(this, arguments);
        this.login = this.items.itemAt(0);
        this.pass = this.items.itemAt(1);      
        this.passCfrm = this.items.itemAt(2);
    },    

    clear: function() { 
        this.oldPass.reset(); 
        this.newPass.reset();
        this.newPassRepet.reset();
    },

    getValue: function() {
        var login = this.login.getValue();
        var pass = this.newPass.getValue();
        return {login: login, pass: pass};
    }
});
Ext.reg('bill-reg-login', Bill.reg.Login);


