DataObjects/pman.links.ini
[Pman.Core] / Pman.Dialog.PersonEditor.js
index 21eb8a5..9f714b2 100644 (file)
@@ -81,8 +81,8 @@ Pman.Dialog.PersonEditor.prototype = {
                 actioncomplete: function(f, act) {
                     _this.dialog.el.unmask();
                     if (act.type == 'load') {
+                        
                         _this.data = act.result.data;
-                         
                     }
                     
                                 
@@ -90,6 +90,9 @@ Pman.Dialog.PersonEditor.prototype = {
                         var data = _this.data;
                         // we dont have  a form where company name is sent in - and is editable..
                         //this.form.findField('office_id')
+                        if(!data.countries && _this.form.findField('countries')){
+                            _this.form.findField('countries').setValue();// set empty array by default...
+                        }
                         
                         if (_this.form.findField('company_id') && _this.form.findField('company_id').setFromData) {
                             _this.form.findField('company_id').setFromData( data.company_id ? {
@@ -140,6 +143,8 @@ Pman.Dialog.PersonEditor.prototype = {
                             }
 
                         }
+                        
+                        
                         return;
                     } 
                     
@@ -455,12 +460,12 @@ Pman.Dialog.PersonEditor.prototype = {
                 xtype : 'TextField',
                 width : 300
             },
-            country : {
+            countries : {
                 xtype: 'ComboBoxArray',
                 xns: Roo.form,
                 fieldLabel : 'Country',
                 hiddenName : 'countries',
-                name : 'country_name',
+                name : 'countries_name',
                 width : 300,
                 combo : {
                     xtype: 'ComboBox',