I'm not sure how to remove "Pause" from the Actions menu, but you can disable it, so that it won't do anything.
Edit workflow/engine/templates/cases/open.js.
Change lines 2131 - 1433 from:
Code: Select all Actions.setUnpauseCaseDate = function()
{
curDate = _ENV_CURRENT_DATE_NO_FORMAT.split('-');
filterDate = curDate[0]+'-'+curDate[1]+'-';
nDay = '' + (parseInt(curDate[2])+1);
nDay = nDay.length == 1 ? '0' + nDay : nDay;
filterDate += nDay;
filterTime = ('0' + curDate[3]).slice(-2) + ':' + ('0' + curDate[4]).slice(-2) + ' ' + curDate[5];
var fieldset = {
xtype : 'fieldset',
labelWidth: 150,
width:380,
//autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _("ID_CASE"), text: stringReplace("\\: ", "", _APP_NUM)},
{fieldLabel: _("ID_PAUSE_DATE"), text: _ENV_CURRENT_DATE},
new Ext.form.DateField({
id: 'unpauseDate',
format: 'Y-m-d',
fieldLabel: _('ID_UNPAUSE_DATE'),
name: 'unpauseDate',
allowBlank: false,
value: filterDate,
minValue: filterDate
}),
new Ext.form.TimeField({
id: 'unpauseTime',
fieldLabel: _('ID_UNPAUSE_TIME'),
name: 'unpauseTime',
value: filterTime,
minValue: formatAMPM(new Date(), true),
format: 'h:i A'
}),
{
xtype: 'textarea',
id: 'noteReason',
fieldLabel: _('ID_CASE_PAUSE_REASON'),
name: 'noteReason',
width: 170,
height: 50
},
{
id: 'notifyReason',
xtype:'checkbox',
name: 'notifyReason',
fieldLabel: _('ID_NOTIFY_USERS_CASE')
}
],
buttons : [
{
id: 'submitPauseCase',
text : _('ID_PAUSE_CASE'),
handler : Actions.pauseCase,
disabled:false
},{
text : _('ID_CANCEL'),
handler : function() {
win.close();
}
}
]
}
var frm = new Ext.FormPanel( {
id: 'unpauseFrm',
labelAlign : 'right',
//bodyStyle : 'padding:5px 5px 0',
width : 260,
items : [fieldset]
});
var win = new Ext.Window({
title: _('ID_PAUSE_CASE'),
width: 380,
height: 260,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
resizable: false,
draggable: false,
items: [frm]
});
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
try
{
prnt = parent.parent;
top.location = top.location;
}
catch (err)
{
parent.location = parent.location;
}
}
});
} else {
win.show();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.pauseCase = function()
{
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
try{
prnt = parent.parent;
top.location = top.location;
} catch (err){
parent.location = parent.location;
}
}
});
} else {
if (Ext.getCmp('noteReason').getValue() != '') {
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
} else {
var noteReasonTxt = '';
}
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
if( unpauseDate == '') {
return;
} else {
unpauseDate = unpauseDate.format('Y-m-d');
}
Ext.getCmp('unpauseFrm').getForm().submit({
waitTitle : " ",
url:'ajaxListener',
method : 'post',
params : {
action: 'pauseCase',
unpauseDate:unpauseDate,
NOTE_REASON: noteReasonTxt,
NOTIFY_PAUSE: notifyReasonVal
},
waitMsg:'Pausing Case '+stringReplace("\\: ", "", _APP_NUM)+'...',
timeout : 36000,
success : function(res, req) {
if(req.result.success) {
try {
parent.notify('PAUSE CASE', req.result.msg);
}catch (e) {
}
location.href = urlToRedirectAfterPause;
} else {
PMExt.error(_('ID_ERROR'), req.result.msg);
}
},
failure: function ( res, req) {
PMExt.error(_('ID_ERROR'), req.result.msg);
}
});
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Add /* before and */ afterwards to comment out the code like this:
Code: Select all/*
Actions.setUnpauseCaseDate = function()
{
curDate = _ENV_CURRENT_DATE_NO_FORMAT.split('-');
filterDate = curDate[0]+'-'+curDate[1]+'-';
nDay = '' + (parseInt(curDate[2])+1);
nDay = nDay.length == 1 ? '0' + nDay : nDay;
filterDate += nDay;
filterTime = ('0' + curDate[3]).slice(-2) + ':' + ('0' + curDate[4]).slice(-2) + ' ' + curDate[5];
var fieldset = {
xtype : 'fieldset',
labelWidth: 150,
width:380,
//autoHeight : true,
defaults : {
width : 170,
xtype:'label',
labelStyle : 'padding: 0px;',
style: 'font-weight: bold'
},
items : [
{fieldLabel: _("ID_CASE"), text: stringReplace("\\: ", "", _APP_NUM)},
{fieldLabel: _("ID_PAUSE_DATE"), text: _ENV_CURRENT_DATE},
new Ext.form.DateField({
id: 'unpauseDate',
format: 'Y-m-d',
fieldLabel: _('ID_UNPAUSE_DATE'),
name: 'unpauseDate',
allowBlank: false,
value: filterDate,
minValue: filterDate
}),
new Ext.form.TimeField({
id: 'unpauseTime',
fieldLabel: _('ID_UNPAUSE_TIME'),
name: 'unpauseTime',
value: filterTime,
minValue: formatAMPM(new Date(), true),
format: 'h:i A'
}),
{
xtype: 'textarea',
id: 'noteReason',
fieldLabel: _('ID_CASE_PAUSE_REASON'),
name: 'noteReason',
width: 170,
height: 50
},
{
id: 'notifyReason',
xtype:'checkbox',
name: 'notifyReason',
fieldLabel: _('ID_NOTIFY_USERS_CASE')
}
],
buttons : [
{
id: 'submitPauseCase',
text : _('ID_PAUSE_CASE'),
handler : Actions.pauseCase,
disabled:false
},{
text : _('ID_CANCEL'),
handler : function() {
win.close();
}
}
]
}
var frm = new Ext.FormPanel( {
id: 'unpauseFrm',
labelAlign : 'right',
//bodyStyle : 'padding:5px 5px 0',
width : 260,
items : [fieldset]
});
var win = new Ext.Window({
title: _('ID_PAUSE_CASE'),
width: 380,
height: 260,
layout:'fit',
autoScroll:true,
modal: true,
maximizable: false,
resizable: false,
draggable: false,
items: [frm]
});
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
try
{
prnt = parent.parent;
top.location = top.location;
}
catch (err)
{
parent.location = parent.location;
}
}
});
} else {
win.show();
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
Actions.pauseCase = function()
{
Ext.Ajax.request({
url : 'ajaxListener' ,
params : {action : 'verifySession'},
success: function ( result, request ) {
var data = Ext.util.JSON.decode(result.responseText);
if( data.lostSession ) {
Ext.Msg.show({
title: _('ID_ERROR'),
msg: data.message,
animEl: 'elId',
icon: Ext.MessageBox.ERROR,
buttons: Ext.MessageBox.OK,
fn : function(btn) {
try{
prnt = parent.parent;
top.location = top.location;
} catch (err){
parent.location = parent.location;
}
}
});
} else {
if (Ext.getCmp('noteReason').getValue() != '') {
var noteReasonTxt = _('ID_CASE_PAUSE_LABEL_NOTE') + ' ' + Ext.getCmp('noteReason').getValue();
} else {
var noteReasonTxt = '';
}
var notifyReasonVal = Ext.getCmp('notifyReason').getValue() == true ? 1 : 0;
var paramsNote = '&NOTE_REASON=' + noteReasonTxt + '&NOTIFY_PAUSE=' + notifyReasonVal;
var unpauseDate = Ext.getCmp('unpauseDate').getValue();
if( unpauseDate == '') {
return;
} else {
unpauseDate = unpauseDate.format('Y-m-d');
}
Ext.getCmp('unpauseFrm').getForm().submit({
waitTitle : " ",
url:'ajaxListener',
method : 'post',
params : {
action: 'pauseCase',
unpauseDate:unpauseDate,
NOTE_REASON: noteReasonTxt,
NOTIFY_PAUSE: notifyReasonVal
},
waitMsg:'Pausing Case '+stringReplace("\\: ", "", _APP_NUM)+'...',
timeout : 36000,
success : function(res, req) {
if(req.result.success) {
try {
parent.notify('PAUSE CASE', req.result.msg);
}catch (e) {
}
location.href = urlToRedirectAfterPause;
} else {
PMExt.error(_('ID_ERROR'), req.result.msg);
}
},
failure: function ( res, req) {
PMExt.error(_('ID_ERROR'), req.result.msg);
}
});
}
},
failure: function ( result, request) {
if (typeof(result.responseText) != 'undefined') {
Ext.MessageBox.alert( _('ID_FAILED'), result.responseText);
}
}
});
}
*/
Then
delete the cache on your web browser and reopen the case.