修改用户详情

pull/6/head
guanghongwei 10 years ago
parent 8f66de365e
commit afcc784797

@ -33,7 +33,7 @@ class SudoPerm(models.Model):
comment = models.CharField(max_length=30, null=True, blank=True) comment = models.CharField(max_length=30, null=True, blank=True)
def __unicode__(self): def __unicode__(self):
return self.user_group.name return self.name return self.user_group.name
class Apply(models.Model): class Apply(models.Model):

@ -9,10 +9,10 @@ database = jumpserver
[ldap] [ldap]
ldap_enable = 1 ldap_enable = 1
host_url = ldap://192.168.8.230:389 host_url = ldap://127.0.0.1:389
base_dn = dc=fengxing, dc=com base_dn = dc=jumpserver, dc=org
root_dn = cn=admin,dc=fengxing,dc=com root_dn = cn=admin,dc=jumpserver,dc=org
root_pw = 123456 root_pw = secret234
[websocket] [websocket]
web_socket_host = 127.0.0.1:3000 web_socket_host = 127.0.0.1:3000
@ -25,4 +25,4 @@ email_host = 'mail.funshion.com'
email_port = '25' email_port = '25'
email_host_user = 'jkfunshion' email_host_user = 'jkfunshion'
email_host_password = 'jkmail%' email_host_password = 'jkmail%'
email_use_tls = False email_use_tls = False

@ -2,6 +2,21 @@
{% load mytags %} {% load mytags %}
{% block content %} {% block content %}
{% include 'nav_cat_bar.html' %} {% include 'nav_cat_bar.html' %}
<script>
function filter_ip(text, noselect, total){
alert(text);
$("#" + noselect).children().each(
function(){
$(this).remove();
});
$("#" + total).children().each(function{
if ($(this).text().search(text) != -1){
$("#" + noselect).append($(this).clone())
}
})
}
</script>
<div class="wrapper wrapper-content animated fadeInRight"> <div class="wrapper wrapper-content animated fadeInRight">
<div class="row"> <div class="row">
@ -28,6 +43,18 @@
</div> </div>
</div> </div>
<select id="assets_total" name="assets" class="form-control m-b" size="12" multiple style="display: none">
{% for asset in assets %}
<option value="{{ asset.id }}">{{ asset.ip }}</option>
{% endfor %}
</select>
<select id="asset_select_total" name="asset_select" class="form-control m-b" size="12" multiple style="display: none">
{% for asset in asset_select %}
<option value="{{ asset.id }}">{{ asset.ip }}</option>
{% endfor %}
</select>
<div class="ibox-content"> <div class="ibox-content">
<form id="sudoPerm" method="post" class="form-horizontal" action=""> <form id="sudoPerm" method="post" class="form-horizontal" action="">
{% if error %} {% if error %}
@ -37,7 +64,6 @@
<div class="alert alert-success text-center">{{ msg }}</div> <div class="alert alert-success text-center">{{ msg }}</div>
{% endif %} {% endif %}
<div class="row"> <div class="row">
<div class="form-group"> <div class="form-group">
<label for="group_name" class="col-sm-2 control-label">閮ㄩ棬</label> <label for="group_name" class="col-sm-2 control-label">閮ㄩ棬</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -48,6 +74,19 @@
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>
<div class="form-group">
<label for="group_name" class="col-sm-2 control-label">杩囨护</label>
<div class="col-sm-4">
<input id="noselect" class="form-control" onchange="filter_ip(this.value, 'assets', 'assets_total')">
</div>
<div class="col-sm-1">
</div>
<div id="select" class="col-sm-3">
<input class="form-control">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="" class="col-sm-2 control-label">涓绘満<span class="red-fonts">*</span></label> <label for="" class="col-sm-2 control-label">涓绘満<span class="red-fonts">*</span></label>
<div class="col-sm-4"> <div class="col-sm-4">
@ -134,7 +173,11 @@ $(document).ready(function(){
$('#users_selected option').each(function(){ $('#users_selected option').each(function(){
$(this).prop('selected', true) $(this).prop('selected', true)
}) })
}) });
}) })
</script> </script>

Loading鈥
Cancel
Save