fix company id findfield
authorAlan Knowles <alan@roojs.com>
Mon, 7 Jun 2021 01:47:25 +0000 (09:47 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 7 Jun 2021 01:47:25 +0000 (09:47 +0800)
Pman.Dialog.AdminPerson.bjs
Pman.Dialog.AdminPerson.js
Report/SendEventErrors.php

index f42f1c2..9cd317c 100644 (file)
      "items" : [
       {
        "listeners" : {
-        "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        _this.dialog.layout.getRegion('center').showPanel(0);\n       //_this.dialog.el.mask(\"Loading\");\n       if ( _this.data.id* 1 > 0) { \n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n            return;\n        }\n        this.form.findField('company_id').setValue(Pman.Login.authUser.company_id);\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
+        "|actioncomplete" : "function(_self,action)\n{\n    if (action.type == 'setdata') {\n        _this.dialog.layout.getRegion('center').showPanel(0);\n       //_this.dialog.el.mask(\"Loading\");\n       if ( _this.data.id* 1 > 0) { \n            this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n            return;\n        }\n        this.findField('company_id').setValue(Pman.Login.authUser.company_id);\n       return;\n    }\n    if (action.type == 'load') {\n        _this.dialog.el.unmask();\n        return;\n    }\n    if (action.type =='submit') {\n    \n        _this.dialog.el.unmask();\n        _this.dialog.hide();\n    \n         if (_this.callback) {\n            _this.callback.call(_this, _this.form.getValues());\n         }\n         _this.form.reset();\n         return;\n    }\n}\n",
         "|rendered" : "function (form)\n{\n    _this.form= form;\n}\n"
        },
        "$ url" : "baseURL + '/Roo/core_person'",
-       "xtype" : "Form",
        "method" : "POST",
+       "xtype" : "Form",
        "style" : "margin:10px;",
        "$ xns" : "Roo.form",
        "Number labelWidth" : 120,
            "items" : [
             {
              "$ url" : "baseURL + '/Roo/core_office'",
-             "xtype" : "HttpProxy",
              "method" : "GET",
+             "xtype" : "HttpProxy",
              "$ xns" : "Roo.data",
              "* prop" : "proxy"
             },
      "listeners" : {
       "|activate" : "function() {\n    _this.panel = this;\n \n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
      },
+     "background" : true,
      "region" : "center",
      "fitToframe" : true,
-     "background" : true,
      "title" : "System Settings",
      "xtype" : "GridPanel",
      "fitContainer" : true,
          "items" : [
           {
            "$ url" : "baseURL + '/Roo/core_person_settings'",
-           "method" : "GET",
            "xtype" : "HttpProxy",
+           "method" : "GET",
            "$ xns" : "Roo.data",
            "* prop" : "proxy"
           },
index 9f43bbd..1b5cc68 100644 (file)
@@ -54,7 +54,7 @@ Pman.Dialog.AdminPerson = {
 
   this.callback = cb;
   this.data = data;
-  this.dialog.show(this.data._el);
+  this.dialog.show.apply(this.dialog,  Array.prototype.slice.call(arguments).slice(2));
   if (this.form) {
    this.form.reset();
    this.form.setValues(data);
@@ -161,7 +161,7 @@ Pman.Dialog.AdminPerson = {
                       this.load({ method: 'GET', params: { '_id' : _this.data.id }});
                       return;
                   }
-                  this.form.findField('company_id').setValue(Pman.Login.authUser.company_id);
+                  this.findField('company_id').setValue(Pman.Login.authUser.company_id);
                  return;
               }
               if (action.type == 'load') {
index abf0b42..d2aa0f8 100644 (file)
@@ -210,7 +210,7 @@ class Pman_Admin_Report_SendEventErrors extends Pman_Roo
         
         
         $content = array(
-            'template'      => 'EVENT_ERRORS_REPORT',
+            'template'      => 'FILE_REPORTING_EMAIL',
             'rcpts_group'   => $this->opts['group'],
             'errors'        => $errors,
             'subject'       => $subject