1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <{if $successMsg}>
- <div class="tip_message_success"><{$successMsg}></div>
- <{/if}>
- <{if $errMsg}>
- <div class="tip_message_fail"><{$errMsg}></div>
- <{/if}>
- <div style="width:400px;">
- <form class="form-horizontal" role="form" method="post">
- <div class="form-group">
- <label for="t1" class="col-sm-3 control-label">用户名:</label>
- <div class="col-sm-7">
- <p class="form-control-static"><{$user.name}></p>
- </div>
- </div>
- <div class="form-group">
- <label for="t2" class="col-sm-3 control-label">原始密码:</label>
- <div class="col-sm-7">
- <input name='oldPassword' type="password" class="form-control" id="t2">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">新密码:</label>
- <div class="col-sm-7">
- <input name='newPassword' type="password" class="form-control" placeholder="新密码不能小于6位">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label">确认密码:</label>
- <div class="col-sm-7">
- <input id="confirmPass" type="password" class="form-control">
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-offset-3 col-sm-7">
- <button type="submit" class="btn btn-primary btn-sm">提交</button>
- </div>
- </div>
- </form>
- </div>
- <script>
- KISSY.use('node', function (S, Node) {
- var $ = S.all;
-
- $('button').on('click', function () {
- var oldPassword = $('input[name=oldPassword]').val();
- if (!S.trim(oldPassword)) {
- alert('请填写原始密码');
- return false;
- }
-
- var newPassword = $('input[name=newPassword]').val();
- if (!S.trim(newPassword)) {
- alert('请填写新密码');
- return false;
- }
-
- var confirmPass = $('#confirmPass').val();
- if (!S.trim(confirmPass)) {
- alert('请填写确认密码');
- return false;
- }
-
- if (newPassword != confirmPass) {
- alert('确认密码填写错误');
- return false;
- }
- });
-
- });
- </script>
- <{include file="./admin/bottom.html"}>
|