Merged in bugfix/PMC-136 (pull request #6750)

PMC-136

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
Julio Cesar Laura Avendaño
2019-01-30 16:22:08 +00:00
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

@@ -1470,6 +1470,7 @@ Ext.onReady(function(){
Actions.pauseCase = function()
{
Ext.getCmp('submitPauseCase').setDisabled(true);
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
@@ -1501,6 +1502,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');
@@ -1531,6 +1533,7 @@ Ext.onReady(function(){
},
failure: function ( res, req) {
PMExt.error(_('ID_ERROR'), req.result.msg);
Ext.getCmp('submitPauseCase').setDisabled(false);
}
});
}
@@ -1539,6 +1542,7 @@ Ext.onReady(function(){
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
Ext.getCmp('submitPauseCase').setDisabled(false);
}
});
}