Roo.apply(Pman.Dialog.VerifyAccess.prototype, {
_strings : {
- '294176b7ee742a4fcfe2085448e6f138' :"Cacel",
'e2c9d024b79dfb48b42a7807206c6aed' :"Verify New IP Access",
'd41d8cd98f00b204e9800998ecf8427e' :"",
'f6039d44b29456b20f8f373155ae4973' :"Username",
'004bf6c9a40003140292e97330236c53' :"Action",
+ '5a787141d53b573ec9b86e900bfe0d79' :"Expire Date",
'dfb790522fdea3859af206d32916fe77' :"User Agent",
'70d9be9b139893aa6c69b5e77e614311' :"Confirm"
},
_this.form.setValues(_this.data);
+ if(_this.data.status * 1 == 0){
+ _this.form.findField('status').reset();
+ }
+
+ _this.form.clearInvalid();
+
return;
},
failure: function(res) {
if(!_this.form.isValid()){
return;
}
-
+ Roo.log('submit');
+ return;
_this.dialog.el.mask('Sending...');
_this.form.doAction('submit');
},
xns : Roo.bootstrap,
'|xns' : 'Roo.bootstrap'
- },
- {
- xtype : 'Button',
- html : _this._strings['294176b7ee742a4fcfe2085448e6f138'] /* Cacel */,
- weight : 'primary',
- listeners : {
- click : function (_self, e)
- {
- var path = window.location.pathname.split('/');
-
- var verify_key = path.pop();
-
- var id = path.pop();
-
- new Pman.Request({
- url: baseURL + '/Roo/Coba_application_signup',
- method : 'POST',
- mask : 'Sending...',
- params : {
- _resend : id
- },
- success : function(res) {
- var msg = "We have re-sent you an invitation via email." +
- "<br/><br/>" +
- "Please check your inbox for the final registration step." +
- "<br/><br/>" +
- "<B>(Note. emails may accidentally be sent to your Spam Folder)</B>";
-
- Roo.bootstrap.MessageBox.alert('Please check your email', msg) ;
- },
- failure: function(res) {
- Roo.bootstrap.MessageBox.alert('Error', res.errorMsg) ;
- }
- });
- },
- render : function (_self)
- {
- _this.btn_resend = _self;
- this.el.setVisibilityMode(Roo.Element.DISPLAY);
- this.el.hide();
- }
- },
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap'
}
],
items : [
}
if (action.type == 'load') {
- if(_this.data.status * 1 == 0){
- _this.form.findField('status').reset();
- }
-
return;
}
if (action.type =='submit') {
'|xns' : 'Roo.bootstrap'
}
]
- }
- ]
- },
- {
- xtype : 'Row',
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap',
- items : [
+ },
{
xtype : 'Column',
xs : 12,
'|xns' : 'Roo.bootstrap'
}
]
- }
- ]
- },
- {
- xtype : 'Row',
- xns : Roo.bootstrap,
- '|xns' : 'Roo.bootstrap',
- items : [
+ },
{
xtype : 'Column',
xs : 12,
{
xtype : 'ComboBox',
allowBlank : false,
+ alwaysQuery : true,
displayField : 'value',
editable : false,
fieldLabel : _this._strings['004bf6c9a40003140292e97330236c53'] /* Action */,
+ forceSelection : true,
hiddenName : 'status',
+ indicatorpos : 'right',
mode : 'local',
name : 'status_name',
+ selectOnFocus : true,
+ tpl : '<div class=\"roo-select2-result\"><b>{value}</b></div>',
triggerAction : 'all',
valueField : 'code',
listeners : {
select : function (combo, record, index)
{
+ _this.expire_dt.allowBlank = true;
+ _this.expire_dt.el.hide();
+ if(record.data.code == '-2'){
+ _this.expire_dt.allowBlank = false;
+ _this.expire_dt.el.show();
+ }
}
},
xns : Roo.bootstrap,
xtype : 'SimpleStore',
data : [
['1', 'Approve'],
+ ['-2', 'Temporary'],
['-1', 'Reject']
],
fields : [ 'code', 'value' ],
}
}
]
+ },
+ {
+ xtype : 'Column',
+ xs : 12,
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap',
+ items : [
+ {
+ xtype : 'DateField',
+ allowBlank : false,
+ fieldLabel : _this._strings['5a787141d53b573ec9b86e900bfe0d79'] /* Expire Date */,
+ indicatorpos : 'right',
+ name : 'expire_dt',
+ listeners : {
+ render : function (_self)
+ {
+ _this.expire_dt = this;
+
+ var d = new Date();
+ d.setDate(d.getDate() - 1);
+
+ this.setStartDate(d);
+
+ this.el.setVisibilityMode(Roo.Element.DISPLAY);
+
+ this.el.hide();
+ }
+ },
+ xns : Roo.bootstrap,
+ '|xns' : 'Roo.bootstrap'
+ }
+ ]
}
]
},