Even more fixes on user management. Any designers here that want to make it good looking?
This commit is contained in:
parent
2fdf654f40
commit
f1e78be4f4
3 changed files with 6 additions and 4 deletions
|
@ -31,7 +31,7 @@ else{
|
|||
|
||||
// Return Success story
|
||||
if( $success ){
|
||||
echo json_encode( array( "status" => "success", "data" => array( "username" => $username, "action" => $action, "groupname" => $groupname )));
|
||||
echo json_encode( array( "status" => "success", "data" => array( "username" => $username, "action" => $action, "groupname" => $group )));
|
||||
}
|
||||
else{
|
||||
echo json_encode( array( "status" => "error", "data" => array( "message" => "Unable to $error group $group" )));
|
||||
|
|
|
@ -78,9 +78,9 @@ $(document).ready(function(){
|
|||
$("input[x-use='creategroupfield']").val( "" );
|
||||
|
||||
// Add group option to Create User and Edit User
|
||||
var createuser = '<input x-gid="'+groupname+'" type="checkbox" name="groups[]" value="'+groupname+'" /><span x-gid="'+groupname+'">'+groupname+'<br /></span>';
|
||||
var createuser = '<input x-use="createusercheckbox" x-gid="'+groupname+'" type="checkbox" name="groups[]" value="'+groupname+'" /> <span x-gid="'+groupname+'">'+groupname+'<br /></span>';
|
||||
$("#createusergroups").append( createuser );
|
||||
var changeuser = '<input x-use="togglegroup" x-gid="'+groupname+'" type="checkbox" name="groups[]" value="'+groupname+'" /><span x-use="togglegroup" x-gid="'+groupname+'">'+groupname+'<br /></span>';
|
||||
var changeuser = '<input x-use="togglegroup" x-gid="'+groupname+'" type="checkbox" name="groups[]" value="'+groupname+'" /> <span x-use="togglegroup" x-gid="'+groupname+'">'+groupname+'<br /></span>';
|
||||
$("#changegroupsform").append( changeuser );
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ $(document).ready(function(){
|
|||
$( "input[x-gid='"+groupname+"']" ).remove();
|
||||
|
||||
// remove it from user list
|
||||
$( "td[x-use='usergroups']" ).each(function(index){
|
||||
$( "div[x-use='usergroupsdiv']" ).each(function(index){
|
||||
var content = $(this).text();
|
||||
var list = content.split( ", " );
|
||||
var newlist = [];
|
||||
|
|
|
@ -134,6 +134,8 @@ class OC_GROUP_DATABASE extends OC_GROUP_BACKEND {
|
|||
public static function removeFromGroup( $uid, $gid ){
|
||||
$query = OC_DB::prepare( "DELETE FROM `*PREFIX*group_user` WHERE `uid` = ? AND `gid` = ?" );
|
||||
$result = $query->execute( array( $uid, $gid ));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue