Ext.define('TradePortal.view.account.Window', {
	extend:    'Ext.window.Window',
	alias:     'widget.newuserwindow',
	requires:  ['TradePortal.view.account.WindowForm'],
	title:     'Mobile User',
	autoShow:  true,
	resizable: false,
	center:    true,
	modal:     true,
	width:     400,

	initComponent: function () {
		var me = this;

		me.form = Ext.create('TradePortal.view.account.WindowForm', {
			border:    false,
			bodyStyle: {
				padding: '5px'
			}
		});

		Ext.apply(me, {
			items:        [me.form],
			buttons:      [/*{
				text : 'Cancel',
				handler : me.close,
				scope : me
			},*/ {
				text:   'Create',
				action: 'submit'
			}, {
				text:   'Delete',
				hidden: true,
				action: 'delete'
			}, {
				text:   'Update',
				hidden: true,
				action: 'update'
			}],
			defaultFocus: me.form.down('textfield[name=tpauserID]')
		});

		me.callParent(arguments);
	}
});
