pagestandard.jsp
来自「开源项目CRM之OpenCustomer」· JSP 代码 · 共 201 行
JSP
201 行
<%-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is the OpenCustomer CRM.
-
- The Initial Developer of the Original Code is
- Thomas Bader (Bader & Jene Software-Ingenieurb黵o).
- Portions created by the Initial Developer are Copyright (C) 2005
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Thomas Bader <thomas.bader@bader-jene.de>
-
- ***** END LICENSE BLOCK ***** --%>
<%@ include file="/tiles/page.jsp" %>
<%@ page import="org.opencustomer.application.web.module.system.user.manage.Constants" %>
<%@ page import="org.opencustomer.application.web.Globals" %>
<%@ page import="org.opencustomer.web.util.TagUtility" %>
<%@ page import="org.opencustomer.application.auth.Right" %>
<%@ page import="org.opencustomer.application.db.vo.system.UserVO" %>
<tiles:insert definition="system.user.edit">
<tiles:put name="page.content">
<%
boolean isActiveUser = TagUtility.lookupString(pageContext, Globals.USER_KEY, "id", "session").equals(TagUtility.lookupString(pageContext, Constants.USER_USER, "id", "session"));
UserVO user = (UserVO)pageContext.getSession().getAttribute(Constants.USER_USER);
%>
<html:form action="/system/user/manage/edit/processPageStandard" focus="userName" styleClass="default">
<html:errors/>
<div class="page">
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="userName" errorStyleId="error"><bean:message key="entity.user.userName"/></buj:label>
</td>
<td>
<html:text property="userName" styleId="userName" maxlength="255" styleClass="full" disabled="<%=isActiveUser%>"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="password" errorStyleId="error"><bean:message key="entity.user.password"/></buj:label>
</td>
<td>
<html:password property="password" styleId="password" maxlength="255" styleClass="full" disabled="<%=isActiveUser%>"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="locked" errorStyleId="error"><bean:message key="entity.user.locked"/></buj:label>
</td>
<td>
<html:checkbox property="locked" styleId="locked" value="true" disabled="<%=isActiveUser%>"/>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="person" errorStyleId="error"><bean:message key="entity.crm.person"/></buj:label>
</td>
<td>
<logic:present name="<%=Constants.USER_USER%>" property="person" scope="session">
<bean:write name="<%=Constants.USER_USER%>" property="person.firstName" scope="session"/> <bean:write name="<%=Constants.USER_USER%>" property="person.lastName" scope="session"/>
</logic:present>
<logic:notPresent name="<%=Constants.USER_USER%>" property="person" scope="session">
---
</logic:notPresent>
</td>
<td class="action">
<buj:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>">
<html:image property="doAddPerson" pageKey="icon.add.url" titleKey="icon.add.text" altKey="icon.add.text"/>
</buj:authenticate>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="roleId" errorStyleId="error"><bean:message key="entity.role"/></buj:label>
</td>
<td>
<html:select property="roleId" styleId="roleId" styleClass="full" disabled="<%=isActiveUser%>">
<html:options collection="<%=Constants.USER_ROLES%>" property="id" labelProperty="name"/>
</html:select>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="usergroup" errorStyleId="error"><bean:message key="entity.usergroup"/></buj:label>
</td>
<td>
<div style="margin-top: 5px;">
<table class="inner">
<tr>
<td colspan="2" class="action">
<buj:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>"><%
if(!isActiveUser) { %>
<html:image property="doAddUsergroup" pageKey="icon.add.url" titleKey="icon.add.text" altKey="icon.add.text"/><%
} else { %>
<html:image property="doAddUsergroup" pageKey="icon.add_grey.url" titleKey="icon.add_grey.text" altKey="icon.add_grey.text" disabled="true"/><%
}%>
</buj:authenticate>
</td>
</tr>
<logic:present name="<%=Constants.USER_USER%>" property="usergroups" scope="session">
<logic:iterate id="data" name="<%=Constants.USER_USER%>" property="usergroups" scope="session" indexId="index">
<tr>
<td>
<bean:write name="data" property="name" scope="page"/>
</td>
<td class="action">
<buj:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>"><%
if(user.getUsergroups().size() > 1 && !isActiveUser) { %>
<html:image property="<%="doDeleteUsergroup_"+TagUtility.lookupString(pageContext, "data", "id", "page")%>" pageKey="icon.delete.url" titleKey="icon.delete.text" altKey="icon.delete.text"/><%
} else { %>
<html:image property="<%="doDeleteUsergroup_"+TagUtility.lookupString(pageContext, "data", "id", "page")%>" pageKey="icon.delete_grey.url" titleKey="icon.delete_grey.text" altKey="icon.delete_grey.text" disabled="true"/><%
} %>
</buj:authenticate>
</td>
</tr>
</logic:iterate>
</logic:present>
</table>
</div>
<div style="margin: 10px 0px 5px 0px; font-weight: bold;">
<buj:label property="mainUsergroupId" errorStyleId="error"><bean:message key="domain.system.usergroup.mainUsergroup"/></buj:label>
</div>
<div>
<html:select property="mainUsergroupId" styleId="mainUsergroupId" styleClass="full" disabled="<%=isActiveUser%>">
<html:optionsCollection name="<%=Constants.USER_USER%>" property="usergroups" label="name" value="id"/>
</html:select>
</div>
</td>
</tr>
</table>
</fieldset>
<fieldset class="unit">
<table>
<tr>
<td class="label">
<buj:label property="lastLogin" errorStyleId="error"><bean:message key="entity.user.lastLogin"/></buj:label>
</td>
<td>
<bean:write name="<%=Constants.USER_USER%>" property="lastLogin" scope="session" formatKey="format.date.datetime"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="failedLogins" errorStyleId="error"><bean:message key="entity.user.failedLogins"/></buj:label>
</td>
<td>
<bean:write name="<%=Constants.USER_USER%>" property="failedLogins" scope="session"/>
</td>
</tr>
<tr>
<td class="label">
<buj:label property="lastFailedLogin" errorStyleId="error"><bean:message key="entity.user.lastFailedLogin"/></buj:label>
</td>
<td>
<bean:write name="<%=Constants.USER_USER%>" property="lastFailedLogin" scope="session" formatKey="format.date.datetime"/>
</td>
</tr>
</table>
</fieldset>
<fieldset class="action">
<buj:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>">
<% if(!isActiveUser && user.getId() != null) { %>
<html:submit property="doDelete" styleClass="left"><bean:message key="image.button.delete.text"/></html:submit>
<% } else { %>
<html:submit property="doDelete" styleClass="left" disabled="true"><bean:message key="image.button.delete.text"/></html:submit>
<% } %>
</buj:authenticate>
<html:submit property="doCancel"><bean:message key="image.button.cancel.text"/></html:submit>
<buj:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>">
<html:submit property="doSave"><bean:message key="image.button.save.text"/></html:submit>
</buj:authenticate>
</fieldset>
</div>
</html:form>
</tiles:put>
</tiles:insert>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?