This commit is contained in:
Julio Cesar Laura Avendaño
2019-01-15 10:46:23 -04:00
parent 28105f8766
commit 67cea3e78b
2 changed files with 5 additions and 0 deletions

View File

@@ -309,6 +309,7 @@ function pauseCase(date){
buttons: [{
text: _('ID_OK'),
handler: function(){
this.setDisabled(true);
if (Ext.getCmp('noteReason').getValue() != '') {
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
} else {

View File

@@ -1358,6 +1358,7 @@ Ext.onReady(function(){
Actions.pauseCase = function()
{
Ext.getCmp('submitPauseCase').setDisabled(true);
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
@@ -1389,6 +1390,7 @@ Ext.onReady(function(){
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
if( unpauseDate == '') {
Ext.getCmp('submitPauseCase').setDisabled(false);
return;
} else {
unpauseDate = unpauseDate.format('Y-m-d');
@@ -1419,6 +1421,7 @@ Ext.onReady(function(){
},
failure: function ( res, req) {
PMExt.error(_('ID_ERROR'), req.result.msg);
Ext.getCmp('submitPauseCase').setDisabled(false);
}
});
}
@@ -1427,6 +1430,7 @@ Ext.onReady(function(){
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
Ext.getCmp('submitPauseCase').setDisabled(false);
}
});
}