public void onParentEmailUpdateError(IUpdateProfileResult result)
        {
            mixLoginCreateService.OnProfileUpdateSuccess -= onParentEmailUpdateSuccess;
            mixLoginCreateService.OnProfileUpdateFailed  -= onParentEmailUpdateError;
            ResendContainer.gameObject.SetActive(value: true);
            ResendButtonText.gameObject.SetActive(value: true);
            ResendButtonPreloader.SetActive(value: false);
            ResendButton.interactable = true;
            string text = string.Empty;

            foreach (IInvalidProfileItemError error in result.Errors)
            {
                object obj = text;
                text = string.Concat(obj, "\t[", error, "]\n");
                if (error is IInvalidParentEmailError)
                {
                    ParentEmailInputField.HasError = true;
                    string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.InvalidEmail");
                    ParentEmailInputField.ShowError(tokenTranslation);
                }
                else
                {
                    ParentEmailInputField.HasError = true;
                    string tokenTranslation = string.Empty;
                    tokenTranslation += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError");
                    ParentEmailInputField.ShowError(tokenTranslation);
                }
            }
        }
Пример #2
0
 protected virtual void dispatchProfileUpdateError(IUpdateProfileResult result)
 {
     if (this.OnProfileUpdateError != null)
     {
         this.OnProfileUpdateError(result);
     }
 }
Пример #3
0
        private void onProfileUpdateFailed(IUpdateProfileResult result)
        {
            List <IInvalidProfileItemError> list = result.Errors as List <IInvalidProfileItemError>;

            if (list != null && list[0] is ILoginRequiresLegalMarketingUpdateResult)
            {
                rootStateMachine.SendEvent(LegalUpdateEvent);
            }
            else if (list != null)
            {
                rootStateMachine.SendEvent(ProfileUpdateEvent);
            }
            dispatchProfileUpdateError(result);
        }
Пример #4
0
 private void onProfileUpdated(IUpdateProfileResult result)
 {
     if (result.Success)
     {
         if (this.OnProfileUpdateSuccess != null)
         {
             this.OnProfileUpdateSuccess();
         }
     }
     else if (this.OnProfileUpdateFailed != null)
     {
         this.OnProfileUpdateFailed(result);
     }
 }
        public void onProfileUpdateError(IUpdateProfileResult result)
        {
            ToggleInteraction(isInteractable: true);
            string text = string.Empty;

            foreach (IInvalidProfileItemError error in result.Errors)
            {
                object obj = text;
                text = string.Concat(obj, "\t[", error, "]\n");
                string tokenTranslation = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.EnterValid");
                if (WhichFields == FormType.MissingInfo)
                {
                    string tokenTranslation2;
                    if (error is IInvalidParentEmailError)
                    {
                        ParentEmailInputField.HasError = true;
                        tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.InvalidEmail");
                        ParentEmailInputField.ShowError(tokenTranslation2);
                        continue;
                    }
                    if (error is IInvalidFirstNameError)
                    {
                        FirstNameInputField.HasError = true;
                        tokenTranslation2            = string.Format(tokenTranslation, Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.FirstNameField"));
                        FirstNameInputField.ShowError(tokenTranslation2);
                        continue;
                    }
                    if (error is IInvalidPrivacyPolicyError)
                    {
                        LegalPanel.HasError = true;
                        tokenTranslation2   = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.ppV2");
                        LegalPanel.ShowError(tokenTranslation2);
                        continue;
                    }
                    InputFieldValidator inputFieldValidator = FirstNameInputField;
                    if (!isFirstNameFieldDisplayed)
                    {
                        inputFieldValidator = ParentEmailInputField;
                    }
                    inputFieldValidator.HasError = true;
                    tokenTranslation2            = string.Empty;
                    tokenTranslation2           += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError");
                    inputFieldValidator.ShowError(tokenTranslation2);
                }
                else if (error is IInvalidPrivacyPolicyError)
                {
                    LegalPanel.HasError = true;
                    string tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.ppV2");
                    LegalPanel.ShowError(tokenTranslation2);
                }
                else if (error is IInvalidTermsOfUseError)
                {
                    LegalPanel.HasError = true;
                    string tokenTranslation2 = Service.Get <Localizer>().GetTokenTranslationFormatted("Account.Create.LegalDoc.errorString", "Account.Create.LegalDoc.GTOU");
                    LegalPanel.ShowError(tokenTranslation2);
                }
                else
                {
                    LegalPanel.HasError = true;
                    string tokenTranslation2 = string.Empty;
                    tokenTranslation2 += Service.Get <Localizer>().GetTokenTranslation("Account.Create.Validation.UnknownError");
                    LegalPanel.ShowError(tokenTranslation2);
                }
            }
        }