PHP8
[Pman.BAdmin] / Pman.Dialog.BAdminGroups.bjs
1 {
2  "name" : "Pman.Dialog.BAdminGroups",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Dialog.BAdminGroups.bjs",
6  "permname" : "",
7  "modOrder" : "001",
8  "strings" : {
9   "ea4788705e6873b424c65e91c2846b19" : "Cancel",
10   "106eefbc3cdf294434c52c2638ce28df" : "Add / Edit Group",
11   "49ee3087348e8d44e1feda1917443987" : "Name",
12   "c9cc8cce247e49bae79f15173ce97354" : "Save"
13  },
14  "named_strings" : {
15   "display_name_placeholder" : "49ee3087348e8d44e1feda1917443987"
16  },
17  "items" : [
18   {
19    "String cls" : "enable-overflow padding-bottom-trim",
20    "xtype" : "Modal",
21    "$ xns" : "Roo.bootstrap",
22    "String title" : "Add / Edit Group",
23    "items" : [
24     {
25      "listeners" : {
26       "actionfailed" : "function (_self, action)\n{\n    Roo.log(action);\n    Roo.bootstrap.MessageBox.alert('Error', action.result.errorMsg);\n}",
27       "actioncomplete" : "function (_self, action)\n{\n    if(action.type == 'setdata'){\n    _this.dialog.setTitle(\"Create Group\");\n       if(_this.data.id * 1 > 0) {\n            this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});\n            _this.dialog.setTitle(\"Edit Group\");\n        } \n        \n        return;\n    }\n   \n    if (action.type == 'load') {\n        _this.data = action.result.data;\n        \n        if(!_this.data.display_name.length){\n            _this.form.findField('display_name').setValue(_this.data.name);\n        }\n        return;\n    }\n    \n    \n    if (action.type == 'submit') {\n    \n        _this.dialog.hide();\n       \n        if (_this.callback) {\n            _this.callback.call(this, action.result.data);\n        }\n        \n        return; \n    }\n}",
28       "render" : "function (_self)\n{\n    _this.form = _self;\n}"
29      },
30      "$ url" : "baseURL + '/Roo/Core_group' ",
31      "xtype" : "Form",
32      "String labelAlign" : "top",
33      "$ xns" : "Roo.bootstrap",
34      "items" : [
35       {
36        "String name" : "display_name",
37        "xtype" : "Input",
38        "string placeholder" : "Name",
39        "$ xns" : "Roo.bootstrap"
40       },
41       {
42        "String name" : "id",
43        "xtype" : "Input",
44        "String inputType" : "hidden",
45        "$ xns" : "Roo.bootstrap"
46       }
47      ]
48     },
49     {
50      "listeners" : {
51       "click" : "function (_self, e)\n{\n    _this.dialog.hide(); \n}"
52      },
53      "xtype" : "Button",
54      "$ xns" : "Roo.bootstrap",
55      "String html" : "Cancel",
56      "* prop" : "buttons[]"
57     },
58     {
59      "listeners" : {
60       "click" : "function (_self, e)\n{\n    if(!_this.form.isValid()){\n        Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');\n        return;\n    }\n    \n    _this.form.doAction(\"submit\");\n    \n    return;\n}"
61      },
62      "String weight" : "primary",
63      "xtype" : "Button",
64      "$ xns" : "Roo.bootstrap",
65      "String html" : "Save",
66      "* prop" : "buttons[]"
67     }
68    ]
69   }
70  ]
71 }