users_form.hbs
4.36 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
106
107
108
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<ul class="breadcrumb">
<li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
<li><a href="">服务器管理</a></li>
<li>用户信息</li>
</ul>
<h4>用户信息</h4>
</div>
</div>
<!-- media -->
</div>
<!-- pageheader -->
<div class="panel panel-default">
<div class="panel-heading">
<p> </p>
</div>
<form id="user-form" action="/users/save" method="POST" data-pjax>
<input type="hidden" name="_id" value="{{_id}}">
<div class="panel-body">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label">Username</label>
<input type="text" name="username" value="{{username}}" class="form-control" placeholder="用户名">
</div>
<!-- form-group -->
</div>
<!-- col-sm-6 -->
<div class="col-sm-6">
<div class="form-group">
<label class="control-label">Password</label>
<input type="text" name="password" value="{{password}}" class="form-control" placeholder="密码">
</div>
<!-- form-group -->
</div>
<!-- col-sm-6 -->
</div>
<!-- row -->
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label class="control-label">Role</label>
<div class="rdio rdio-primary">
<input type="radio" name="role" id="role1" value="1000" {{#equals role '1000'}}checked="checked"{{/equals}}>
<label for="role1">运维</label>
</div>
</div>
</div>
<div class="col-sm-2">
<label class="control-label"> </label>
<div class="rdio rdio-primary">
<input type="radio" name="role" id="role2" value="2000" {{#equals role '2000'}}checked="checked"{{/equals}}>
<label for="role2">开发</label>
</div>
</div>
<div class="col-sm-2">
<label class="control-label"> </label>
<div class="rdio rdio-primary">
<input type="radio" name="role" id="role3" value="3000" {{#equals role '3000'}}checked="checked"{{/equals}}>
<label for="role3">运营</label>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label class="control-label">状态</label>
<div class="rdio rdio-primary">
<input type="radio" name="state" id="state1" value="1" {{#equals state '1'}}checked="checked"{{/equals}}>
<label for="state1">启用</label>
</div>
</div>
</div>
<div class="col-sm-4">
<label class="control-label"> </label>
<div class="rdio rdio-primary">
<input type="radio" name="state" id="state2" value="0" {{#equals state '0'}}checked="checked"{{/equals}}>
<label for="state2">禁用</label>
</div>
</div>
</div>
<!-- row -->
</div>
<!-- panel-body -->
<div class="panel-footer">
<button type="submit" class="btn btn-primary">保存</button>
<button type="button" class="btn btn-default ml20 go-back">取消</button>
</div>
</form>
<!-- panel-footer -->
</div>
<script>
$(document).on('ready pjax:success', function() {
$('#user-form').ajaxForm(function() {
location.href = '/users/setting';
});
$('.go-back').click(function() {
window.history.go(-1);
});
});
</script>