Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b3e89e6d08c0
Choose a base ref
...
head repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a609f4926f67
Choose a head ref
  • 2 commits
  • 19 files changed
  • 2 contributors

Commits on Mar 14, 2014

  1. Copy the full SHA
    be50e0d View commit details

Commits on Mar 17, 2014

  1. Merge pull request #787 from jkondrat/TRUNK-3882

    TRUNK-3882 Custom tag to render errors
    rkorytkowski committed Mar 17, 2014
    Copy the full SHA
    a609f49 View commit details
11 changes: 11 additions & 0 deletions webapp/src/main/webapp/WEB-INF/tags/errorNotify.tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<%@ include file="/WEB-INF/template/include.jsp" %>

<%@ attribute name="errors" required="true" type="org.springframework.validation.Errors" %>

<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/>
</c:forEach>
</div>
<br />
Original file line number Diff line number Diff line change
@@ -111,13 +111,7 @@ $j(document).ready( function() {
</c:if>

<spring:hasBindErrors name="conceptReferenceTermModel">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/>
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form:form method="post" action="conceptReferenceTerm.form" modelAttribute="conceptReferenceTermModel">
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
<h2><openmrs:message code="ConceptStopWord.title"/></h2>

<spring:hasBindErrors name="command">
<openmrs:message code="fix.error"/><br/>
<openmrs:message code="fix.error"/><br/>
</spring:hasBindErrors>

<form method="post">
Original file line number Diff line number Diff line change
@@ -219,13 +219,7 @@
<h2><openmrs:message code="Encounter.manage.title"/></h2>

<spring:hasBindErrors name="encounter">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/>
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<b class="boxHeader"><openmrs:message code="Encounter.summary"/></b>
@@ -504,4 +498,4 @@

</c:if>

<%@ include file="/WEB-INF/template/footer.jsp" %>
<%@ include file="/WEB-INF/template/footer.jsp" %>
Original file line number Diff line number Diff line change
@@ -8,12 +8,7 @@
<h2><openmrs:message code="Form.edit.title"/></h2>

<spring:hasBindErrors name="form">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<c:if test="${form.retired}">
Original file line number Diff line number Diff line change
@@ -25,13 +25,7 @@
</c:if>

<spring:hasBindErrors name="location">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.globalErrors}" var="error">
<openmrs:message code="${error.defaultMessage}" text="${error.defaultMessage}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>
<form method="post">
<fieldset>
Original file line number Diff line number Diff line change
@@ -217,13 +217,7 @@
<h2><openmrs:message code="Obs.title"/></h2>

<spring:hasBindErrors name="obs">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.globalErrors}" var="error">
<openmrs:message code="${error.defaultMessage}" text="${error.defaultMessage}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br/>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<c:if test="${obs.voided}">
Original file line number Diff line number Diff line change
@@ -409,12 +409,7 @@ function generateMergeList(){
</style>

<spring:hasBindErrors name="patient">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<h2><openmrs:message code="Patient.merge.title"/></h2>
Original file line number Diff line number Diff line change
@@ -286,12 +286,7 @@
</openmrs:hasPrivilege>

<spring:hasBindErrors name="patient">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}" arguments="${error.arguments}"/><br/><!-- ${fn:replace(error, '--', '\\-\\-')} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post" onSubmit="removeBlankData()">
Original file line number Diff line number Diff line change
@@ -221,12 +221,7 @@
<openmrs:globalProperty key="use_patient_attribute.mothersName" defaultValue="false" var="showMothersName"/>

<spring:hasBindErrors name="patientModel">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}" arguments="${error.arguments}"/><br/><!-- ${fn:replace(error, '--', '\\-\\-')} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form:form method="post" action="shortPatientForm.form" onsubmit="removeHiddenRows()" modelAttribute="patientModel">
Original file line number Diff line number Diff line change
@@ -263,12 +263,7 @@
</openmrs:hasPrivilege>

<spring:hasBindErrors name="person">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}" arguments="${error.arguments}"/><br/><!-- ${fn:replace(error, '--', '\\-\\-')} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post" onSubmit="removeBlankData()">
Original file line number Diff line number Diff line change
@@ -142,13 +142,7 @@ window.onload = init;


<spring:hasBindErrors name="concept">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<spring:hasBindErrors name="task">
Original file line number Diff line number Diff line change
@@ -140,12 +140,7 @@
<h2><openmrs:message code="Alert.manage.title"/></h2>

<spring:hasBindErrors name="alert">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post">
Original file line number Diff line number Diff line change
@@ -16,13 +16,7 @@
</c:if>

<spring:hasBindErrors name="user">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form id="thisChangePasswordForm" method="post" action="changePassword.form" autocomplete="off">
7 changes: 1 addition & 6 deletions webapp/src/main/webapp/WEB-INF/view/admin/users/roleForm.jsp
Original file line number Diff line number Diff line change
@@ -34,12 +34,7 @@
<h2><openmrs:message code="Role.manage.title"/></h2>

<spring:hasBindErrors name="role">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post">
8 changes: 1 addition & 7 deletions webapp/src/main/webapp/WEB-INF/view/admin/users/userForm.jsp
Original file line number Diff line number Diff line change
@@ -64,13 +64,7 @@
</c:if>

<spring:hasBindErrors name="user">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form id="thisUserForm" method="post" action="user.form" autocomplete="off">
Original file line number Diff line number Diff line change
@@ -104,13 +104,7 @@ $j(document).ready( function() {
</style>

<spring:hasBindErrors name="visit">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}" arguments="${error.arguments}"/><br/>
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<h2>
Original file line number Diff line number Diff line change
@@ -134,13 +134,7 @@
</c:if>

<spring:hasBindErrors name="command">
<openmrs:message code="fix.error"/>
<div class="error">
<c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
</c:forEach>
</div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<c:if test="${command.concept.conceptId != null}">
8 changes: 1 addition & 7 deletions webapp/src/main/webapp/WEB-INF/view/optionsForm.jsp
Original file line number Diff line number Diff line change
@@ -121,13 +121,7 @@ function containsError(element) {
<h2><openmrs:message code="options.title" /></h2>

<spring:hasBindErrors name="opts">
<openmrs:message code="fix.error" />
<div class="error"><c:forEach items="${errors.allErrors}" var="error">
<openmrs:message code="${error.code}" text="${error.code}" />
<br />
<!-- ${error} -->
</c:forEach></div>
<br />
<openmrs_tag:errorNotify errors="${errors}" />
</spring:hasBindErrors>

<form method="post">