Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions ehr/resources/web/ehr/DataEntryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ EHR.DataEntryUtils = new function(){
BASICSUBMIT: {
text: 'Submit',
name: 'submit',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('project', 'start'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('project', 'start'),
disabled: false,
itemId: 'submitBasicBtn',
handler: function(btn){
Expand All @@ -202,7 +202,7 @@ EHR.DataEntryUtils = new function(){
requiredQC: 'Completed',
targetQC: 'Completed',
errorThreshold: 'INFO',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'submitBtn',
handler: function(btn){
Expand Down Expand Up @@ -242,7 +242,7 @@ EHR.DataEntryUtils = new function(){
targetQC: 'Completed',
requiredPermission: 'admin',
errorThreshold: 'ERROR',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'forceSubmitBtn',
handler: function(btn){
Expand All @@ -263,7 +263,7 @@ EHR.DataEntryUtils = new function(){
requiredQC: 'Scheduled',
targetQC: 'Scheduled',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'scheduledBtn',
disableOn: 'ERROR',
Expand Down Expand Up @@ -294,7 +294,7 @@ EHR.DataEntryUtils = new function(){
itemId: 'discardBtn',
targetQC: 'Delete Requested',
requiredQC: 'Delete Requested',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
handler: function(btn){
var panel = btn.up('ehr-dataentrypanel');
panel.discard({
Expand All @@ -310,7 +310,7 @@ EHR.DataEntryUtils = new function(){
name: 'closeBtn',
requiredQC: 'In Progress',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'closeBtn',
handler: function(btn){
Expand Down Expand Up @@ -429,8 +429,7 @@ EHR.DataEntryUtils = new function(){
targetQC: 'Request: Pending',
requiredQC: 'Request: Pending',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL')
|| (LABKEY.ActionURL.buildURL('ehr', 'serviceRequests.view') + '#tab=myPendingRequests'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || (LABKEY.ActionURL.buildURL('ehr', 'serviceRequests.view') + '#tab=myPendingRequests'),
disabled: true,
itemId: 'requestBtn',
handler: function(btn){
Expand All @@ -448,8 +447,7 @@ EHR.DataEntryUtils = new function(){
targetQC: 'Request: Approved',
requiredQC: 'Request: Approved',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.getParameter('returnURL')
|| (LABKEY.ActionURL.buildURL('ehr', 'serviceRequests.view') + '#tab=queues'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || (LABKEY.ActionURL.buildURL('ehr', 'serviceRequests.view') + '#tab=queues'),
disabled: true,
itemId: 'approveBtn',
handler: function(btn){
Expand Down
2 changes: 1 addition & 1 deletion ehr/resources/web/ehr/panel/BulkEditDataEntryPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Ext4.define('EHR.panel.BulkEditDataEntryPanel', {

if(extraContext && extraContext.successURL){
window.onbeforeunload = Ext4.emptyFn;
window.location = LABKEY.ActionURL.getParameter('srcURL') || extraContext.successURL;
window.location = LABKEY.ActionURL.getParameter('returnUrl') || extraContext.successURL;
}
else {
this.updateDirtyStateMessage();
Expand Down
6 changes: 3 additions & 3 deletions ehr/resources/web/ehr/panel/LockAnimalsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ EHR.DataEntryUtils.registerDataEntryFormButton('BIRTHARRIVALCLOSE', {
name: 'closeBtn',
requiredQC: 'In Progress',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'closeBtn1',
handler: function(btn){
Expand All @@ -209,7 +209,7 @@ EHR.DataEntryUtils.registerDataEntryFormButton('BIRTHARRIVALFINAL', {
requiredQC: 'Completed',
targetQC: 'Completed',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'submitBtn',
handler: function(btn){
Expand Down Expand Up @@ -268,7 +268,7 @@ EHR.DataEntryUtils.registerDataEntryFormButton('BIRTHARRIVALREVIEW', {
requiredQC: 'Review Required',
targetQC: 'Review Required',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.getParameter('returnURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'reviewBtn1',
handler: function(btn){
Expand Down
2 changes: 1 addition & 1 deletion ehr/resources/web/ehr/window/CreateProjectWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Ext4.define('EHR.window.CreateProjectWindow', {
};

var newForm = Ext4.DomHelper.append(document.getElementsByTagName('body')[0],
'<form method="POST" action="' + LABKEY.ActionURL.buildURL('ehr', 'dataEntryFormForQuery', null, {schemaName: 'ehr', queryName: 'project', project: ''}) + '&returnUrl=' + LDK.Utils.getSrcURL() + '">' +
'<form method="POST" action="' + LABKEY.ActionURL.buildURL('ehr', 'dataEntryFormForQuery', null, {schemaName: 'ehr', queryName: 'project', project: ''}) + '&returnUrl=' + LDK.Utils.getReturnUrl() + '">' +
'<input type="hidden" name="initialData" value="' + Ext4.htmlEncode(Ext4.encode(initialData)) + '" />' +
'<input type="hidden" name="X-LABKEY-CSRF" value="' + Ext4.htmlEncode(LABKEY.CSRF) + '" />' +
'</form>');
Expand Down
2 changes: 1 addition & 1 deletion ehr/resources/web/ehr/window/OpenSurgeryCasesWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ Ext4.define('EHR.window.OpenSurgeryCasesWindow', {
EHR.DataEntryUtils.registerDataEntryFormButton('OPENSURGERYCASES', {
text: 'Open Cases',
name: 'openSurgeryCase',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'openSurgeryCases',
requiredPermissions: [
Expand Down
4 changes: 2 additions & 2 deletions ehr/resources/web/ehr/window/SubmitForReviewWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ EHR.DataEntryUtils.registerDataEntryFormButton('REVIEW', {
requiredQC: 'Review Required',
targetQC: 'Review Required',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'reviewBtn',
disableOn: 'ERROR',
Expand All @@ -113,7 +113,7 @@ EHR.DataEntryUtils.registerDataEntryFormButton('VET_REVIEW', {
requiredQC: 'Review Required',
targetQC: 'Review Required',
errorThreshold: 'WARN',
successURL: LABKEY.ActionURL.getParameter('srcURL') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
successURL: LABKEY.ActionURL.getParameter('returnUrl') || LABKEY.ActionURL.buildURL('ehr', 'enterData.view'),
disabled: true,
itemId: 'reviewBtn',
disableOn: 'ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public boolean handlePost(QueryForm form, BindException errors) throws BatchVali
@Override
public @NotNull URLHelper getSuccessURL(QueryForm form)
{
URLHelper url = form.getReturnURLHelper();
URLHelper url = form.getReturnUrlHelper();
return url != null ? url : QueryService.get().urlFor(getUser(), getContainer(), QueryAction.executeQuery, EHR_BillingSchema.NAME, EHR_BillingSchema.TABLE_INVOICE_RUNS);
}
}
Expand Down