jumpserver/templates/juser/user_add.html

146 lines
9.0 KiB
HTML
Raw Normal View History

2015-01-03 14:42:46 +00:00
{% extends 'base.html' %}
2015-01-03 14:24:34 +00:00
{% block content %}
2015-01-03 15:10:09 +00:00
{% include 'nav_cat_bar.html' %}
2015-01-05 14:35:25 +00:00
<div class="wrapper wrapper-content animated fadeInRight">
2015-01-03 14:24:34 +00:00
<div class="row">
2015-01-05 15:58:51 +00:00
<div class="col-lg-10">
2015-01-03 14:24:34 +00:00
<div class="ibox float-e-margins">
<div class="ibox-title">
2015-01-05 15:55:05 +00:00
<h5>填写基本信息 <small> Add user info.</small></h5>
2015-01-03 14:24:34 +00:00
<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">
2015-01-05 15:52:25 +00:00
<li><a href="#">未启用 1</a>
2015-01-03 14:24:34 +00:00
</li>
2015-01-05 15:52:25 +00:00
<li><a href="#">未启用 2</a>
2015-01-03 14:24:34 +00:00
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
2015-01-10 07:04:34 +00:00
<form method="post" 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 %}
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="username" class="col-sm-2 control-label">用户名<span class="red-fonts">*</span></label>
2015-01-06 15:10:13 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="username" name="username" placeholder="Username" type="text" class="form-control" value={{ username }}>
2015-01-06 15:10:13 +00:00
</div>
2015-01-05 15:46:13 +00:00
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="password" class="col-sm-2 control-label">密码<span class="red-fonts">*</span></label>
2015-01-06 15:10:13 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="password" name="password" placeholder="Password" type="password" class="form-control" value={{ password }}>
2015-01-06 15:10:13 +00:00
<span class="help-block m-b-none">
登陆web的密码
</span>
2015-01-05 15:46:13 +00:00
</div>
2015-01-03 14:24:34 +00:00
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-10 06:52:35 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="ssh_key_pwd1" class="col-sm-2 control-label">密钥密码<span class="red-fonts">*</span></label>
2015-01-10 06:52:35 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="ssh_key_pwd1" name="ssh_key_pwd1" placeholder="SSH Key Password" type="password" class="form-control" value="{{ ssh_key_pwd1 }}">
2015-01-10 06:52:35 +00:00
<span class="help-block m-b-none">
2015-01-10 06:57:27 +00:00
登陆 Jumpserver 使用的SSH密钥的密码
2015-01-10 06:52:35 +00:00
</span>
</div>
</div>
<div class="hr-line-dashed"></div>
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="name" class="col-sm-2 control-label">姓名<span class="red-fonts">*</span></label>
2015-01-06 15:10:13 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="name" name="name" placeholder="Name" type="text" class="form-control" value={{ name }} >
2015-01-06 15:10:13 +00:00
</div>
2015-01-05 15:46:13 +00:00
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="groups" class="col-lg-2 control-label">属组<span class="red-fonts">*</span></label>
2015-01-06 15:10:13 +00:00
<div class="col-sm-8">
2015-01-10 07:15:49 +00:00
<select id="groups" name="groups" class="form-control m-b" multiple>
2015-01-10 06:52:35 +00:00
{% for group in all_group %}
2015-01-10 08:24:44 +00:00
{% if groups and group.id in groups %}
2015-01-10 05:11:50 +00:00
<option value="{{ group.id }}" selected>{{ group.name }}</option>
2015-01-10 06:07:06 +00:00
{% else %}
2015-01-10 08:24:44 +00:00
{% if forloop.first %}
<option value="{{ group.id }}" selected>{{ group.name }}</option>
{% else %}
<option value="{{ group.id }}">{{ group.name }}</option>
{% endif %}
2015-01-10 05:10:44 +00:00
{% endif %}
{% endfor %}
2015-01-06 15:10:13 +00:00
</select>
</div>
2015-01-05 15:46:13 +00:00
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="role" class="col-lg-2 control-label">角色<span class="red-fonts">*</span></label>
2015-01-06 15:10:13 +00:00
<div class="col-sm-8">
2015-01-10 07:15:49 +00:00
<select id="role" name="role" class="form-control m-b">
2015-01-10 08:28:09 +00:00
{% for r, role_name in user_role.items %}
2015-01-10 08:24:44 +00:00
{% ifequal r role_post %}
<option value="{{ r }}" selected>{{ role_name }}</option>
{% else %}
<option value="{{ r }}">{{ role_name }}</option>
{% endifequal %}
2015-01-10 05:10:44 +00:00
{% endfor %}
2015-01-06 15:10:13 +00:00
</select>
2015-01-06 15:21:07 +00:00
</div>
2015-01-05 15:46:13 +00:00
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-06 15:10:13 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="ssh_pwd" class="col-sm-2 control-label">SSH密码</label>
2015-01-05 15:58:51 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="ssh_pwd" name="ssh_pwd" type="password" placeholder="SSH Password" class="form-control" value="{{ ssh_pwd }}">
2015-01-10 05:10:44 +00:00
<span class="help-block m-b-none">
如果使用password方式该密码是用户在后端服务器的密码
</span>
2015-01-05 15:46:13 +00:00
</div>
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-10 06:57:27 +00:00
<div class="form-group">
2015-01-10 07:15:49 +00:00
<label for="email" class="col-sm-2 control-label">Email</label>
2015-01-10 06:57:27 +00:00
<div class="col-sm-8">
2015-01-10 08:24:44 +00:00
<input id="email" name="email" type="email" placeholder="Email" class="form-control" value="{{ email }}">
2015-01-10 06:57:27 +00:00
</div>
</div>
<div class="hr-line-dashed"></div>
2015-01-06 15:21:07 +00:00
<div class="form-group"><label class="col-sm-2 control-label">是否启用</label>
2015-01-05 15:58:51 +00:00
<div class="col-sm-8">
2015-01-06 15:21:07 +00:00
<div class="radio i-checks">
2015-01-10 07:15:49 +00:00
<label><input type="radio" value="1" name="is_active" checked>启用 </label>
2015-01-03 14:24:34 +00:00
</div>
2015-01-06 15:21:07 +00:00
<div class="radio i-checks">
2015-01-10 07:15:49 +00:00
<label><input type="radio" value="0" name="is_active">禁用 </label>
2015-01-03 14:24:34 +00:00
</div>
2015-01-05 15:46:13 +00:00
</div>
</div>
2015-01-06 15:36:11 +00:00
<div class="hr-line-dashed"></div>
2015-01-05 15:46:13 +00:00
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
2015-01-06 15:21:07 +00:00
<button class="btn btn-white" type="submit">取消</button>
<button id="submit_button" class="btn btn-primary" type="submit">确认保存</button>
2015-01-05 15:46:13 +00:00
</div>
</div>
2015-01-03 14:24:34 +00:00
</form>
</div>
</div>
2015-01-05 14:35:25 +00:00
</div>
2015-01-03 14:24:34 +00:00
</div>
2015-01-05 13:29:49 +00:00
</div>
2015-01-03 14:24:34 +00:00
{% endblock %}