diff --git a/library/ajax/edit_group_profile.php b/library/ajax/edit_group_profile.php index 03f885bd4..36abc022e 100644 --- a/library/ajax/edit_group_profile.php +++ b/library/ajax/edit_group_profile.php @@ -34,11 +34,8 @@ switch ($mode) { $this->response['new_value'] = $value; break; - case 'group_type': - $this->response['new_value'] = $value; - break; - case 'release_group': + case 'group_type': $this->response['new_value'] = $value; break; @@ -46,7 +43,7 @@ switch ($mode) { delete_avatar(GROUP_AVATAR_MASK . $group_id, $group_info['avatar_ext_id']); $value = 0; $mode = 'avatar_ext_id'; - $this->response['act'] = $value; + $this->response['remove_avatar'] = get_avatar(GROUP_AVATAR_MASK . $group_id, $value); break; default: diff --git a/styles/templates/default/group_edit.tpl b/styles/templates/default/group_edit.tpl index d6b687eb8..3f9a3e741 100644 --- a/styles/templates/default/group_edit.tpl +++ b/styles/templates/default/group_edit.tpl @@ -7,8 +7,9 @@ function manage_group(mode, value) { value : value }); ajax.callback.manage_group = function(data) { - if (data.act == 0) $('div#avatar').hide(100); - console.log(data); + if(data.remove_avatar) { + $('div#avatar').html(data.remove_avatar); + } } }