Permalink
Browse files

Modified: wflow-directory, wflow-consoleweb - Support for dot (.) in …

…username #682.

git-svn-id: http://dev.joget.org/svn/jw-community/trunk@388 1bff935d-2fe2-40b7-b00f-c2aca69a7612
  • Loading branch information...
1 parent 69bb174 commit 8fd1af7c61dffd007b680fe37476e893bf64cdc9 julian committed May 29, 2012
@@ -968,7 +968,7 @@ public String consoleUserSubmit(ModelMap model, @RequestParam("action") String a
String contextPath = WorkflowUtil.getHttpServletRequest().getContextPath();
String url = contextPath;
- url += "/web/console/directory/user/view/" + user.getId();
+ url += "/web/console/directory/user/view/" + user.getId() + ".";
model.addAttribute("url", url);
return "console/dialogClose";
}
@@ -123,7 +123,7 @@
${participantDisplayName}
</c:when>
<c:otherwise>
- <a href="${pageContext.request.contextPath}/web/console/directory/${participantMap[participantUid].type}/view/${participantValue}">${participantDisplayName}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/${participantMap[participantUid].type}/view/${participantValue}.">${participantDisplayName}</a>
</c:otherwise>
</c:choose>
</span>
@@ -29,6 +29,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -56,7 +56,7 @@
<label for="field1"><fmt:message key="console.directory.department.common.label.hod"/></label>
<span class="form-input">
<c:if test="${!empty hod}">
- <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${hod.id}">${hod.username}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${hod.id}.">${hod.username}</a>
</c:if>
</span>
</div>
@@ -114,6 +114,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -66,6 +66,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -52,6 +52,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -132,6 +132,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="user.id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -149,7 +149,7 @@
function validateField(){
var valid = true;
var alertString = "";
- var idMatch = /^[0-9a-zA-Z_-]+$/.test($("#username").attr("value"));
+ var idMatch = /^[\.0-9a-zA-Z_-]+$/.test($("#username").attr("value"));
if(!idMatch){
if(!idMatch){
alertString += '<fmt:message key="console.directory.user.error.label.usernameInvalid"/>';
@@ -42,6 +42,7 @@
desc="false"
href="${pageContext.request.contextPath}/web/console/directory/user/view"
hrefParam="id"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -125,7 +125,7 @@
<label for="field1"><fmt:message key="console.directory.employment.common.label.reportTo"/></label>
<span class="form-input">
<c:if test="${!empty employment.employmentReportTo && !empty employment.employmentReportTo.reportTo && !empty employment.employmentReportTo.reportTo.user}">
- <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${employment.employmentReportTo.reportTo.user.id}">${employment.employmentReportTo.reportTo.user.firstName} ${employment.employmentReportTo.reportTo.user.lastName}</a>
+ <a href="${pageContext.request.contextPath}/web/console/directory/user/view/${employment.employmentReportTo.reportTo.user.id}.">${employment.employmentReportTo.reportTo.user.firstName} ${employment.employmentReportTo.reportTo.user.lastName}</a>
</c:if>
</span>
</div>
@@ -184,7 +184,7 @@
</c:if>
});
- <ui:popupdialog var="popupDialog" src="${pageContext.request.contextPath}/web/console/directory/user/edit/${user.id}"/>
+ <ui:popupdialog var="popupDialog" src="${pageContext.request.contextPath}/web/console/directory/user/edit/${user.id}."/>
<ui:popupdialog var="popupDialog2" src="${pageContext.request.contextPath}/web/console/directory/user/${user.id}/group/assign/view"/>
<ui:popupdialog var="popupDialog3" src="${pageContext.request.contextPath}/web/console/directory/user/${user.id}/reportTo/assign/view"/>
@@ -221,7 +221,7 @@
if (confirm('<fmt:message key="console.directory.user.reportTo.unassign.label.confirmation"/>')) {
var callback = {
success : function() {
- document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}';
+ document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}.';
}
}
var request = ConnectionManager.post('${pageContext.request.contextPath}/web/console/directory/user/${user.id}/reportTo/unassign', callback, '');
@@ -232,7 +232,7 @@
if (confirm('<fmt:message key="console.directory.user.group.unassign.label.confirmation"/>')) {
var callback = {
success : function() {
- document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}';
+ document.location = '${pageContext.request.contextPath}/web/console/directory/user/view/${user.id}.';
}
}
var request = ConnectionManager.post('${pageContext.request.contextPath}/web/console/directory/user/${user.id}/group/unassign', callback, 'ids='+ selectedIds);
@@ -27,6 +27,7 @@
desc="false"
href=""
hrefParam="username"
+ hrefSuffix="."
hrefQuery="false"
hrefDialog="false"
hrefDialogWidth="600px"
@@ -12,6 +12,7 @@
<%@ attribute name="href" %>
<%@ attribute name="hrefParam" %>
<%@ attribute name="hrefQuery" %>
+<%@ attribute name="hrefSuffix" %>
<%@ attribute name="hrefDialog" %>
<%@ attribute name="hrefDialogWidth" %>
<%@ attribute name="hrefDialogHeight" %>
@@ -250,6 +251,9 @@
</c:if>
<c:if test="${!empty href}">
${var}.link = new Link("${href}", "${hrefParam}", ${hrefQuery}, ${var}_popupDialog);
+ <c:if test="${!empty hrefSuffix}">
+ ${var}.link.suffix = "${hrefSuffix}";
+ </c:if>
</c:if>
<c:if test="${empty hrefDialogWidth}">${var}_popupDialog.width="${hrefDialogWidth}";</c:if>
<c:if test="${empty hrefDialogHeight}">${var}_popupDialog.height="${hrefDialogHeight}";</c:if>
@@ -157,6 +157,7 @@ Link.prototype = {
href: null,
param: null,
value: null,
+ suffix: null,
queryString: false,
popupDialog: null,
@@ -169,6 +170,9 @@ Link.prototype = {
link += "/";
}
link += escape(this.value);
+ if (this.suffix) {
+ link += this.suffix;
+ }
}
else {
var hasQueryString = link.indexOf("?") >= 0;
@@ -14,7 +14,7 @@
public static final int INACTIVE = 0;
private String id;
@NotBlank
- @RegExp(value = "^[0-9a-zA-Z_-]+$")
+ @RegExp(value = "^[.0-9a-zA-Z_-]+$")
private String username;
private String password;
@NotBlank

0 comments on commit 8fd1af7

Please sign in to comment.