Exemplo n.º 1
0
 public async Task <IActionResult> AddReminder(BeforeRegistrationViewModel viewModel)
 {
     if (!string.IsNullOrEmpty(viewModel.Email))
     {
         await _emailReminderService
         .AddEmailReminderAsync(viewModel.Email, viewModel.SignUpSource);
     }
     ShowAlertInfo("Thanks! We'll let you know when you can join the program.", "envelope");
     return(RedirectToAction("Index"));
 }
Exemplo n.º 2
0
        public async Task <IActionResult> AddReminder(BeforeRegistrationViewModel viewModel)
        {
            if (!string.IsNullOrEmpty(viewModel.Email))
            {
                await _emailReminderService
                .AddEmailReminderAsync(viewModel.Email, viewModel.SignUpSource);

                ShowAlertInfo(_sharedLocalizer[Annotations.Info.LetYouKnowWhen], "envelope");
            }
            return(RedirectToAction(nameof(Index)));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> AddReminder(LandingPageViewModel viewModel)
        {
            if (!string.IsNullOrEmpty(viewModel.Email))
            {
                var currentCultureName = _userContextProvider.GetCurrentCulture()?.Name;
                var currentLanguageId  = await _languageService
                                         .GetLanguageIdAsync(currentCultureName);

                await _emailReminderService
                .AddEmailReminderAsync(viewModel.Email,
                                       viewModel.SignUpSource,
                                       currentLanguageId);

                ShowAlertInfo(_sharedLocalizer[Annotations.Info.LetYouKnowWhen], "envelope");
            }
            return(RedirectToAction(nameof(Index)));
        }