updatePasswordForm.jsp
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<%@ page import="com.myproject.bean.Language" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<c:choose>
<c:when test="${not empty token}">
<fmt:message key="updatePassword.passwordReset.message" var="subtitle"/>
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
<fmt:message key="user.profile.edit"/> <small><fmt:message key="profile.password.subtitle"/></small>
</h3>
<div class="row">
<div class="col-md-12">
<!-- BEGIN PORTLET-->
<div class="portlet box yellow-crusta">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><fmt:message key="profile.password.subtitle"/>
</div>
</div>
<div class="portlet-body form">
<%@include file="/common/success.jsp"%>
<form method="post" id="updatePassword" action="updatePassword.html" class="form-horizontal form-bordered" >
<%--<input type="hidden" name="username" value="${username}"/>--%>
<div class="form-group">
<label class="col-sm-3 control-label"><fmt:message key="user.username"/></label>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-user"></i>
</span>
<input type="text" name="username" class="form-control" id="username" value="<c:out value="${username}" escapeXml="true"/>" required readonly>
</div>
</div>
</div>
<%--有管理用户的权限,且不是自己,不需要密码--%>
<c:set var="needOldPwd" value="true"/>
<security:authorize ifAnyGranted="ROLE_MANAGE_USER">
<c:if test="${loginUser.username != username}">
<c:set var="needOldPwd" value="false"/>
</c:if>
</security:authorize>
<c:if test="${needOldPwd == 'true'}">
<c:choose>
<c:when test="${not empty token}">
<input type="hidden" name="token" value="<c:out value="${token}" escapeXml="true" />"/>
</c:when>
<c:otherwise>
<div class="form-group">
<label class="col-sm-3 control-label"><fmt:message
key="updatePassword.currentPassword.label"/></label>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-cogs"></i>
</span>
<input type="password" class="form-control" name="currentPassword"
id="currentPassword" required autofocus>
</div>
</div>
</div>
</c:otherwise>
</c:choose>
</c:if>
<div class="form-group">
<label class="col-sm-3 control-label"><fmt:message key="updatePassword.newPassword.label"/></label>
<div class="col-sm-4">
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-cogs"></i>
</span>
<input type="password" class="form-control" name="password" id="password" required>
</div>
</div>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-offset-3 col-md-9">
<button type="submit" class="btn purple"><i class="fa fa-check"></i> <fmt:message key='updatePassword.changePasswordButton'/></button>
<button type="button" class="btn default" onclick="window.location=''"><i class="fa fa-history"></i><fmt:message key="button.cancel"/></button>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- END PORTLET-->
</div>
</div>