Pman.Dialog.BAdminStaff.bjs
[Pman.BAdmin] / Pman.Dialog.BAdminStaff.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Dialog');
6
7 Pman.Dialog.BAdminStaff= function() {}
8 Roo.apply(Pman.Dialog.BAdminStaff.prototype, {
9
10  _strings : {
11   'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
12   '566a352f95c879ff26e50bad767a28dc' :"Group Membership",
13   '4910043d0b2c8c864a0e8672716fee94' :"Is a Member",
14   'a60cdd3642fbe81545a3b93fe2b19dd6' :"Two-Factor Authentication",
15   '28974c2c793e780427dfb571b26443e6' :"Group Name",
16   'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
17   'a6b81fd617c4f1b94f83049793cac3cd' :"Show QR Code",
18   'a0f852ef8bfccd86a0e7217d7959e3e8' :"Add / Edit User",
19   '3ec365dd533ddb7ef3d1c111186ce872' :"Details",
20   '0bfe42db3eb05bf39f03812166391939' :"Use Secure Passwords",
21   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
22   '73b00356c62eb391f571b6468be7c372' :"Generate QR Code",
23   '6f958ddaf50fd5ade7858ef1d1a63e51' :"Type again to confirm",
24   '49ee3087348e8d44e1feda1917443987' :"Name",
25   'bbbabdbe1b262f75d99d62880b953be1' :"Role",
26   '1960f813085537c64f981132e34181ca' :"Delete QR Code",
27   'c9cc8cce247e49bae79f15173ce97354' :"Save",
28   '828e70f83623b262e14187c039df99c0' :"Enable Two-Factor Authentication",
29   'acf45fd8829f809b29c601a3a193804f' :"Set / Change Password",
30   '01028205a11cf95a503c4c1d005989da' :"Generate One"
31  },
32  _named_strings : {
33   'email_placeholder' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
34   'secure_passwords_boxLabel' : '0bfe42db3eb05bf39f03812166391939' /* Use Secure Passwords */ ,
35   'name_placeholder' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
36   'role_fieldLabel' : 'bbbabdbe1b262f75d99d62880b953be1' /* Role */ ,
37   'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
38   'role_placeholder' : 'bbbabdbe1b262f75d99d62880b953be1' /* Role */ ,
39   'phone_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
40   '_enable_oath_key_boxLabel' : '828e70f83623b262e14187c039df99c0' /* Enable Two-Factor Authentication */ ,
41   'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
42   'passwd2_placeholder' : '6f958ddaf50fd5ade7858ef1d1a63e51' /* Type again to confirm */ 
43  },
44
45  dialog : false,
46  callback:  false,
47
48  show : function(data, cb)
49  {
50   if (!this.dialog) {
51    this.create();
52   }
53
54   this.callback = cb;
55   this.data = data;
56   this.dialog.show(this.data._el);
57   if (this.form) {
58    this.form.reset();
59    this.form.setValues(data);
60    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
61   }
62
63  },
64
65  create : function()
66  {
67   var _this = this;
68   this.dialog = Roo.factory({
69     xtype : 'Modal',
70     cls : 'add-user-dialog',
71     fitwindow : false,
72     maxWidth : 650,
73     title : _this._strings['a0f852ef8bfccd86a0e7217d7959e3e8'] /* Add / Edit User */,
74     listeners : {
75      beforeshow : function (_self)
76       {
77           //_console.log(_this.detail_tab);
78       },
79      render : function (_self)
80       {
81           this.bodyEl.setHeight(600);
82       },
83      show : function (_self)
84       {
85           //_this.dialog.items[0].getRegion('center').showPanel(0); 
86       
87           //setting first adminstrator in open system
88           
89           if(typeof(_this.data.role) != 'undefined' && _this.data.role == 'Administrators') {
90               
91               Roo.select('.add-user-dialog .modal-title').first().dom.innerHTML = "Create Adminstrator";
92               
93               _this.form.findField('role').inputEl().dom.disabled = true;
94           }
95           _this.layout.showPanel('DetailPanel');
96       }
97     },
98     xns : Roo.bootstrap,
99     '|xns' : 'Roo.bootstrap',
100     buttons : [
101      {
102       xtype : 'Button',
103       html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
104       listeners : {
105        click : function (_self, e)
106         {
107             _this.dialog.hide(); 
108         }
109       },
110       xns : Roo.bootstrap,
111       '|xns' : 'Roo.bootstrap'
112      },
113      {
114       xtype : 'Button',
115       html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
116       weight : 'primary',
117       listeners : {
118        click : function (_self, e)
119         {
120             if(!_this.form.isValid()){
121                 //Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');
122                 return;
123             }
124             
125             var myID = _this.form.findField('id').getValue() * 1;
126             var myName = _this.form.findField('name').getValue();
127         
128             if (_this.form.findField('company_id') && !_this.form.findField('company_id').getValue()) {
129                 Roo.bootstrap.MessageBox.alert("Error", "Select a Company");
130                 return;
131             }
132                 
133                // validate password match (only needed if we are not using generated one..
134             if (_this.form.findField('passwd1') 
135                     && _this.form.findField('passwd1').getValue().length > 0 
136                     && _this.form.findField('passwd1').inputEl().dom.type == "password") {
137                     
138                 var p1 = _this.form.findField('passwd1').getValue();
139                 var p2 = _this.form.findField('passwd2').getValue();
140                     
141                     
142                 if (Pman.Login.authUser.id < 0 && !p1.length) {
143                     Roo.bootstrap.MessageBox.alert("Error", "You must create a password for the admin account");
144                     return;
145                 }
146                     
147                     
148                 if (p1.length || p2.length) {
149                     if (p1 != p2) {
150                         Roo.bootstrap.MessageBox.alert("Error", "Passwords do not match");
151                         return;
152                     }
153                 }
154                     
155                 
156             }
157             
158             // get the list of record with tick
159             
160             _this.form.doAction("submit");
161             
162             return;
163         
164         }
165       },
166       xns : Roo.bootstrap,
167       '|xns' : 'Roo.bootstrap'
168      }
169     ],
170     items  : [
171      {
172       xtype : 'Border',
173       listeners : {
174        render : function (_self)
175         {
176             _this.layout = _self;
177         }
178       },
179       xns : Roo.bootstrap.layout,
180       '|xns' : 'Roo.bootstrap.layout',
181       center : {
182        xtype : 'Region',
183        alwaysShowTabs : true,
184        tabPosition : 'top',
185        xns : Roo.bootstrap.layout,
186        '|xns' : 'Roo.bootstrap.layout'
187       },
188       items  : [
189        {
190         xtype : 'Content',
191         autoScroll : true,
192         background : false,
193         fitContainer : false,
194         fitToFrame : false,
195         id : 'DetailPanel',
196         region : 'center',
197         title : _this._strings['3ec365dd533ddb7ef3d1c111186ce872'] /* Details */,
198         listeners : {
199          activate : function (_self)
200           {
201               /*var url = 'about:blank';
202               
203               if(_this.data.id * 1 > 0){
204                   url = baseURL + '/Coba/Report/ApplicationSummary/' + _this.data.id;
205               }
206                
207               _this.app_summary_frame.el.dom.src = url;*/
208               
209           },
210          render : function (_self)
211           {
212               _this.detail_tab = _self;
213           }
214         },
215         xns : Roo.bootstrap.panel,
216         '|xns' : 'Roo.bootstrap.panel',
217         items  : [
218          {
219           xtype : 'Container',
220           cls : 'col-md-12',
221           xns : Roo.bootstrap,
222           '|xns' : 'Roo.bootstrap',
223           items  : [
224            {
225             xtype : 'Form',
226             errorMask : true,
227             labelAlign : 'top',
228             style : 'margin-top: 20px;',
229             url : baseURL + '/Roo/core_person',
230             listeners : {
231              actioncomplete : function (_self, action)
232               {
233                   if(action.type == 'setdata'){
234                       
235                       _this.form.findField('passwd1').el.select('input',true).first().dom.type="password";
236                       _this.form.findField('passwd2').show();
237                       _this.passwordbox.collapse();
238                       
239                       _this.qrCodeBox.collapse();
240                       _this.qrCodeBox.el.hide();
241                       _this.form.findField('_enable_oath_key').setValue(1);
242                       _this.form.findField('_enable_oath_key').el.show();
243                       
244                       _this.generate_qrcode_btn.el.hide();
245                       _this.delete_qrcode_btn.el.hide();
246                       _this.show_qrcode_btn.el.hide();
247                       
248                       if(_this.data.id * 1 > 0) {
249                           this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
250                       }
251                       
252                       this.clearInvalid();
253                       
254                       return;
255                   }
256                  
257                   if (action.type == 'load') {
258                   
259                       _this.data = action.result.data;
260                       
261                       _this.qrCodeBox.el.show();
262                       _this.form.findField('_enable_oath_key').setValue(0);
263                       _this.form.findField('_enable_oath_key').el.hide();
264                       
265                       _this.generate_qrcode_btn.el.show();
266                       _this.delete_qrcode_btn.el.hide();
267                       _this.show_qrcode_btn.el.hide();
268                           
269                       _this.qrCodeBox.collapse();
270                       
271                       if(_this.data.length_oath_key * 1 > 0){
272                           _this.delete_qrcode_btn.el.show();
273                           _this.show_qrcode_btn.el.show();
274                           _this.qrCodeBox.expand();
275                       }
276                       
277                       return;
278                   }
279                   
280                   if (action.type == 'submit') { // only submitted here if we are 
281                   
282                       _this.dialog.hide();
283                      
284                       if (_this.callback) {
285                           _this.callback.call(this, action.result.data);
286                       }
287                       
288                       return;
289                       
290                   }
291               },
292              beforeaction : function (_self, action)
293               {
294               
295               },
296              render : function (_self)
297               {
298                   _this.form = _self;
299                   
300                   //_this.findField('group_membership').setValue
301                   
302                   console.log(_this.form.data);
303               }
304             },
305             xns : Roo.bootstrap,
306             '|xns' : 'Roo.bootstrap',
307             items  : [
308              {
309               xtype : 'Input',
310               fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
311               labelAlign : 'left',
312               name : 'name',
313               placeholder : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
314               xns : Roo.bootstrap,
315               '|xns' : 'Roo.bootstrap'
316              },
317              {
318               xtype : 'Input',
319               fieldLabel : _this._strings['bbbabdbe1b262f75d99d62880b953be1'] /* Role */,
320               labelAlign : 'left',
321               name : 'role',
322               placeholder : _this._strings['bbbabdbe1b262f75d99d62880b953be1'] /* Role */,
323               xns : Roo.bootstrap,
324               '|xns' : 'Roo.bootstrap'
325              },
326              {
327               xtype : 'Input',
328               allowBlank : false,
329               fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
330               labelAlign : 'left',
331               name : 'email',
332               placeholder : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
333               vtype : 'email',
334               xns : Roo.bootstrap,
335               '|xns' : 'Roo.bootstrap'
336              },
337              {
338               xtype : 'Input',
339               fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
340               labelAlign : 'left',
341               name : 'phone',
342               xns : Roo.bootstrap,
343               '|xns' : 'Roo.bootstrap'
344              },
345              {
346               xtype : 'CheckBox',
347               boxLabel : _this._strings['828e70f83623b262e14187c039df99c0'] /* Enable Two-Factor Authentication */,
348               checked : true,
349               name : '_enable_oath_key',
350               listeners : {
351                render : function (_self)
352                 {
353                     this.el.setVisibilityMode(Roo.Element.DISPLAY);
354                     
355                     this.el.hide();
356                 }
357               },
358               xns : Roo.bootstrap,
359               '|xns' : 'Roo.bootstrap'
360              },
361              {
362               xtype : 'Container',
363               expandable : true,
364               expanded : false,
365               header : _this._strings['acf45fd8829f809b29c601a3a193804f'] /* Set / Change Password */,
366               panel : 'primary',
367               listeners : {
368                render : function (_self)
369                 {
370                     _this.passwordbox = this;
371                 }
372               },
373               xns : Roo.bootstrap,
374               '|xns' : 'Roo.bootstrap',
375               items  : [
376                {
377                 xtype : 'Row',
378                 xns : Roo.bootstrap,
379                 '|xns' : 'Roo.bootstrap',
380                 items  : [
381                  {
382                   xtype : 'Column',
383                   xs : 8,
384                   xns : Roo.bootstrap,
385                   '|xns' : 'Roo.bootstrap',
386                   items  : [
387                    {
388                     xtype : 'Input',
389                     inputType : 'password',
390                     name : 'passwd1',
391                     xns : Roo.bootstrap,
392                     '|xns' : 'Roo.bootstrap'
393                    }
394                   ]
395                  },
396                  {
397                   xtype : 'Column',
398                   xs : 4,
399                   xns : Roo.bootstrap,
400                   '|xns' : 'Roo.bootstrap',
401                   items  : [
402                    {
403                     xtype : 'Button',
404                     html : _this._strings['01028205a11cf95a503c4c1d005989da'] /* Generate One */,
405                     style : 'width:100%',
406                     listeners : {
407                      click : function (_self, e)
408                       {
409                           var pw = Math.random().toString(36).slice(-12);
410                           _this.form.findField('passwd1').el.select('input',true).first().dom.type="input";
411                           _this.form.findField('passwd1').setValue(pw);
412                           _this.form.findField('passwd2').hide();
413                           
414                           
415                       }
416                     },
417                     xns : Roo.bootstrap,
418                     '|xns' : 'Roo.bootstrap'
419                    }
420                   ]
421                  }
422                 ]
423                },
424                {
425                 xtype : 'Input',
426                 inputType : 'password',
427                 name : 'passwd2',
428                 placeholder : _this._strings['6f958ddaf50fd5ade7858ef1d1a63e51'] /* Type again to confirm */,
429                 xns : Roo.bootstrap,
430                 '|xns' : 'Roo.bootstrap'
431                },
432                {
433                 xtype : 'CheckBox',
434                 boxLabel : _this._strings['0bfe42db3eb05bf39f03812166391939'] /* Use Secure Passwords */,
435                 name : 'secure_passwords',
436                 xns : Roo.bootstrap,
437                 '|xns' : 'Roo.bootstrap'
438                }
439               ]
440              },
441              {
442               xtype : 'Container',
443               expandable : true,
444               expanded : false,
445               header : _this._strings['a60cdd3642fbe81545a3b93fe2b19dd6'] /* Two-Factor Authentication */,
446               panel : 'primary',
447               listeners : {
448                render : function (_self)
449                 {
450                     _this.qrCodeBox = this;
451                     
452                     this.el.setVisibilityMode(Roo.Element.DISPLAY);
453                     
454                     this.el.hide();
455                 }
456               },
457               xns : Roo.bootstrap,
458               '|xns' : 'Roo.bootstrap',
459               items  : [
460                {
461                 xtype : 'Row',
462                 xns : Roo.bootstrap,
463                 '|xns' : 'Roo.bootstrap',
464                 items  : [
465                  {
466                   xtype : 'Column',
467                   xs : 4,
468                   xns : Roo.bootstrap,
469                   '|xns' : 'Roo.bootstrap',
470                   items  : [
471                    {
472                     xtype : 'Button',
473                     html : _this._strings['73b00356c62eb391f571b6468be7c372'] /* Generate QR Code */,
474                     style : 'width:100%',
475                     listeners : {
476                      click : function (_self, e)
477                       {
478                           if(_this.data.id * 1 < 1){
479                               Roo.bootstrap.MessageBox.alert('Error', 'Please save the user first');
480                               return;
481                           }
482                           
483                           new Pman.Request({
484                               url: baseURL + '/Roo/Core_person.php',
485                               method : 'POST',
486                               mask : 'Loading...',
487                               params : {
488                                   id : _this.data.id,
489                                   _generate_oath_key : 1
490                               }, 
491                               success : function(res) {
492                                   _this.delete_qrcode_btn.el.show();
493                                   _this.show_qrcode_btn.el.show();
494                                   
495                                   Pman.Dialog.BAdminStaffTwoFactorQRCode.show({
496                                       id : _this.data.id
497                                   });
498                                   
499                                   return;
500                               }
501                           });
502                       },
503                      render : function (_self)
504                       {
505                           _this.generate_qrcode_btn = this;
506                       
507                           this.el.setVisibilityMode(Roo.Element.DISPLAY);
508                           
509                           this.el.hide();
510                       }
511                     },
512                     xns : Roo.bootstrap,
513                     '|xns' : 'Roo.bootstrap'
514                    }
515                   ]
516                  },
517                  {
518                   xtype : 'Column',
519                   xs : 4,
520                   xns : Roo.bootstrap,
521                   '|xns' : 'Roo.bootstrap',
522                   items  : [
523                    {
524                     xtype : 'Button',
525                     html : _this._strings['1960f813085537c64f981132e34181ca'] /* Delete QR Code */,
526                     style : 'width:100%',
527                     listeners : {
528                      click : function (_self, e)
529                       {
530                           if(_this.data.id * 1 < 1){
531                               Roo.bootstrap.MessageBox.alert('Error', 'Please save the user first');
532                               return;
533                           }
534                           
535                           new Pman.Request({
536                               url: baseURL + '/Roo/Core_person.php',
537                               method : 'POST',
538                               mask : 'Loading...',
539                               params : {
540                                   id : _this.data.id,
541                                   oath_key : ''
542                               }, 
543                               success : function(res) {
544                                   _this.delete_qrcode_btn.el.hide();
545                                   _this.show_qrcode_btn.el.hide();
546                                   
547                                   return;
548                               }
549                           });
550                       },
551                      render : function (_self)
552                       {
553                           _this.delete_qrcode_btn = this;
554                       
555                           this.el.setVisibilityMode(Roo.Element.DISPLAY);
556                           
557                           this.el.hide();
558                       }
559                     },
560                     xns : Roo.bootstrap,
561                     '|xns' : 'Roo.bootstrap'
562                    }
563                   ]
564                  },
565                  {
566                   xtype : 'Column',
567                   xs : 4,
568                   xns : Roo.bootstrap,
569                   '|xns' : 'Roo.bootstrap',
570                   items  : [
571                    {
572                     xtype : 'Button',
573                     html : _this._strings['a6b81fd617c4f1b94f83049793cac3cd'] /* Show QR Code */,
574                     style : 'width:100%',
575                     listeners : {
576                      click : function (_self, e)
577                       {
578                           if(_this.data.id * 1 < 1){
579                               Roo.bootstrap.MessageBox.alert('Error', 'Please save the user first');
580                               return;
581                           }
582                           
583                           Pman.Dialog.BAdminStaffTwoFactorQRCode.show({
584                               id : _this.data.id
585                           });
586                       },
587                      render : function (_self)
588                       {
589                           _this.show_qrcode_btn = this;
590                       
591                           this.el.setVisibilityMode(Roo.Element.DISPLAY);
592                           
593                           this.el.hide();
594                       }
595                     },
596                     xns : Roo.bootstrap,
597                     '|xns' : 'Roo.bootstrap'
598                    }
599                   ]
600                  }
601                 ]
602                }
603               ]
604              },
605              {
606               xtype : 'Input',
607               inputType : 'hidden',
608               labelAlign : 'left',
609               name : 'id',
610               listeners : {
611                render : function (_self)
612                 {
613                     _this.userID = _self;
614                 }
615               },
616               xns : Roo.bootstrap,
617               '|xns' : 'Roo.bootstrap'
618              },
619              {
620               xtype : 'Input',
621               inputType : 'hidden',
622               name : 'company_id',
623               xns : Roo.bootstrap,
624               '|xns' : 'Roo.bootstrap'
625              },
626              {
627               xtype : 'Input',
628               inputType : 'hidden',
629               labelAlign : 'left',
630               name : 'membership_list',
631               xns : Roo.bootstrap,
632               '|xns' : 'Roo.bootstrap'
633              }
634             ]
635            }
636           ]
637          }
638         ]
639        },
640        {
641         xtype : 'Grid',
642         background : true,
643         fitContainer : true,
644         fitToFrame : true,
645         region : 'center',
646         title : _this._strings['566a352f95c879ff26e50bad767a28dc'] /* Group Membership */,
647         listeners : {
648          activate : function (_self)
649           {
650               if(_this.option_grid){
651                   _this.option_grid.store.load({});
652               }
653               
654           },
655          render : function (_self)
656           {
657               _this.option_panel = this;
658               
659               
660           }
661         },
662         xns : Roo.bootstrap.panel,
663         '|xns' : 'Roo.bootstrap.panel',
664         grid : {
665          xtype : 'Table',
666          cellSelection : false,
667          cls : 'table-fixed',
668          condensed : true,
669          footerShow : false,
670          loadMask : true,
671          rowSelection : true,
672          listeners : {
673           render : function (_self)
674            {
675                _this.option_grid = this;
676                
677                this.store.load({})
678            },
679           rowclick : function (_self, el, rowIndex, e)
680            {
681                //var di = this.colModel.getDataIndex(columnIndex);
682                
683                // check if the name is the result name from dataobject core_group_member
684                /*if (di != 'group_membership_user_id') {
685                    return;
686                }*/
687                
688                
689                
690                var rec = this.store.getAt(rowIndex);
691            
692                rec.set('group_membership_user_id', rec.data.group_membership_user_id * 1 == 0 ? -1 : 0);
693            
694                rec.commit();
695                
696                var membership_active_arr = [];
697                // loop throught the new list , rebuild the list of current options
698                
699                // record is the first parameter
700                
701                _this.option_grid.store.each(function(record){
702                    var gmuid = record.data.group_membership_user_id;
703                    var gid = record.data.id;
704                    if(gmuid * 1 != 0){
705                        membership_active_arr.push(gid);
706                    }
707                });
708                
709                var membership_active_list = "";
710                membership_active_list = membership_active_arr.join();
711                
712                _this.form.findField("membership_list").setValue(membership_active_list);
713            }
714          },
715          xns : Roo.bootstrap,
716          '|xns' : 'Roo.bootstrap',
717          store : {
718           xtype : 'Store',
719           remoteSort : true,
720           sortInfo : { direction : 'ASC', field: 'id' },
721           listeners : {
722            beforeload : function (_self, options)
723             { 
724                 options.params = options.params || {};
725                 
726                 options.params._with_membership_user = _this.data.id;
727             
728                 /*if(typeof(_this.data.id) == 'undefined' || _this.data.id * 1 < 1){
729                     this.removeAll();
730                     return false;
731                 }
732                 
733                 options.params.is_active = 1;
734                 options.params.dec_type = 'checklist';
735                 
736                 options.params._ext_data_id = _this.data.id;
737                 
738                 options.params._with_others = 1;
739                 
740                 options.params._show_deleted = _this.documentStatusBtn.pressed ? 1 : 0;*/
741                 
742             }
743           },
744           xns : Roo.data,
745           '|xns' : 'Roo.data',
746           proxy : {
747            xtype : 'HttpProxy',
748            method : 'GET',
749            url : baseURL + '/Roo/core_group',
750            xns : Roo.data,
751            '|xns' : 'Roo.data'
752           },
753           reader : {
754            xtype : 'JsonReader',
755            id : 'id',
756            root : 'data',
757            xns : Roo.data,
758            '|xns' : 'Roo.data'
759           }
760          },
761          sm : {
762           xtype : 'RowSelectionModel',
763           singleSelect : true,
764           listeners : {
765            selectionchange : function (_self)
766             {
767                 /*_this.type_edit_btn.hide();
768                 
769                 if(this.getSelected()){
770                     _this.type_edit_btn.show();
771                 }*/
772                 
773                 _this.option_grid.store.load({});
774                 
775                 
776             }
777           },
778           xns : Roo.bootstrap.Table,
779           '|xns' : 'Roo.bootstrap.Table'
780          },
781          cm : [
782           {
783            xtype : 'ColumnModel',
784            cursor : 'pointer',
785            dataIndex : 'group_membership_user_id',
786            header : _this._strings['4910043d0b2c8c864a0e8672716fee94'] /* Is a Member */,
787            renderer : function(v,x,r) {
788                
789                var state = v != 0 ?  '-check' : '';
790                
791                return '<i class=\"far fa'+ state + '-square-o fa-2x\" aria-hidden=\"true\"></i>';
792            },
793            sortable : false,
794            xs : 1,
795            xns : Roo.grid,
796            '|xns' : 'Roo.grid'
797           },
798           {
799            xtype : 'ColumnModel',
800            cursor : 'pointer',
801            dataIndex : 'name',
802            header : _this._strings['28974c2c793e780427dfb571b26443e6'] /* Group Name */,
803            sortable : true,
804            xs : 11,
805            xns : Roo.grid,
806            '|xns' : 'Roo.grid'
807           }
808          ]
809         }
810        }
811       ]
812      }
813     ]
814    }  );
815  }
816 });
817 Roo.apply(Pman.Dialog.BAdminStaff, Pman.Dialog.BAdminStaff.prototype);