/** 
 * Copyright Intermesh
 * 
 * This file is part of Group-Office. You should have received a copy of the
 * Group-Office license along with Group-Office. See the file /LICENSE.TXT
 * 
 * If you have questions write an e-mail to info@intermesh.nl
 * 
 * @version $Id: ExpenseBudgetDialog.js 19592 2014-08-28 13:22:19Z wvbeusekom $
 * @copyright Copyright Intermesh
 * @author Merijn Schering <mschering@intermesh.nl>
 */

GO.projects2.ExpenseBudgetDialog = Ext.extend(GO.dialog.TabbedFormDialog, {

	initComponent: function() {

		Ext.apply(this, {
			titleField: 'description',
			goDialogId: 'expenseBudget',
			title: GO.projects2.lang.expenseBudget,
			height: 350,
			formControllerUrl: 'projects2/expenseBudget'
		});

		GO.projects2.ExpenseBudgetDialog.superclass.initComponent.call(this);
	},
	buildForm: function() {

		this.propertiesPanel = new Ext.Panel({
			title: GO.lang['strProperties'],
			cls: 'go-form-panel',
			layout: 'form',
			items: [
			{
				xtype: 'hidden',
				name: 'project_id'
			},
			{
				xtype: 'plainfield',
				name: 'id',
				fieldLabel: 'ID'
			},
			{
				xtype: 'textarea',
				name: 'description',
				width: 300,
				height: 50,
				anchor: '100%',
				maxLength: 255,
				allowBlank: false,
				fieldLabel: GO.lang['strDescription']
			},
			this.nettField = new GO.form.NumberField({
				fieldLabel: GO.projects2.lang.nett,
				name: 'nett'
			}),
			{
				xtype: 'textarea',
				name: 'comments',
				width: 300,
				height: 100,
				anchor: '100%',
				maxLength: 1024,
				allowBlank: true,
				fieldLabel: GO.projects2.lang['comments']
			},
			{
				xtype: 'textfield',
				name: 'id_number',
				width: 300,
				anchor: '100%',
				maxLength: 1024,
				allowBlank: true,
				fieldLabel: GO.projects2.lang['idNumber'],
				emptyText: GO.projects2.lang['emptyForID']
			}
			]
		});

		this.addPanel(this.propertiesPanel);
	}

});