Skip to content

Remove unused function calls from pending forms page #557

@BrianRamsay

Description

@BrianRamsay

We are making javascript function calls on the pending forms page to nonexistent functions. They are mostly not throwing errors, but there isn't a reason for them to exist. Review the Javascript and get rid of old or nonexistent functions.

Example in app/static/js/allPendingForms.js:

151           // Try and catch is used here to prevent General Search page from reloading the entire the page.
152           try {
153             runformSearchQuery();
154             $('#approvalModal').modal('hide');
155           }
156           catch(e){
157             location.reload(true);
158           }

runformSearchQuery does not exist in the page.

Review to see if there are other things like this and decide if they need to be replaced with working functionality or if they can just be removed. Also look at surrounding code and clean up as necessary. In this example, we probably don't need a try/catch anymore, and we can just hide the approval modal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorOptimization and re-organization of working code

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions