1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.CoreCompanies = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
40 title : "Edit Companies",
44 xtype: 'ContentPanel',
54 actionfailed : function(f, act) {
55 _this.dialog.el.unmask();
57 Pman.standardActionFailed(f,act);
60 actioncomplete : function(f, act) {
61 _this.dialog.el.unmask();
62 //console.log('load completed');
63 // error messages?????
66 if (act.type == 'load') {
68 _this.data = act.result.data;
69 var meth = _this.data.isOwner || !Pman.Login.isOwner() ? 'disable' : 'enable';
72 if (_this.form.findField('comptype')) {
73 _this.form.findField('comptype')[meth]();
81 if (act.type == 'submit') { // only submitted here if we are
85 _this.callback.call(this, act.result.data);
91 rendered : function (form)
103 fieldLabel : 'Company ID (for filing Ref.)',
112 displayField : 'desc',
114 emptyText : "Select Type",
116 hiddenName : 'comptype',
118 name : 'comptype_name',
119 qtip : "Select Company type",
120 selectOnFocus : true,
121 triggerAction : 'all',
126 xtype: 'SimpleStore',
128 data : '[ \'CONSULTANT\', "Consultant" ],[ \'CLIENT\' , "Client" ],[ \'CONTRACTOR\' , "Contractor" ]',
129 fields : '[\'val\', \'desc\']'
136 fieldLabel : 'Company Name',
138 qtip : "Enter Company Name",
145 fieldLabel : 'Phone',
147 qtip : "Enter Phone Number",
156 qtip : "Enter Fax Number",
163 fieldLabel : 'Email',
165 qtip : "Enter Email Address",
172 fieldLabel : 'Address',
174 qtip : "Enter Address",
181 fieldLabel : 'Remarks',
184 qtip : "Enter remarks",
195 fieldLabel : 'Company ID (for filing Ref.)',
204 displayField : 'desc',
206 emptyText : "Select Type",
208 hiddenName : 'comptype',
210 name : 'comptype_name',
211 qtip : "Select Company type",
212 selectOnFocus : true,
213 triggerAction : 'all',
218 xtype: 'SimpleStore',
220 data : '[ \'CONSULTANT\', "Consultant" ],[ \'CLIENT\' , "Client" ],[ \'CONTRACTOR\' , "Contractor" ]',
221 fields : '[\'val\', \'desc\']'
228 fieldLabel : 'Company Name',
230 qtip : "Enter Company Name",
237 fieldLabel : 'Phone',
239 qtip : "Enter Phone Number",
248 qtip : "Enter Fax Number",
255 fieldLabel : 'Email',
257 qtip : "Enter Email Address",
264 fieldLabel : 'Address',
266 qtip : "Enter Address",
273 fieldLabel : 'Remarks',
276 qtip : "Enter remarks",
287 xtype: 'LayoutRegion',
289 alwaysShowTabs : false,