From 48fd1e2ec0a53fb9c572e4542a0f0c7b25bc3c2c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 8 Nov 2014 13:42:07 -0800 Subject: DD-265, DD-266 : Validate the listing id when associating, show alert if value out of positive integer limit --- indra/newview/llfloatermarketplacelistings.cpp | 5 +++++ indra/newview/skins/default/xui/en/notifications.xml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index c732c8b2ce..942279b0f1 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -569,6 +569,7 @@ BOOL LLFloaterAssociateListing::postBuild() { getChild("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, TRUE)); getChild("Cancel")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::cancel, this)); + getChild("listing_id")->setPrevalidate(&LLTextValidate::validatePositiveS32); center(); return LLFloater::postBuild(); @@ -632,6 +633,10 @@ void LLFloaterAssociateListing::apply(BOOL user_confirm) update_marketplace_category(listing_uuid); update_marketplace_category(mUUID); } + else + { + LLNotificationsUtil::add("AlertMerchantListingInvalidID"); + } } closeFloater(); } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 70f3f86102..06aafe45e4 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -413,6 +413,14 @@ This listing could not be updated. fail + + Invalid listing ID. + fail + +