Pman.Dialog.VerifyAccess.bjs
[Pman.Core] / Pman.Dialog.VerifyAccess.bjs
index c2cca07..89a7880 100644 (file)
@@ -8,8 +8,8 @@
  "strings" : {
   "e2c9d024b79dfb48b42a7807206c6aed" : "Verify New IP Access",
   "d41d8cd98f00b204e9800998ecf8427e" : "",
-  "7c5ba892645af8d7dba520e3978c726f" : "Director",
   "f6039d44b29456b20f8f373155ae4973" : "Username",
+  "004bf6c9a40003140292e97330236c53" : "Action",
   "dfb790522fdea3859af206d32916fe77" : "User Agent",
   "d71940f24ee38ee09f6e06b908480bcf" : "Resend email",
   "14cf5e829f5cb6fbf8cb54f7c5ff4ca9" : "Start the application process   "
@@ -17,7 +17,7 @@
  "items" : [
   {
    "listeners" : {
-    "show" : "function (_self)\n{\n    var path = window.location.pathname.split('/');\n    \n    var authorized_key = path.pop();\n    \n    var id = path.pop();\n    \n    new Pman.Request({\n        url: baseURL + '/Core/VerifyAccess',\n        method : 'POST',\n        mask : 'Loading...',\n        params : {\n            id : id,\n            authorized_key : authorized_key,\n            _to_data : 1\n        }, \n        success : function(res) {\n            _this.form.setValues(res.data);\n            return;\n        },\n        failure: function(res) {\n            \n            _this.dialog.hide();\n            \n            Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);\n            \n            return;\n       }\n    });\n}"
+    "show" : "function (_self)\n{\n    var path = window.location.pathname.split('/');\n    \n    var authorized_key = path.pop();\n    \n    var id = path.pop();\n    \n    new Pman.Request({\n        url: baseURL + '/Core/VerifyAccess',\n        method : 'POST',\n        mask : 'Loading...',\n        params : {\n            id : id,\n            authorized_key : authorized_key,\n            _to_data : 1\n        }, \n        success : function(res) {\n        \n            _this.data = res.data;\n            \n            _this.form.setValues(_this.data);\n            \n            return;\n        },\n        failure: function(res) {\n            \n            _this.dialog.hide();\n            \n            Roo.bootstrap.MessageBox.alert('Error', res.errorMsg);\n            \n            return;\n       }\n    });\n}"
    },
    "String cls" : "enable-overflow",
    "Boolean allow_close" : false,
@@ -28,7 +28,7 @@
     {
      "listeners" : {
       "actionfailed" : "function (_self, action)\n{\n    _this.dialog.el.unmask();\n    Roo.log(\"action failed\");\n    Roo.log(action);\n  \n    if(!action.result.errorMsg){\n        Roo.bootstrap.MessageBox.alert(\"Error\", \"Please contact system adminisrator\");\n    }\n   \n    var msg = action.result.errorMsg;\n   \n    if(msg.length >= 200){\n        msg = msg.substring(0,199) + '...'\n    }\n    \n    Roo.bootstrap.MessageBox.alert(\"Error\", msg);\n}",
-      "actioncomplete" : "function (_self, action)\n{\n    if (action.type == 'setdata') {\n        \n        return;\n    }\n    if (action.type == 'load') {\n        \n        return;\n    }\n    if (action.type =='submit') {\n        \n        _this.dialog.hide();\n        \n        Roo.get(document.body).mask('Start your Application');\n        \n        setTimeout(function() {\n            window.location.href = baseURL;\n        }, 500); \n        \n        return;\n    }\n    \n}",
+      "actioncomplete" : "function (_self, action)\n{\n    if (action.type == 'setdata') {\n        \n        return;\n    }\n    if (action.type == 'load') {\n        \n        if(_this.data.status * 1 == 0){\n            _this.form.findField('status').reset();\n        }\n        \n        return;\n    }\n    if (action.type =='submit') {\n        \n        _this.dialog.hide();\n        \n        return;\n    }\n    \n}",
       "render" : "function (_self,e)\n{\n    _this.form = _self;\n    \n}"
      },
      "$ string url" : "baseURL + '/Core/VerifyAccess'",
@@ -59,9 +59,6 @@
        ]
       },
       {
-       "listeners" : {
-        "render" : "function (_self)\n{\n    _this.row_pwd_label = _self;\n}"
-       },
        "xtype" : "Row",
        "$ xns" : "Roo.bootstrap",
        "items" : [
            "xtype" : "TextArea",
            "string fieldLabel" : "User Agent",
            "Number rows" : 3,
-           "$ xns" : "Roo.bootstrap"
+           "$ xns" : "Roo.bootstrap",
+           "String style" : "margin-bottom: 15px;"
           }
          ]
         }
        ]
       },
       {
-       "listeners" : {
-        "render" : "function (_self)\n{\n    _this.row_pwd_label = _self;\n}"
-       },
        "xtype" : "Row",
        "$ xns" : "Roo.bootstrap",
        "items" : [
          "$ xns" : "Roo.bootstrap",
          "items" : [
           {
+           "listeners" : {
+            "select" : "function (combo, record, index)\n{\n    \n}"
+           },
            "Boolean allowBlank" : false,
-           "String name" : "_existing_director_name",
-           "Number minChars" : 2,
-           "Number md" : 12,
-           "String valueField" : "id",
-           "String queryParam" : "query[name]",
-           "Boolean typeAhead" : true,
+           "String name" : "status_name",
+           "String mode" : "local",
+           "String valueField" : "code",
+           "Boolean editable" : false,
            "xtype" : "ComboBox",
            "String triggerAction" : "all",
-           "Boolean editable" : true,
-           "Boolean alwaysQuery" : true,
+           "string fieldLabel" : "Action",
            "$ xns" : "Roo.bootstrap",
-           "String/Roo.Template tpl" : "<div class=\"roo-select2-result\">{fullname}</div>",
-           "String fieldLabel" : "Director",
-           "String hiddenName" : "_existing_director",
-           "String displayField" : "fullname",
-           "Boolean forceSelection" : true,
-           "String indicatorpos" : "right",
+           "String hiddenName" : "status",
+           "String displayField" : "value",
            "items" : [
             {
-             "listeners" : {
-              "beforeload" : "function (_self, o)\n{\n    o.params = o.params || {};\n    \n    o.params._with_fullname = 1;\n    \n    var parent = _this.form.findField('parent_company_id').getValue() * 1;\n    \n    o.params._hide_existing = 1;\n    \n    o.params._parent_company_id = parent;\n    \n    if (Roo.select('main').first().dom.className.indexOf('trust') >= 0) {\n        \n        o.params._find_person_type = 'trustee';\n    }\n    \n}"
-             },
-             "xtype" : "Store",
-             "boolean remoteSort" : true,
+             "$ string data" : "[\n    ['1', 'Approve'],\n    ['-1', 'Reject']\n] ",
+             "xtype" : "SimpleStore",
              "$ xns" : "Roo.data",
-             "$ sortInfo" : "{field:\"firstname\",direction:\"ASC\"}",
-             "* prop" : "store",
-             "items" : [
-              {
-               "xtype" : "HttpProxy",
-               "$ xns" : "Roo.data",
-               "String method" : "GET",
-               "* prop" : "proxy",
-               "$ String url" : "baseURL+'/Roo/Coba_person'"
-              },
-              {
-               "xtype" : "JsonReader",
-               "$ xns" : "Roo.data",
-               "$ fields" : "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'honor',\n        'type': 'string'\n    },\n    {\n        'name': 'firstname',\n        'type': 'string'\n    },\n    {\n        'name': 'middlename',\n        'type': 'string'\n    },\n    {\n        'name': 'lastname',\n        'type': 'string'\n    },\n    {\n        'name': 'fullname',\n        'type': 'string'\n    }\n]",
-               "* prop" : "reader"
-              }
-             ]
+             "$ fields" : "[ 'code', 'value' ]",
+             "* prop" : "store"
             }
            ]
           }
     },
     {
      "listeners" : {
-      "render" : "function (_self)\n{\n    _this.btn_ok = _self;\n}",
       "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        return;\n    }\n    \n    var p1 = _this.form.findField('password').getValue();\n    var p2 = _this.form.findField('password1').getValue();\n    \n    if (p1 != p2) {\n        _this.form.findField('password1').markInvalid('Password do not match');\n        return;\n    }\n    \n    _this.dialog.el.mask('Sending...');\n    _this.form.doAction('submit');\n    \n}"
      },
      "String weight" : "primary",