PHP8
[Pman.BAdmin] / Pman.Dialog.LoginNotice.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.LoginNotice= function() {}
8 Roo.apply(Pman.Dialog.LoginNotice.prototype, {
9
10  _strings : {
11   '095afbf2f1f0e5be678f5dac5c54e717' :"Access Denied",
12   '24efa7ee4511563b16144f39706d594f' :"Notice"
13  },
14
15  dialog : false,
16  callback:  false,
17
18  show : function(data, cb)
19  {
20   if (!this.dialog) {
21    this.create();
22   }
23
24   this.callback = cb;
25   this.data = data;
26   this.dialog.show(this.data._el);
27   if (this.form) {
28    this.form.reset();
29    this.form.setValues(data);
30    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
31   }
32
33  },
34
35  create : function()
36  {
37   var _this = this;
38   this.dialog = Roo.factory({
39     xtype : 'Modal',
40     allow_close : false,
41     cls : 'enable-overflow',
42     title : _this._strings['24efa7ee4511563b16144f39706d594f'] /* Notice */,
43     listeners : {
44      show : function (_self)
45       {
46           _this.dialog.footerEl.setVisibilityMode(Roo.Element.DISPLAY).hide();
47           
48           var msg = String.format(
49               'Sorry your IP has been blocked from using this system. Please contact our administrator to resolve this.<br/>' + 
50               '[ {0} ]',
51               _this.data.ip
52           );
53           
54           if(_this.data.status == 'NEW-IP-ADDRESS') {
55               msg = String.format(
56                   'Notify administrator that you have requested access.<br/>' + 
57                   '[ {0} ]',
58                   _this.data.ip
59               );
60           }
61           
62           if(_this.data.status == 'PENDING-IP-ADDRESS') {
63               msg = String.format(
64                   'Administrator has been notified, however you may want to contact them directly to get it approved.<br/>' +
65                   '[ {0} ]',
66                   _this.data.ip
67               );
68           }
69           
70           _this.notice.el.dom.innerHTML = msg;
71       }
72     },
73     xns : Roo.bootstrap,
74     '|xns' : 'Roo.bootstrap',
75     items  : [
76      {
77       xtype : 'Row',
78       xns : Roo.bootstrap,
79       '|xns' : 'Roo.bootstrap',
80       items  : [
81        {
82         xtype : 'Column',
83         html : _this._strings['095afbf2f1f0e5be678f5dac5c54e717'] /* Access Denied */,
84         md : 12,
85         style : 'margin-bottom: 15px;',
86         listeners : {
87          render : function (_self)
88           {
89               _this.notice = this;
90           }
91         },
92         xns : Roo.bootstrap,
93         '|xns' : 'Roo.bootstrap'
94        }
95       ]
96      }
97     ]
98    }  );
99  }
100 });
101 Roo.apply(Pman.Dialog.LoginNotice, Pman.Dialog.LoginNotice.prototype);