Ext.define('TradePortal.view.pricebook.Window', {
	extend : 'Ext.window.Window',
	alias : 'widget.pricebookwindow',
	requires : [ 'TradePortal.view.pricebook.WindowForm' ],
	title : 'Request Price Book Changes',
	autoShow : true,
	resizable : false,
	center : true,
	modal : true,
	width : 400,

	initComponent : function() {
		var me = this;

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

		Ext.apply(me, {
			items : [ me.form ],
			buttons : [ {
				text : 'Cancel',
				handler : me.close,
				scope : me
			}, {
				text : 'Submit Request',
				action : 'submit'
			} ],
			defaultFocus : me.form.down('textfield[name=deliveryFormat]')
		});

		me.callParent(arguments);
	}
});
