1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.XtupleTerms = {
12 show : function(data, cb)
20 this.dialog.show(this.data._el);
23 this.form.setValues(data);
24 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
32 this.dialog = Roo.factory({
35 xtype : 'LayoutRegion',
41 title : "Create / Edit Terms",
42 xtype : 'LayoutDialog',
55 click : function (_self, e)
67 click : function (_self, e)
73 _this.form.doAction("submit");
83 xtype : 'ContentPanel',
88 url : baseURL + '/Roo/cntct.php',
91 style : 'margin:10px;',
94 actioncomplete : function(_self,action)
96 if (action.type == 'setdata') {
98 this.load({ method: 'GET', params: { _id : _this.data.id}});
104 if (action.type == 'load') {
107 if (action.type =='submit') {
111 if (_this.callback) {
112 _this.form.setValues(action.result.data);
113 _this.callback.call(_this, _this.form.getValues());
119 rendered : function (form)
129 style : 'width:420px',
134 fieldLabel : 'First Name',
139 name : 'cntct_first_name'
143 fieldLabel : 'Last Name',
147 name : 'cntct_last_name'
151 fieldLabel : 'Phone',
153 regex : /^[0-9 +-]+$/,
162 regex : /^[0-9 +-]+$/,
165 name : 'cntct_phone2'
170 fieldLabel : 'Email',
179 fieldLabel : 'Password',
181 inputType : 'password',
188 fieldLabel : 'Confirm PW',
190 inputType : 'password',
198 fieldLabel : 'Active',
203 name : 'cntct_active'
211 style : 'width:420px',
217 fieldLabel : 'Line 1',
222 name : 'cntct_addr_id_addr_line1'
226 fieldLabel : 'Line 2',
230 name : 'cntct_addr_id_addr_line2'
234 fieldLabel : 'Line 3',
238 name : 'cntct_addr_id_addr_line3'
244 url : baseURL + '/Roo/addr.php',
253 xtype : 'JsonReader',
254 fields : [ "addr_state"],
256 totalProperty : 'total'
261 sortInfo : { direction : 'ASC', field: 'addr_state' },
264 beforeload : function (_self, o){
265 o.params = o.params || {};
267 // o.params.state_country_id_country_name = _this.form.findField('addr_country').getValue();
268 //if (!o.params.state_country_id_country_name.length) {
269 // Roo.MessageBox.alert("Select Country First");
273 o.params._distinct = 'addr_state';
274 o.params._columns = 'addr_state';
275 o.params.limit = 999;
286 triggerAction : 'all',
287 fieldLabel : 'State',
288 selectOnFocus : true,
289 displayField : 'addr_state',
291 hiddenName : 'cntct_addr_id_addr_state',
293 valueField : 'addr_state',
300 name : 'cntct_addr_id_addr_state',
301 qtip : "Select State",
302 queryParam : 'query[addr_state]',
303 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{addr_state}</b> </div>',
304 loadingText : "Searching...",
316 name : 'cntct_addr_id_addr_city'
320 fieldLabel : 'Zip code',
324 name : 'cntct_addr_id_addr_postalcode'
330 url : baseURL + '/Roo/country.php',
339 xtype : 'JsonReader',
340 fields : [{"name":"country_id","type":"int"},"county_name"],
342 totalProperty : 'total'
347 sortInfo : { direction : 'ASC', field: 'country_name' },
350 beforeload : function (_self, o){
351 o.params = o.params || {};
353 o.params.limit = 999;
363 triggerAction : 'all',
364 fieldLabel : 'Country',
365 selectOnFocus : true,
366 displayField : 'country_name',
367 emptyText : "Country",
368 hiddenName : 'cntct_addr_id_addr_country',
370 valueField : 'country_name',
377 name : 'cntct_addr_id_addr_country',
378 qtip : "Select Country",
379 queryParam : 'query[country_name]',
380 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{country_name}</b> </div>',
381 loadingText : "Searching...",
395 name : 'cntct_registrar_type'
407 name : 'cntct_addr_id'