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

<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
FlowSetup FlowPackage= new FlowSetup();
String ID = request.getParameter("SelectedItems");
Button Bt = FlowPackage.getButtonID(ID);
%>
<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 src="../../../zrsysmanage/html5/script/jquery-2.0.3.min.js" type="text/jscript" ></script>
<script src="../../../zrsysmanage/html5/layer/layer.js" type="text/jscript" ></script>
<script language="JavaScript" type="">
function Check(theForm){
if (theForm.NAME.value == ""){
    <%if(user.getUserWINDOWTYPE().equals("6")){%>
      layer.alert('按钮运转名称不能为空！', {icon: 7});
    <%}else{%>
      alert("按钮运转名称不能为空！");
    <%}%>
    theForm.NAME.focus();
    return (false);
  }
 RegForm.Act.value='edit';
  return true;
}
function Check1(theForm)
{
  if (confirm("确定要删除当前选中的流程按钮吗？"))
  {RegForm.Act.value='del';
  return true;}
  else
  {return false;}
}
</script>
</HEAD>
<BODY class="BodyMain">
<FORM action="../../../flowbutton.do" method="post" name="RegForm" onsubmit="return Check(this);">
<input type="hidden" name="ID" value='<%=ID%>' >
<input type="hidden" name="UNIT" value="<%=user.getUnitID()%>">
<input type="hidden" name="Act" value="edit">

<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<%=userUI.ShowHeadHtml("流程按钮管理",user.getUserImage())%>
<%=userUI.ShowBodyStartHtml()%>
<%}%>
 <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="BNAME" size="51" maxlength="50" value="<%=Bt.getBNAME()%>"></td>
             </tr>
             <tr>
               <td class="inputTdtitle">按钮运转名称：</td>
               <td class="inputTd"><input class="text" type="text" name="NAME" size="51"  value="<%=Bt.getNAME()%>" maxlength="20"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">按钮类别：</td>
                <TD>
                    <select name="TYPE"  style="width:320px">
                       <option value="1" <% if (Bt.getTYPE().equals("1")){%>selected<%}%>>功能按钮
                       <option value="2" <% if (Bt.getTYPE().equals("2")){%>selected<%}%>>文档按钮
                       <option value="3" <% if (Bt.getTYPE().equals("3")){%>selected<%}%>>控制按钮
                       <option value="4" <% if (Bt.getTYPE().equals("4")){%>selected<%}%>>公共功能按钮
                       <option value="5" <% if (Bt.getTYPE().equals("5")){%>selected<%}%>>公共已分配按钮
                       <option value="6" <% if (Bt.getTYPE().equals("6")){%>selected<%}%>>流程创建人按钮
                    </select>
                </TD>
           </tr>
           <tr>
               <td class="inputTdtitle">按钮布局分类：</td>
                <TD>
                    <select name="POSITION" style="width:320px">
                       <option value="1" <% if (Bt.getPOSITION().equals("1")){%>selected<%}%>>页面上
                       <option value="2" <% if (Bt.getPOSITION().equals("2")){%>selected<%}%>>页面下
                       <option value="3" <% if (Bt.getPOSITION().equals("3")){%>selected<%}%>>页面上和下
                    </select>
                </TD>
           </tr>
            <tr>
               <td class="inputTdtitle">按钮图标：</td>
               <td class="inputTd"><input class="text" type="text" name="ICO" size="51"  value="<%=Bt.getICO()%>" maxlength="50"></td>
           </tr>
         <tr>
                  <td class="inputTdtitle" valign="top">HTML/TXT值：</td>
                  <td class="inputTd">
                  <textarea name="PROPERTY" rows="5" cols="50"><%=Bt.getPROPERTY()%></textarea>
        </td>
      </tr>
      <tr>
               <td class="inputTdtitle">所属用户组或角色编号：</td>
                <TD><input class="text" type="text" name="ROLEIDS" size="51" maxlength="900" value="<%=Bt.getROLEIDS()%>"><Font class="WriteSign">提示：对于已经完成流程的按钮控制时使用(如打印)。<font></TD>
      </tr>
      <tr>
               <td class="inputTdtitle">排序号：</td>
                <TD><input class="text" type="text" name="CODE" size="51" maxlength="4" value="<%=Bt.getCODE()%>"></TD>
      </tr>

          </table>
          <br>
          </fieldset>
                 <center><br>

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

<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
<%}%>
<%
//清空相关对象
user = null;
userUI = null;
FlowPackage = null;
Bt = null;
%>
</FORM>
</BODY>
</HTML>
