Merge branch 'master' of http://git.roojs.com:8081/Pman.Core
[Pman.Core] / Pman.Dialog.PersonEditor.js
index 7461c0d..8f32832 100644 (file)
@@ -551,7 +551,7 @@ Pman.Dialog.PersonEditor.prototype = {
             return;
             
         }
-        if (!this.form.findField('company_id').getValue()) {
+        if (this.form.findField('company_id') && !this.form.findField('company_id').getValue()) {
             Ext.MessageBox.alert("Error", "Select a Company");
             return;
         }
@@ -641,8 +641,7 @@ Pman.Dialog.PersonEditor.prototype = {
     saveBulk: function() {
         // similar action to SendIntro
         // we build a fake list of data..
-        if (this.form.findField('company_id') && 
-                !this.form.findField('company_id').getValue()) {
+        if (!this.form.findField('company_id').getValue()) {
             Roo.MessageBox.alert("Error", "Select the Company Name");
             return;
         }
@@ -721,7 +720,7 @@ Pman.Dialog.PersonEditor.prototype = {
              
             var c = ar[i];
             i++;
-            Pman.request({
+            new Pman.Request({
                 url : baseURL+'/Core/SendIntro.html',
                 method : 'POST',
                 params: c,