{
 "hidden": false,
 "children": [{
  "configs": {"itemId": "module"},
  "expanded": true,
  "children": [
   {
    "configs": {
     "itemId": "window1",
     "dialog": "true",
     "focusControl": "DISPLAY_NAME",
     "defaults": "{\
  width: 360,\
  labelWidth: 120,\
  labelAlign: 'right',\
  margin: '8 0 0 0'\
}",
     "closable": "contextOwner!==undefined",
     "closeAction": "destroy",
     "width": "450",
     "bodyPadding": "2 10 10 10",
     "title": "{#Str.myAccount#}",
     "autoShow": "true",
     "iconCls": "record_icon"
    },
    "expanded": true,
    "children": [
     {
      "configs": {
       "allowBlank": "false",
       "itemId": "USER_NAME",
       "fieldLabel": "* {#Str.username#}",
       "readOnly": "true",
       "selectOnFocus": "true"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     },
     {
      "configs": {
       "allowBlank": "false",
       "itemId": "DISPLAY_NAME",
       "fieldLabel": "* {#Str.displayName#}"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     },
     {
      "configs": {
       "allowBlank": "false",
       "itemId": "PASSWORD",
       "minLength": "6",
       "fieldLabel": "* {#Str.password#}",
       "inputType": "password"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     },
     {
      "configs": {
       "allowBlank": "false",
       "itemId": "RE_PASSWORD",
       "minLength": "6",
       "fieldLabel": "* {#Str.passwordConfirm#}",
       "inputType": "password"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     },
     {
      "configs": {
       "itemId": "EMAIL",
       "vtype": "email",
       "fieldLabel": "@Str.email"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     },
     {
      "configs": {
       "itemId": "USE_LANG",
       "pickList": "[\
  ['auto', 'auto'],\
  ['af', 'af (Afrikaans)'],\
  ['bg', 'bg (български език)'],\
  ['ca', 'ca (català)'],\
  ['cs', 'cs (čeština)'],\
  ['da', 'da (dansk)'],\
  ['de', 'de (Deutsch)'],\
  ['el', 'el (ελληνικά)'],\
  ['en', 'en (American English)'],\
  ['en_AU', 'en_AU (Australian English)'],\
  ['en_GB', 'en_GB (British English)'],\
  ['es', 'es (español)'],\
  ['et', 'et (eesti)'],\
  ['fa', 'fa (فارسی)'],\
  ['fi', 'fi (suomi)'],\
  ['fr', 'fr (français)'],\
  ['fr_CA', 'fr_CA (français canadien)'],\
  ['he', 'he (עברית)'],\
  ['hr', 'hr (hrvatski jezik)'],\
  ['hu', 'hu (magyar)'],\
  ['id', 'id (Bahasa Indonesia)'],\
  ['it', 'it (italiano)'],\
  ['ja', 'ja (日本語)'],\
  ['ko', 'ko (한국어)'],\
  ['lt', 'lt (lietuvių kalba)'],\
  ['lv', 'lv (latviešu valoda)'],\
  ['mk', 'mk (македонски јазик)'],\
  ['nl', 'nl (Nederlands)'],\
  ['no', 'no (Norsk)'],\
  ['no_NN', 'no_NN (Norsk nynorsk)'],\
  ['pl', 'pl (język polski)'],\
  ['pt', 'pt (português)'],\
  ['pt_BR', 'pt_BR (Português do Brasil)'],\
  ['pt_PT', 'pt_PT (Português do Portugal)'],\
  ['ro', 'ro (limba română)'],\
  ['ru', 'ru (Русский)'],\
  ['sk', 'sk (slovenčina)'],\
  ['sl', 'sl (slovenski jezik)'],\
  ['sr', 'sr (Srpska Latinica)'],\
  ['sr_RS', 'sr_RS (српски језик)'],\
  ['sv', 'sv (svenska)'],\
  ['th', 'th (ไทย)'],\
  ['tr', 'tr (Türkçe)'],\
  ['uk', 'uk (українська мова)'],\
  ['vi', 'vi (Tiếng Việt)'],\
  ['zh', 'zh (简体中文)'],\
  ['zh_TW', 'zh_TW (繁體中文)']\
]",
       "fieldLabel": "@Str.language",
       "forceSelection": "true"
      },
      "expanded": false,
      "children": [],
      "type": "combo"
     },
     {
      "configs": {
       "itemId": "LOGIN_TIMES",
       "fieldLabel": "@Str.loginTimes",
       "readOnly": "true"
      },
      "expanded": false,
      "children": [],
      "type": "text"
     }
    ],
    "type": "window",
    "events": {
     "show": "Wb.request({\
  url: 'm?xwl=my/account/get',\
  success: function(resp) {\
    var vals = Wb.decode(resp.responseText).rows[0];\
    Wb.apply(vals, {\
      PASSWORD: '******',\
      RE_PASSWORD: '******'\
    });\
    Wb.setValue(app.window1, vals);\
  }\
});",
     "ok": "if (Wb.verify(win)) {\
  if (app.PASSWORD.getValue() != app.RE_PASSWORD.getValue()) {\
    Wb.warn(Str.inconsistentPwd,\
      function() {\
        app.PASSWORD.focus(true, true);\
      }\
    );\
    return;\
  }\
  \
  Wb.requestAg({\
    params:{\
      bean : 'PwdCheckService',\
      method: 'execute',\
      pwd : app.PASSWORD.getValue()\
    },\
    success : function(resp){\
      Wb.request({\
      url: 'm?xwl=my/account/set',\
      out: win,\
      success: function(resp) {\
        if (Wb.hasNS('sys.home'))\
          sys.home.userBtn.setText(app.DISPLAY_NAME.getValue());\
        if (contextOwner === undefined)\
          Wb.info(Str.dataSaved);\
        else\
          win.close();\
      }\
    });\
    }\
  });\
  \
  \
}"
    }
   },
   {
    "configs": {
     "itemId": "viewport1",
     "style": "background-color:#787878;"
    },
    "expanded": false,
    "children": [],
    "type": "viewport"
   }
  ],
  "type": "module"
 }],
 "roles": {
  "default": 1,
  "basic": 1,
  "demo": 1
 },
 "title": "Str.myAccount",
 "iconCls": "record_icon",
 "inframe": false,
 "pageLink": "{container:false}"
}