1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <style>
- .rowlabel {
- font-weight: 300!important;
- }
- #create_user_form input {
- max-width: 250px;
- }
- </style>
- <{if $errMsg.ok}>
- <div class="tip_message_success">创建成功</div>
- <{/if}>
- <{if !$errMsg.ok && $errMsg.msg}>
- <div class="tip_message_fail">创建失败,原因:<{$errMsg.msg}></div>
- <{/if}>
- <{if !$errMsg || $errMsg.msg}>
- <form id="create_user_form" action="<{$web_cfg.domain}>/?c=Admin_BackUser&a=CreateUser" method="post">
- <input name="id" type="hidden" value="<{$platformData.id}>">
- <div>
- <div class="form-group">
- <label class="control-label rowlabel">用户名</label>
- <input name="name" type="text" class="form-control" value="<{$submitData.name}>">
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">密码</label>
- <input name="password" type="password" class="form-control" value="<{$submitData.password}>">
- </div>
- <div class="form-group">
- <label><input name="auto_generate" type="checkbox" value="1" <{if !$submitData || $submitData.auto_generate}>checked<{/if}>> 自动生成密码</label>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">邮箱</label>
- <input name="email" type="text" class="form-control" value="<{$submitData.email}>">
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">部门</label>
- <input name="division" type="text" class="form-control" value="<{$submitData.division}>">
- </div>
- <div>
- <button id="add_platform_btn" class="button button-primary button-small">创建</button>
- </div>
- </div>
- </form>
- <{/if}>
- <{if $errMsg.ok}>
- <div>
- <div class="form-group">
- <label class="control-label rowlabel">用户名:</label>
- <{$user.name}>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">密码:</label>
- <{$user.password}>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">邮箱:</label>
- <{$user.email}>
- </div>
- <div class="form-group">
- <label class="control-label rowlabel">部门:</label>
- <{$user.division}>
- </div>
- </div>
- <{/if}>
- <script>
- KISSY.use('node', function (S, Node) {
- var $ = S.all;
-
- $('#add_platform_btn').on('click', function () {
- var name = $('input[name=name]').val();
- if (S.trim(name) == '') {
- showError('姓名不能为空');
- return false;
- }
- });
-
- function showError($msg) {
- alert($msg);
- }
- });
- </script>
- <{include file="./admin/bottom.html"}>
|