📄 mod.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ include file="/common/common.inc"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="<%=path%>/resources/img/emx_nav_left.css"
type="text/css" />
<link rel="stylesheet"
href="<%=path%>/resources/css/validation/style.css" type="text/css" />
</head>
<script type="text/javascript">
function getLeftValue(){
var arr=new Array();
for(var i=0;i<$('in_usergroup').length;i++){
if($('in_usergroup').options[i].selected){
var op_value=$('in_usergroup')[i].value;
var op_text=$('in_usergroup').options[i].text;
$('out_usergroup').add(new Option(op_text,op_value));
}
}
for(var j=0;j<$('in_usergroup').length;j++){
if($('in_usergroup').options[j].selected){
alert($('in_usergroup').options[j].text);
$('in_usergroup').options[$('in_usergroup').options.selectedIndex] = null;
}
}
}
function dbRigthValue(){
var op_text=$('out_usergroup').options[$('out_usergroup').options.selectedIndex].text
var op_value=$('out_usergroup').options[$('out_usergroup').options.selectedIndex].value
for(var i=0;i<$('in_usergroup').length;i++){
if($('in_usergroup')[i].value == op_value){
$('out_usergroup').options[$('out_usergroup').options.selectedIndex] = null;
return false;
}
}
$('in_usergroup').add(new Option(op_text,op_value));
$('out_usergroup').options[$('out_usergroup').options.selectedIndex] = null;
}
function dbLeftValue(){
var op_text=$('in_usergroup').options[$('in_usergroup').options.selectedIndex].text
var op_value=$('in_usergroup').options[$('in_usergroup').options.selectedIndex].value
for(var i=0;i<$('out_usergroup').length;i++){
if($('out_usergroup')[i].value == op_value){
alert('该组已经添加了,请选择其他');
return false;
}
}
$('out_usergroup').add(new Option(op_text,op_value));
$('in_usergroup').options[$('in_usergroup').options.selectedIndex] = null;
}
</script>
<script type="text/javascript">
var comma=',';
function setChecked(state,sex){
if(state=='1'){
formUnify.state1.checked=true
}else{
formUnify.state0.checked=true
}
if(sex=='M'){
formUnify.sexM.checked=true;
}else{
formUnify.sexW.checked=true;
}
}
function doEdit(url){
alert($('out_usergroup').length);
for(var i=0;i<$('out_usergroup').length;i++){
$('hid_usergroup').value += $('out_usergroup').options[i].value+comma;
}
alert($('hid_usergroup').value);
formUnify.action = url;
//Validation.validate('formUnify');
formUnify.submit();
}
</script>
<body
onload="setChecked('${operatorVO.state.mcode}','${operatorVO.userinfo.sex }')">
<html:form action="/admin/user/userAction.do" method="post"
styleClass='required-validate' styleId="formUnify">
<fieldset>
<legend>
修改用户
</legend>
<div class="form-row">
<div class="field-label">
<label for="field1-t4">
用户名
</label>
:
</div>
<div class="field-widget">
<html:text property="username"
styleClass="required validate-alphanum"
value="${operatorVO.username}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2-t4">
密码
</label>
:
</div>
<div class="field-label">
<html:text property="password" styleClass="required min-length-6"
value="${operatorVO.password}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<p>
<a href="#"
onclick="$('usergroup-signup').toggle(); return false">加入用户组</a>
</p>
<div id="usergroup-signup" class="form-row" style="display:none;">
<div class="field-label">
<select id="out_usergroup"
ondblclick="dbRigthValue()"
style="width: 10%;"
size="5">
<c:forEach items="${operatorVO.userGrouplinks}" var="userGrouplinks">
<option value="${userGrouplinks.usergroup.usergroupid}">${userGrouplinks.usergroup.groupname}</option>
</c:forEach>
</select>
<html:hidden property="usergroup" styleId="hid_usergroup"/>
<input type="button" value="<-" onclick="">
<input type="button" value="->">
<select id="in_usergroup"
size="5"
ondblclick="dbLeftValue()"
style="width: 10%; ">
<c:forEach items="${otherList}" var="otherList">
<option value="${otherList.usergroupid}">
${otherList.groupname}
</option>
</c:forEach>
</select>
</div>
</div>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field1">
姓氏
</label>
:
</div>
<div class="field-widget">
<html:text property="firstname" styleClass="required"
value="${operatorVO.userinfo.firstname}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
名字
</label>
:
</div>
<div class="field-widget">
<html:text property="lastname" styleClass="required"
value="${operatorVO.userinfo.lastname}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
职务
</label>
:
</div>
<div class="field-widget">
<html:text property="duty" styleClass="required"
value="${operatorVO.userinfo.duty}">
</html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
假期
</label>
:
</div>
<div class="field-widget">
<html:text property="hols" styleClass="required validate-alphanum"
value="${operatorVO.userinfo.hols}">
</html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2-t4">
权限
</label>
:
</div>
<div class="field-label">
<p>
<a href="#" onclick="$('userinfo-signup').toggle(); return false">
修改权限:${operatorVO.popedom.name} </a>
</p>
<div id="userinfo-signup" class="form-row" style="display:none;">
<html:select property="popedom">
<c:forEach items="${popedomList}" var="popedom">
<html:option value="${popedom.popedomid}">${popedom.name}</html:option>
</c:forEach>
</html:select>
</div>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2-t4">
状态
</label>
:
</div>
<div class="field-label">
<html:radio styleId="state1" property="state" value="1">正常</html:radio>
<html:radio styleId="state0" property="state" value="0">禁用</html:radio>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field6">
性别
</label>
:
</div>
<div class="field-label">
<html:radio property="sex" value="M" styleId="sexM">男</html:radio>
<html:radio property="sex" value="W" styleId="sexW">女</html:radio>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
年龄
</label>
:
</div>
<div class="field-widget">
<html:text property="age" styleClass="validate-alphanum"
value="${operatorVO.userinfo.age}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
移动电话
</label>
:
</div>
<div class="field-widget">
<html:text property="mobiletel" styleClass="validate-alphanum"
value="${operatorVO.userinfo.mobiletel}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
家庭电话
</label>
:
</div>
<div class="field-widget">
<html:text property="telephone" styleClass=""
value="${operatorVO.userinfo.telephone}"></html:text>
</div>
</div>
<div class="form-row">
<div class="field-label">
<label for="field2">
地址
</label>
:
</div>
<div class="field-widget">
<html:textarea property="address" rows="5" cols="30"
value="${operatorVO.userinfo.address}">
</html:textarea>
</div>
</div>
<html:hidden property="opid" value="${operatorVO.operatorid}" />
</fieldset>
<input type="button"
onclick="doEdit('<%=path%>/admin/user/userAction.do?METHOD=doEdit')"
value="修 改">
<input type="button"
onclick="SwitchPage.doExecute('/admin/user/userAction.do','doView')"
value="返 回">
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -