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: 4692e978820c
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: f338537806ef
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 10, 2014

  1. TRUNK-4294

    ujjwalarora committed Mar 10, 2014
    Copy the full SHA
    2930fc8 View commit details

Commits on Mar 12, 2014

  1. Merge pull request #769 from ujjwalarora/TRUNK-4294-b

    TRUNK-4294  [Add User] Password requirements should be shown beforehand as per the global properties
    rkorytkowski committed Mar 12, 2014
    Copy the full SHA
    f338537 View commit details
Showing with 23 additions and 3 deletions.
  1. +2 −1 webapp/src/main/webapp/WEB-INF/messages.properties
  2. +21 −2 webapp/src/main/webapp/WEB-INF/view/admin/users/userForm.jsp
3 changes: 2 additions & 1 deletion webapp/src/main/webapp/WEB-INF/messages.properties
Original file line number Diff line number Diff line change
@@ -238,6 +238,8 @@ general.alert.privilegesForPageOnException={0}, User {1} was missing these or so
general.alertSystemAdmin=Alert System Administrator
general.alertSent=Alert Sent
general.noresult=No Results
general.passwordLength=Password should be {0} characters long
general.shouldHave=and should have

##### SEARCH WIDGET MESSAGES ######
searchWidget.sInfoLabel=Showing {0} to {1} of {2} entries
@@ -1884,7 +1886,6 @@ error.username.taken=Username or System Id taken. Please choose a different one.
error.username.pattern=Username is invalid. It must be between 2 and 50 characters. Only letters, digits, ".", "-", and "_" are allowed.
User.password=Password
User.usersPassword=User's Password
User.password.description=Must have at least 8 characters, an uppercase letter, and a number
error.password.match=The provided passwords do not match
error.password.weak=Please choose a stronger password
error.password.length=Please choose a password that is at least {0} characters long
23 changes: 21 additions & 2 deletions webapp/src/main/webapp/WEB-INF/view/admin/users/userForm.jsp
Original file line number Diff line number Diff line change
@@ -144,8 +144,27 @@
<c:if test="${modifyPasswords == true}">
<tr>
<td><openmrs:message code="User.usersPassword" /><span class="required">*</span></td>
<td><input type="password" name="userFormPassword" value="<c:if test="${isNewUser == false}">XXXXXXXXXXXXXXX</c:if>" autocomplete="off"/></td>

<td><input type="password" name="userFormPassword" value="<c:if test="${isNewUser == false}">XXXXXXXXXXXXXXX</c:if>" autocomplete="off"/>

<openmrs:globalProperty key="security.passwordMinimumLength" var="passwordMinimumLength"/>
<openmrs:globalProperty key="security.passwordRequiresDigit" var="passwordRequiresDigit"/>
<openmrs:globalProperty key="security.passwordRequiresNonDigit" var="passwordRequiresNonDigit"/>
<openmrs:globalProperty key="security.passwordRequiresUpperAndLowerCase" var="passwordRequiresUpperAndLowerCase"/>

<i><openmrs:message code="general.passwordLength" arguments="${passwordMinimumLength}" />

<% boolean prevCondition=false; %>

<c:if test="${passwordRequiresUpperAndLowerCase == true || passwordRequiresDigit == true || passwordRequiresNonDigit == true}"> <openmrs:message code="general.shouldHave" /></c:if>

<c:if test="${passwordRequiresUpperAndLowerCase == true}" > <openmrs:message code="changePassword.hint.password.bothCasesRequired" /><% prevCondition=true; %></c:if>

<c:if test="${passwordRequiresDigit == true}" ><% if(prevCondition==true) out.print(","); %> <openmrs:message code="changePassword.hint.password.digitRequired" /><% prevCondition=true; %></c:if>

<c:if test="${passwordRequiresNonDigit == true}" ><% if(prevCondition==true) out.print(","); %> <openmrs:message code="changePassword.hint.password.nonDigitRequired" /></c:if>

</i>
</td>
</tr>
<tr>
<td><openmrs:message code="User.confirm" /><span class="required">*</span></td>