Pman.Gnumeric.js
[Pman.Core] / Pman.Dialog.PersonEditor.js
index 9aa1827..2cee8c0 100644 (file)
@@ -174,13 +174,14 @@ Pman.Dialog.PersonEditor.prototype = {
             if (typeof(il) != 'object') {
                 // no permission for Core offices.. - can not show department...
                 if (il == 'office_id_name' && !Pman.hasPerm('Core.Offices','S')) {
-                    return true;;
+                    return true;
                 }
                 
                 _this.form.addxtype(_this.itemTypes[il]);
                 return true;
             }
             _this.form.addxtype(Roo.apply(il, _this.itemTypes[il.name]));
+            return true;
             
         });
         var ef = this.dialog.getLayout().getEl().createChild({tag: 'div'});
@@ -234,10 +235,10 @@ Pman.Dialog.PersonEditor.prototype = {
                       // load using HTTP
                     proxy:{
                         xtype:  'HttpProxy',
-                        url: baseURL + '/Roo/Companies.html',
+                        url: baseURL + '/Roo/core_company',
                         method: 'GET'
                     },
-                    reader: Pman.Readers.Companies,
+                    reader: new Roo.data.JsonReader({}, []), //Pman.Readers.Companies,
                     listeners : {
                         beforeload : function(st,o)
                         {
@@ -263,7 +264,7 @@ Pman.Dialog.PersonEditor.prototype = {
                         '<b>{name}</b> {address}',
                     '</div>'
                 ),
-                queryParam: 'query[name]',
+                queryParam: 'search[name_starts]',
                 loadingText: "Searching...",
                 listWidth: 400,
                
@@ -307,10 +308,10 @@ Pman.Dialog.PersonEditor.prototype = {
                       // load using HTTP
                     proxy: {
                         xtype : 'HttpProxy',
-                        url: baseURL + '/Roo/Office.html',
+                        url: baseURL + '/Roo/Core_office.html',
                         method: 'GET'
                     },
-                    reader: Pman.Readers.Office,
+                    reader: new Roo.data.JsonReader({}, []), //Pman.Readers.Office,
                     listeners : {
                         beforeload : function(st,o)
                         {
@@ -516,6 +517,25 @@ Pman.Dialog.PersonEditor.prototype = {
                 xtype : 'TextField',
                 width : 220
             },
+            secure_password : {
+                name : 'secure_password',
+                fieldLabel : "Secure passwords",
+                inputValue : 1,
+                valueOff : 0,
+                checked : true,
+                xtype : 'Checkbox',
+                xns : Roo.form,
+                width : 220,
+                listeners : {
+                    check : function (_self, checked) {
+                        this.form.findField('passwd1').insecure = false;
+                        
+                        if(!checked){
+                            this.form.findField('passwd1').insecure = true;
+                        }
+                    }
+                }
+            },
             project_id_fs : {
                 xtype : 'FieldSetEx',
                 name: 'project_id_fs',
@@ -633,7 +653,7 @@ Pman.Dialog.PersonEditor.prototype = {
         }
         this.dialog.el.mask("Sending");
         this.form.doAction('submit', {
-            url: baseURL + '/Roo/Person.html',
+            url: baseURL + '/Roo/core_person',
             method: 'POST',
             params: {
                 _id: this._id ,
@@ -656,7 +676,7 @@ Pman.Dialog.PersonEditor.prototype = {
             this.dialog.show();
             this.dialog.el.mask("Loading");
             this.form.doAction('load', {
-                url: baseURL + '/Roo/Person.html',
+                url: baseURL + '/Roo/core_person',
                 method: 'GET',
                 params: {
                     _id: this._id ,