<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.queryengine.mode.QUERY_CONFIG_BUTTON"%>
<%@ page import = "zr.zrpower.queryengine.service.QueryButton"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>

<%@ page import = "java.lang.Object"%>

<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
QueryButton QueryBtMsg= new QueryButton();

String ID = request.getParameter("SelectedItems");
QUERY_CONFIG_BUTTON Bt = QueryBtMsg.getButtonByID(ID);

String FID=request.getParameter("FID");
if (FID==null){FID="0";}

%>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<LINK type="text/css" rel="stylesheet" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>
<script language="JavaScript" type="text/javascript">
function Check(){

if (document.RegForm.NAME.value == ""){
    alert("按钮名称不能为空！");
    document.RegForm.NAME.focus();
    return (false);
  }
  document.RegForm.Act.value='edit';
  document.RegForm.submit();
}
function Check1()
{
  if (confirm("确定要删除当前选中的按钮吗？"))
  {
     document.RegForm.Act.value='del';
     document.RegForm.submit();
  }
}
</script>
</HEAD>
<BODY class="BodyMain">
<FORM action="../../queryconfigbutton.do" method="post" name="RegForm" >
<input type="hidden" name="ID" value='<%=ID%>' >
<input type="hidden" name="FID" value='<%=FID%>' >
<input type="hidden" name="Act" value="edit">

 <br>&nbsp;
           <DIV id="divMessage" style='padding-left:0;padding-top:0;width:96%;height:100%;overflow:auto'>
           <fieldset>
           <legend>编辑流程按钮信息</legend>
           <table border="0" class="inputTable" cellspacing="0" cellpadding="0" align="center">
             <tr>
               <td class="inputTdtitle">按钮名称：</td>
               <td class="inputTd"><input class="text" type="text" name="NAME" size="51"  value="<%=Bt.getNAME()%>" maxlength="50"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">按钮运转名称：</td>
               <td class="inputTd"><input class="text" type="text" name="RUNNAME" size="51" value="<%=Bt.getRUNNAME()%>"  maxlength="50"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">图标：</td>
               <td class="inputTd"><input class="text" type="text" name="ICO" size="51"  value="<%=Bt.getICO()%>" maxlength="20"></td>
           </tr>
            <tr>
               <td class="inputTdtitle">链接地址或js函数：</td>
               <td class="inputTd"><input class="text" type="text" name="PATHORJS" size="51"  value="<%=Bt.getPATHORJS()%>" maxlength="300"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">所属角色编号：</td>
               <td class="inputTd"><input class="text" type="text" name="ROLEIDS" size="51" maxlength="100"  value="<%=Bt.getROLEIDS()%>">
               <br>
               说明：
               <font color="#FF3300">
               不设置时表示所有人都有操作权限，多个角色编号间用逗号分隔，如1,2,3。
               </font>
               </td>
           </tr>
           <tr>
               <td class="inputTdtitle">排序号：</td>
               <td class="inputTd"><input class="text" type="text" name="BCODE" size="51" maxlength="4" value="<%=Bt.getBCODE()%>"></td>
           </tr>
          </table>
          <br>
          </fieldset>
                 <center><br>

                  <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton1("保 存","Check();","buttonSave.gif",user.getUserImage())%>
                 <%=userUI.ClickButton1("删 除","Check1();","buttonDelete.gif",user.getUserImage())%>
                 <%=userUI.ClickButton1("重 填","JavaScript:document.RegForm.reset();","buttonReset.gif",user.getUserImage())%>
                 <%=userUI.ClickButton1("返 回","JavaScript:history.back();","buttonReturn.gif",user.getUserImage())%>
                 </tr></table>
                 </center>
  </DIV>

</FORM>
</BODY>
</HTML>
