Commit dce3bacb authored by Muhamad's avatar Muhamad

editing

parent 7e1d75b1
...@@ -453,7 +453,7 @@ def load_group_edit(request): ...@@ -453,7 +453,7 @@ def load_group_edit(request):
with conn.cursor() as cursor: with conn.cursor() as cursor:
cursor.execute("SELECT a.id, a.name, b.name from auth_group a left join auth_group b on b.id = a.have_parent where a.id = "+idgroup+"") cursor.execute("SELECT a.id, a.name, b.name from auth_group a left join auth_group b on b.id = a.have_parent where a.id = "+idgroup+"")
result = cursor.fetchall() result = cursor.fetchall()
resgroup = [] resgroup = []
# if result[0][2] != None: # if result[0][2] != None:
......
...@@ -831,6 +831,10 @@ function loadgroupbyid(id) { ...@@ -831,6 +831,10 @@ function loadgroupbyid(id) {
let response = data; let response = data;
if (response.code == 0) { if (response.code == 0) {
for (i in list_perm) {
console.log()
$("input[name='chekbox'][value=" + list_perm[i] + "]").prop('checked', 'checked')
}
var grup = response.data; var grup = response.data;
$("#ingroup").val(grup.name); $("#ingroup").val(grup.name);
...@@ -1432,6 +1436,8 @@ $("#saveuser").on("click", function() { ...@@ -1432,6 +1436,8 @@ $("#saveuser").on("click", function() {
}); });
}) })
$("#savegroup").on("click", function() { $("#savegroup").on("click", function() {
var all_perm = [] var all_perm = []
$.each($("input[name='chekbox']:checked"), function() { $.each($("input[name='chekbox']:checked"), function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment