pagestandard.jsp

来自「开源项目CRM之OpenCustomer」· JSP 代码 · 共 211 行

JSP
211
字号
<%-- ***** 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.crm.person.Constants" %>
<%@ page import="org.opencustomer.application.db.vo.crm.PersonVO" %>
<%@ page import="org.opencustomer.web.util.TagUtility" %>
<%@ page import="org.opencustomer.application.auth.Right" %>

<tiles:insert definition="crm.person.edit">
	<tiles:put name="page.content">

	<html:form action="/crm/person/edit/processPageStandard" focus="gender" styleClass="default">
		<html:errors/>
		<div class="slider">
			<html:submit property="doPageStandard" disabled="true" styleClass="active"><bean:message key="domain.crm.person.pageStandard"/></html:submit>
            <buj:authenticate right="<%=Right.CRM_CONTACTS_READ.getLabel()+","+Right.CRM_CONTACTS_WRITE.getLabel()%>">
            <logic:notPresent name="<%=Constants.PERSON_PERSON%>" property="id" scope="session">
            <html:submit property="doPageContact" styleClass="inactive"><bean:message key="domain.crm.person.pageContact"/></html:submit>
            </logic:notPresent>
			<logic:present name="<%=Constants.PERSON_PERSON%>" property="id" scope="session">
			<html:submit property="doPageContact"><bean:message key="domain.crm.person.pageContact"/></html:submit>
			</logic:present>
			</buj:authenticate>
		</div>
		<div class="tabbedPage">
			<fieldset class="unit">
				<legend><bean:message key="domain.crm.person.block.common"/></legend>
				<table>
					<tr>
						<td class="label">
							<buj:label property="gender" errorStyleId="error"><bean:message key="entity.crm.person.gender"/></buj:label>
						</td>
						<td>
							<html:select property="gender" styleId="gender">
								<html:option key="entity.crm.person.gender.unknown" value="<%=PersonVO.Gender.UNKNOWN.toString()%>"/>
								<html:option key="entity.crm.person.gender.male" value="<%=PersonVO.Gender.MALE.toString()%>"/>
								<html:option key="entity.crm.person.gender.female" value="<%=PersonVO.Gender.FEMALE.toString()%>"/>
							</html:select>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="title" errorStyleId="error"><bean:message key="entity.crm.person.title"/></buj:label>
						</td>
						<td>
							<html:text property="title" styleId="title" maxlength="255" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="firstName" errorStyleId="error"><bean:message key="entity.crm.person.firstName"/></buj:label>
						</td>
						<td>
							<html:text property="firstName" styleId="firstName" maxlength="255" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="lastName" errorStyleId="error"><bean:message key="entity.crm.person.lastName"/></buj:label>
						</td>
						<td>
							<html:text property="lastName" styleId="lastName" maxlength="255" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="nameAffix" errorStyleId="error"><bean:message key="entity.crm.person.nameAffix"/></buj:label>
						</td>
						<td>
							<html:text property="nameAffix" styleId="nameAffix" maxlength="255" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="degree" errorStyleId="error"><bean:message key="entity.crm.person.degree"/></buj:label>
						</td>
						<td>
							<html:text property="degree" styleId="degree" maxlength="255" styleClass="full"/>
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="unit">
				<legend><bean:message key="domain.crm.person.block.company"/></legend>
				<table>
					<tr>
						<td class="label">
							<buj:label property="function" errorStyleId="error"><bean:message key="entity.crm.person.function"/></buj:label>
						</td>
						<td colspan="2">
							<html:text property="function" styleId="function" maxlength="255" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="phone" errorStyleId="error"><bean:message key="entity.crm.company.companyName"/></buj:label>
						</td>
						<td>
							<logic:present name="<%=Constants.PERSON_PERSON%>" property="company" scope="session">
							<bean:write name="<%=Constants.PERSON_PERSON%>" property="company.companyName" scope="session"/>
							</logic:present>
							<logic:notPresent name="<%=Constants.PERSON_PERSON%>" property="company" scope="session">
							---
							</logic:notPresent>
						</td>
						<td class="action">
							<buj:authenticate right="<%=Right.CRM_PERSONS_WRITE.getLabel()%>">
							<html:image property="doAddCompany" pageKey="icon.add.url" titleKey="icon.add.text" altKey="icon.add.text"/>
							</buj:authenticate>
							<logic:present name="<%=Constants.PERSON_PERSON%>" property="company" scope="session">
							<html:image property="doJumpCompany" pageKey="icon.jump.url" titleKey="icon.jump.text" altKey="icon.jump.text"/>
							</logic:present>
							<logic:notPresent name="<%=Constants.PERSON_PERSON%>" property="company" scope="session">
							<html:img styleClass="action" pageKey="icon.jump_grey.url" titleKey="icon.jump_grey.text" altKey="icon.jump_grey.text"/>
							</logic:notPresent>
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="unit">
				<legend><bean:message key="domain.crm.person.block.communication"/></legend>
				<table>
					<tr>
						<td class="label">
							<buj:label property="phone" errorStyleId="error"><bean:message key="entity.crm.person.phone"/></buj:label>
						</td>
						<td>
							<html:text property="phone" styleId="phone" maxlength="50" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="mobile" errorStyleId="error"><bean:message key="entity.crm.person.mobile"/></buj:label>
						</td>
						<td>
							<html:text property="mobile" styleId="mobile" maxlength="50" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="fax" errorStyleId="error"><bean:message key="entity.crm.person.fax"/></buj:label>
						</td>
						<td>
							<html:text property="fax" styleId="fax" maxlength="50" styleClass="full"/>
						</td>
					</tr>
					<tr>
						<td class="label">
							<buj:label property="email" errorStyleId="error"><bean:message key="entity.crm.person.email"/></buj:label>
						</td>
						<td>
							<html:text property="email" styleId="email" maxlength="255" styleClass="full"/>
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="unit">
				<legend><buj:label property="comment" errorStyleId="error"><bean:message key="entity.crm.person.comment"/></buj:label></legend>
				<table>
					<tr>
						<td>
							<html:textarea property="comment" styleId="comment"/>
						</td>
					</tr>
				</table>
			</fieldset>
			<fieldset class="action">
				<buj:authenticate right="<%=Right.CRM_PERSONS_WRITE.getLabel()%>"><%
            	Object id   = TagUtility.lookup(pageContext, Constants.PERSON_PERSON, "id", "session");
	            Object user = TagUtility.lookup(pageContext, Constants.PERSON_PERSON, "user", "session");
                if(user != null || id == null) { %>
				<html:submit property="doDelete" styleClass="left" disabled="true"><bean:message key="image.button.delete.text"/></html:submit><%
				} else { %>
				<html:submit property="doDelete" styleClass="left"><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.CRM_PERSONS_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 + -
显示快捷键?