jumpserver/templates/juser/chg_info.html

132 lines
5.8 KiB
HTML
Raw Normal View History

2015-04-01 14:54:10 +00:00
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-10">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>缂栬緫鐢ㄦ埛淇℃伅</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">鏈惎鐢 1</a>
</li>
<li><a href="#">鏈惎鐢 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<form method="post" id="userForm" class="form-horizontal" action="">
{% if error %}
<div class="alert alert-warning text-center">{{ error }}</div>
{% endif %}
{% if msg %}
<div class="alert alert-success text-center">{{ msg }}</div>
{% endif %}
<div class="form-group">
<div class="col-sm-8">
<input id="user_id" name="user_id" type="text" value="{{ user.id }}" style="display: none">
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">濮撳悕<span class="red-fonts">*</span></label>
<div class="col-sm-8">
<input id="name" name="name" placeholder="Name" type="text" class="form-control" value="{{ user.name }}">
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">瀵嗙爜<span class="red-fonts">*</span></label>
<div class="col-sm-8">
<input id="password" name="password" placeholder="Password" type="password" class="form-control" value="{{ user.password }}">
<span class="help-block m-b-none">
鐧婚檰web鐨勫瘑鐮
</span>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label for="ssh_key_pwd" class="col-sm-2 control-label">瀵嗛挜瀵嗙爜<span class="red-fonts">*</span></label>
<div class="col-sm-8">
<input id="ssh_key_pwd" name="ssh_key_pwd" placeholder="SSH Key Password" type="password" class="form-control" value="{{ user.ssh_key_pwd }}">
<span class="help-block m-b-none">
鐧婚檰 Jumpserver 浣跨敤鐨凷SH瀵嗛挜鐨勫瘑鐮
</span>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label for="email" class="col-sm-2 control-label">Email<span class="red-fonts">*</span></label>
<div class="col-sm-8">
<input id="email" name="email" type="email" placeholder="Email" class="form-control" value="{{ user.email }}" >
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="submit">鍙栨秷</button>
<button id="submit_button" class="btn btn-primary" type="submit">纭淇敼</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$('#userForm').validator({
timely: 2,
theme: "yellow_right_effect",
fields: {
"password": {
rule: "required;length[6~50]",
tip: "杈撳叆瀵嗙爜",
ok: "",
msg: {required: "蹇呴』濉啓!"}
},
"ssh_key_pwd": {
rule: "required;length[6~50]",
tip: "ssh绉侀挜瀵嗙爜",
ok: "",
msg: {required: "蹇呴』濉啓"}
},
"name": {
rule: "required",
tip: "濮撳悕",
ok: "",
msg: {required: "蹇呴』濉啓"}
},
"email": {
rule: "required",
tip: "Email",
ok: "",
msg: {required: "蹇呴』濉啓"}
},
},
valid: function(form) {
form.submit();
}
});
</script>
{% endblock %}