Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve 3.1.1.3 #205

Merged
merged 4 commits into from
Oct 14, 2024
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
2 changes: 1 addition & 1 deletion omod/src/main/webapp/admin/encounters/encounterForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
</spring:bind>
</div>
<div id="patient_label">
<a href="../../patientDashboard.form?patientId=${encounter.patient.patientId}" >${encounter.patient.personName}</a>
<a href="../../patientDashboard.form?patientId=${encounter.patient.patientId}" ><c:out value='${encounter.patient.personName}'/></a>
</div>
<a id ="patient_change_link" href="#Change patient" onClick="makePatientFieldEditable()">
(<openmrs:message code="Encounter.transfer.change"/>)
Expand Down
17 changes: 16 additions & 1 deletion omod/src/main/webapp/admin/patients/patientForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,21 @@
obj.parentNode.removeChild(obj);
}

function beforeSubmit() {
removeBlankData()

sanitizeFields();

return true;

}

function sanitizeFields(){
var inputfields=document.querySelectorAll('input[type="text"]');
inputfields.forEach(function(input) {
input.value = html_sanitize(input.value);
});
}
function preferredBoxClick(obj) {
var inputs = document.getElementsByTagName("input");
if (obj.checked == true) {
Expand Down Expand Up @@ -345,7 +360,7 @@
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post" onSubmit="removeBlankData()">
<form method="post" onSubmit="return beforeSubmit()">

<h3><openmrs:message code="Patient.identifiers"/></h3>
<spring:hasBindErrors name="patient.identifiers">
Expand Down
Loading