MAINT-8582 FIXED The message "Group is already in the list" is not displayed

master
maxim_productengine 2018-07-03 14:22:15 +03:00
parent d154dc0892
commit 7ee5ee3dfd
2 changed files with 22 additions and 1 deletions

View File

@ -3463,6 +3463,20 @@ void LLPanelEstateAccess::onClickRemoveEstateManager()
// Special case callback for groups, since it has different callback format than names
void LLPanelEstateAccess::addAllowedGroup2(LLUUID id)
{
LLPanelEstateAccess* panel = LLFloaterRegionInfo::getPanelAccess();
if (panel)
{
LLNameListCtrl* group_list = panel->getChild<LLNameListCtrl>("allowed_group_name_list");
LLScrollListItem* item = group_list->getNameItemByAgentId(id);
if (item)
{
LLSD args;
args["GROUP"] = item->getColumn(0)->getValue().asString();
LLNotificationsUtil::add("GroupIsAlreadyInList", args);
return;
}
}
LLSD payload;
payload["operation"] = (S32)ESTATE_ACCESS_ALLOWED_GROUP_ADD;
payload["dialog_name"] = "EstateAllowedGroupAdd";
@ -4019,7 +4033,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url)
for (LLSD::array_const_iterator it = result["AllowedGroups"].beginArray(); it != result["AllowedGroups"].endArray(); ++it)
{
LLUUID id = (*it)["id"].asUUID();
allowed_group_name_list->addNameItem(id);
allowed_group_name_list->addGroupNameItem(id);
}
allowed_group_name_list->sortByName(TRUE);
}

View File

@ -3812,6 +3812,13 @@ Unable to add banned resident to estate manager list.
type="alertmodal">
Unable to add estate manager [AGENT] to banned list.
</notification>
<notification
icon="alertmodal.tga"
name="GroupIsAlreadyInList"
type="alertmodal">
[GROUP] is already in the Allowed Groups list.
</notification>
<notification
icon="alertmodal.tga"