⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editsecuritygroup.jsp

📁 国外的一套开源CRM
💻 JSP
字号:
<%--
 *  Copyright (c) 2001 The Open For Business Project - www.ofbiz.org
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a 
 *  copy of this software and associated documentation files (the "Software"), 
 *  to deal in the Software without restriction, including without limitation 
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 *  and/or sell copies of the Software, and to permit persons to whom the 
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included 
 *  in all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
 *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
 *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 
 *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 
 *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 *@author     David E. Jones
 *@created    May 10 2002
 *@version    1.0
--%>
<%try {%>
<%@ page import="java.util.*, java.io.*" %>
<%@ page import="org.ofbiz.base.util.*, org.ofbiz.entity.*" %>

<%@ taglib uri="ofbizTags" prefix="ofbiz" %>
<jsp:useBean id="delegator" type="org.ofbiz.entity.GenericDelegator" scope="request" />
<jsp:useBean id="security" type="org.ofbiz.security.Security" scope="request" />

<table cellpadding=0 cellspacing=0 border=0 width="100%"><tr><td>&nbsp;&nbsp;</td><td>

<%if(security.hasEntityPermission("SECURITY", "_VIEW", session)) {%>
<%
    boolean tryEntity = true;
    if(request.getAttribute("_ERROR_MESSAGE_") != null) tryEntity = false;

    String groupId = request.getParameter("groupId");
    if (UtilValidate.isEmpty(groupId) && UtilValidate.isNotEmpty((String) request.getAttribute("groupId"))) {
        groupId = (String) request.getAttribute("groupId");
    }
    GenericValue securityGroup = delegator.findByPrimaryKey("SecurityGroup", UtilMisc.toMap("groupId", groupId));
    if (securityGroup == null) {
        tryEntity = false;
    } else {
        pageContext.setAttribute("securityGroup", securityGroup);
    }
%>

<a href="<ofbiz:url>/FindSecurityGroup</ofbiz:url>" class="buttontext">[All SecurityGroups]</a>
<a href="<ofbiz:url>/EditSecurityGroup</ofbiz:url>" class="buttontext">[New SecurityGroup]</a>
<%if(groupId != null && groupId.length() > 0){%>
  <a href="<ofbiz:url>/EditSecurityGroup?groupId=<%=groupId%></ofbiz:url>" class="buttontextdisabled">[SecurityGroup]</a>
  <a href="<ofbiz:url>/EditSecurityGroupPermissions?groupId=<%=groupId%></ofbiz:url>" class="buttontext">[Permissions]</a>
  <a href="<ofbiz:url>/EditSecurityGroupUserLogins?groupId=<%=groupId%></ofbiz:url>" class="buttontext">[UserLogins]</a>
<%}%>

<div class="head1">Edit SecurityGroup with ID "<%=UtilFormatOut.checkNull(groupId)%>"</div>
<%if (securityGroup == null) {%>
  <%if (groupId != null) {%>
    <form action="<ofbiz:url>/createSecurityGroup</ofbiz:url>" method=POST style='margin: 0;'>
    <table border='0' cellpadding='2' cellspacing='0'>
    <h3>Could not find securityGroup with ID "<%=groupId%>".</h3>
      <tr>
        <td align=right><div class="tabletext">SecurityGroup ID</div></td>
        <td>&nbsp;</td>
        <td>
          <input type=text name='groupId' class="inputBox" value='<%=groupId%>' size='20'>
        </td>
      </tr>
  <%} else {%>
    <form action="<ofbiz:url>/createSecurityGroup</ofbiz:url>" method=POST style='margin: 0;'>
    <table border='0' cellpadding='2' cellspacing='0'>
      <tr>
        <td align=right><div class="tabletext">SecurityGroup ID</div></td>
        <td>&nbsp;</td>
        <td>
          <input type=text name='groupId' class="inputBox" value='' size='20'>
        </td>
      </tr>
  <%}%>
<%} else {%>
  <form action="<ofbiz:url>/updateSecurityGroup</ofbiz:url>" method=POST style='margin: 0;'>
  <table border='0' cellpadding='2' cellspacing='0'>
  <input type=hidden name="groupId" value="<%=groupId%>">
  <tr>
    <td align=right><div class="tabletext">SecurityGroup ID</div></td>
    <td>&nbsp;</td>
    <td>
      <b><%=groupId%></b> (This cannot be changed without re-creating the securityGroup.)
    </td>
  </tr>
<%}%>
      <tr>
        <td width="26%" align=right><div class="tabletext">Description</div></td>
        <td>&nbsp;</td>
        <td width="74%"><input type="text" class="inputBox" <ofbiz:inputvalue entityAttr="securityGroup" field="description" fullattrs="true"/> size="60" maxlength="250"></td>
      </tr>

  <tr>
    <td colspan='1' align=right><input type="submit" name="Update" value="Update"></td>
    <td colspan='2'>&nbsp;</td>
  </tr>
</table>
</form>

<%} else {%>
  <h3>You do not have permission to view this page. ("SECURITY_VIEW" or "SECURITY_ADMIN" needed)</h3>
<%}%>
</td><td>&nbsp;&nbsp;</td></tr></table>
<%} catch (Exception e) { Debug.log(e); throw e; } %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -