summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-11-22 20:18:30 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-11-22 20:18:30 +0200
commit9621dd8bbd1697b119574bcc879345f03b42969e (patch)
tree715cac1b7f70a54de3fcedc0af18111056a4b520 /indra/newview/llpanelgroupgeneral.cpp
parent4acfc99fa608269d06a5a3e45a4c3fdc5e3d06ee (diff)
SL-12100 Premium Enhancements - Changes to rates to create Groups, UI Work
Diffstat (limited to 'indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp59
1 files changed, 6 insertions, 53 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 18f38b0d12..375daf60f8 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -304,6 +304,11 @@ void LLPanelGroupGeneral::draw()
bool LLPanelGroupGeneral::apply(std::string& mesg)
{
+ if (mGroupID.isNull())
+ {
+ return false;
+ }
+
if (!mGroupID.isNull() && mAllowEdit && mComboActiveTitle && mComboActiveTitle->isDirty())
{
LLGroupMgr::getInstance()->sendGroupTitleUpdate(mGroupID,mComboActiveTitle->getCurrentID());
@@ -313,7 +318,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY);
- if (has_power_in_group || mGroupID.isNull())
+ if (has_power_in_group)
{
LL_INFOS() << "LLPanelGroupGeneral::apply" << LL_ENDL;
@@ -326,27 +331,6 @@ bool LLPanelGroupGeneral::apply(std::string& mesg)
return false;
}
- if (mGroupID.isNull())
- {
- // Validate the group name length.
- S32 group_name_len = mGroupNameEditor->getText().size();
- if ( group_name_len < DB_GROUP_NAME_MIN_LEN
- || group_name_len > DB_GROUP_NAME_STR_LEN)
- {
- std::ostringstream temp_error;
- temp_error << "A group name must be between " << DB_GROUP_NAME_MIN_LEN
- << " and " << DB_GROUP_NAME_STR_LEN << " characters.";
- mesg = temp_error.str();
- return false;
- }
-
- LLSD args;
- args["COST"] = LLAgentBenefitsMgr::current().getCreateGroupCost();
- LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2));
-
- return false;
- }
-
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if (!gdatap)
{
@@ -453,37 +437,6 @@ bool LLPanelGroupGeneral::confirmMatureApply(const LLSD& notification, const LLS
return ret;
}
-// static
-bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- switch(option)
- {
- case 0:
- {
- // Yay! We are making a new group!
- U32 enrollment_fee = (mCtrlEnrollmentFee->get() ?
- (U32) mSpinEnrollmentFee->get() : 0);
- LLUUID insignia_id = mInsignia->getImageItemID().isNull() ? LLUUID::null : mInsignia->getImageAssetID();
-
- LLGroupMgr::getInstance()->sendCreateGroupRequest(mGroupNameEditor->getText(),
- mEditCharter->getText(),
- mCtrlShowInGroupList->get(),
- insignia_id,
- enrollment_fee,
- mCtrlOpenEnrollment->get(),
- false,
- mComboMature->getCurrentIndex() == MATURE_CONTENT);
-
- }
- break;
- case 1:
- default:
- break;
- }
- return false;
-}
-
// virtual
void LLPanelGroupGeneral::update(LLGroupChange gc)
{