"name" : "Pman.Dialog.BAdminAddToGroup",
"parent" : "",
"title" : "",
- "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Dialog.BAdminAddToGroup.bjs",
+ "path" : "/home/benny/gitlive/web.coba/Pman.BAdmin/Pman.Dialog.BAdminAddToGroup.bjs",
"permname" : "",
"modOrder" : "001",
"strings" : {
+ "34ec78fcc91ffb1e54cd85e4a0924332" : "add",
"05b763f7d24f32575493b3c23f299b0e" : "Add To Group",
- "03937134cedab9078be39a77ee3a48a0" : "Group",
"ea4788705e6873b424c65e91c2846b19" : "Cancel",
+ "df1eb600b1e8e619756781831c41e346" : "Please select a group",
"c9cc8cce247e49bae79f15173ce97354" : "Save"
},
"items" : [
"items" : [
{
"listeners" : {
- "actionfailed" : "function (_self, action)\n{\n Roo.log(action);\n Roo.bootstrap.MessageBox.alert(action.result.errorMsg);\n}",
- "actioncomplete" : "function (_self, action)\n{\n if(action.type == 'setdata'){\n \n if(_this.data.id * 1 > 0) {\n this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});\n } \n \n return;\n }\n \n if (action.type == 'load') {\n _this.data = action.result.data;\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}",
+ "actionfailed" : "function (_self, action)\n{\n Roo.log(action);\n \n var err = 'Please fill in all the request fields';\n \n if (typeof(action) != 'undefined' && (action.failureType == 'server' || action.failureType == 'load')) { \n err = action.result.errorMsg;\n }\n \n Roo.bootstrap.MessageBox.alert('Error', err);\n\n}",
+ "actioncomplete" : "function (_self, action)\n{\n if(action.type == 'setdata'){\n \n _this.form.clearInvalid();\n \n return;\n }\n \n if (action.type == 'load') {\n _this.data = action.result.data;\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}",
"render" : "function (_self)\n{\n _this.form = _self;\n}"
},
- "$ url" : "baseURL + '/Roo/Core_group_member' ",
+ "$ url" : "baseURL + '/Roo/Core_group'",
"xtype" : "Form",
"String labelAlign" : "top",
"$ xns" : "Roo.bootstrap",
"Number pageSize" : 25,
"Boolean allowBlank" : false,
"Number minChars" : 2,
- "String name" : "employ_plan_name",
- "String valueField" : "name",
+ "String name" : "group_id_name",
+ "String valueField" : "id",
"String queryParam" : "query[name_starts]",
"Boolean typeAhead" : true,
"xtype" : "ComboBox",
"String triggerAction" : "all",
"Boolean editable" : false,
"Boolean alwaysQuery" : true,
+ "string placeholder" : "Please select a group",
"$ xns" : "Roo.bootstrap",
- "String/Roo.Template tpl" : "<div class=\"roo-select2-result\"><b>{display_name_t}</b></div>",
- "String fieldLabel" : "Group",
- "String hiddenName" : "employ_plan",
+ "String/Roo.Template tpl" : "<div class=\"roo-select2-result\"><b>{name}</b></div>",
+ "String hiddenName" : "group_id",
"String displayField" : "name",
"items" : [
{
"listeners" : {
- "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n o.params.active = 1;\n o.params.etype = 'Hydra.Plans';\n}"
+ "beforeload" : "function (_self, o)\n{\n o.params = o.params || {};\n o.params.type = 0;\n}"
},
"xtype" : "Store",
"boolean remoteSort" : true,
"$ xns" : "Roo.data",
- "$ sortInfo" : "{field:\"id\",direction:\"ASC\"}",
+ "$ sortInfo" : "{ field: 'name', direction: 'ASC'} ",
"* prop" : "store",
"items" : [
{
"$ xns" : "Roo.data",
"String method" : "GET",
"* prop" : "proxy",
- "$ String url" : "baseURL+'/Roo/Core_enum'"
+ "$ String url" : "baseURL+'/Roo/Core_group'"
},
{
"xtype" : "JsonReader",
+ "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n }\n]",
"$ xns" : "Roo.data",
- "$ fields" : "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'display_name',\n 'type': 'string' \n },\n {\n 'name': 'display_name_t',\n 'type': 'string' \n }\n]",
"* prop" : "reader"
}
]
}
]
},
+ {
+ "String name" : "user_ids",
+ "xtype" : "Input",
+ "String inputType" : "hidden",
+ "$ xns" : "Roo.bootstrap"
+ },
+ {
+ "String name" : "_action",
+ "xtype" : "Input",
+ "String inputType" : "hidden",
+ "$ xns" : "Roo.bootstrap",
+ "string value" : "add"
+ },
{
"String name" : "id",
"xtype" : "Input",
},
{
"listeners" : {
- "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 var myID = _this.form.findField('id').getValue() * 1;\n var myName = _this.form.findField('name').getValue();\n\n if (_this.form.findField('company_id') && !_this.form.findField('company_id').getValue()) {\n Roo.bootstrap.MessageBox.alert(\"Error\", \"Select a Company\");\n return;\n }\n \n // validate password match (only needed if we are not using generated one..\n if (_this.form.findField('passwd1') \n && _this.form.findField('passwd1').getValue().length > 0 \n && _this.form.findField('passwd1').inputEl().dom.type == \"password\") {\n \n var p1 = _this.form.findField('passwd1').getValue();\n var p2 = _this.form.findField('passwd2').getValue();\n \n \n if (Pman.Login.authUser.id < 0 && !p1.length) {\n Roo.bootstrap.MessageBox.alert(\"Error\", \"You must create a password for the admin account\");\n return;\n }\n \n \n if (p1.length || p2.length) {\n if (p1 != p2) {\n Roo.bootstrap.MessageBox.alert(\"Error\", \"Passwords do not match\");\n return;\n }\n }\n \n \n }\n _this.form.doAction(\"submit\");\n\n \n\n return;\n}"
+ "click" : "function (_self, e)\n{\n _this.form.doAction(\"submit\");\n\n return;\n}"
},
"String weight" : "primary",
"xtype" : "Button",