Пример #1
0
 public async Task <ActionResult> Register(string returnUrl = "", string ss = "")
 {
     return(RegisterView(new RegisterViewModel
     {
         PasswordComplexitySetting = await _passwordComplexitySettingStore.GetSettingsAsync(),
         ReturnUrl = returnUrl,
         SingleSignIn = ss
     }));
 }
Пример #2
0
        public async Task <PartialViewResult> CreateOrEditModal(long?id)
        {
            var output = await _userAppService.GetUserForEdit(new NullableIdDto <long> {
                Id = id
            });

            var viewModel = ObjectMapper.Map <CreateOrEditUserModalViewModel>(output);

            viewModel.PasswordComplexitySetting = await _passwordComplexitySettingStore.GetSettingsAsync();

            return(PartialView("_CreateOrEditModal", viewModel));
        }
        public async Task <ActionResult> Register(int?editionId, SubscriptionStartType?subscriptionStartType = null)
        {
            CheckTenantRegistrationIsEnabled();

            var model = new TenantRegisterViewModel
            {
                PasswordComplexitySetting = await _passwordComplexitySettingStore.GetSettingsAsync(),
                SubscriptionStartType     = subscriptionStartType,
                EditionPaymentType        = EditionPaymentType.NewRegistration
            };

            if (editionId.HasValue)
            {
                model.EditionId = editionId.Value;
                model.Edition   = await _tenantRegistrationAppService.GetEdition(editionId.Value);
            }

            ViewBag.UseCaptcha = UseCaptchaOnRegistration();

            return(View(model));
        }
Пример #4
0
        public async Task <PartialViewResult> CreateModal()
        {
            var editionItems = await _editionAppService.GetEditionComboboxItems();

            var defaultEditionName = _commonLookupAppService.GetDefaultEditionName().Name;
            var defaultEditionItem = editionItems.FirstOrDefault(e => e.DisplayText == defaultEditionName);

            if (defaultEditionItem != null)
            {
                defaultEditionItem.IsSelected = true;
            }

            var viewModel = new CreateTenantViewModel(editionItems)
            {
                PasswordComplexitySetting = await _passwordComplexitySettingStore.GetSettingsAsync()
            };

            return(PartialView("_CreateModal", viewModel));
        }