public virtual IActionResult Create(UserAttributeModel model, bool continueEditing)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageSettings))
            {
                return(AccessDeniedView());
            }

            if (ModelState.IsValid)
            {
                var userAttribute = model.ToEntity <UserAttribute>();
                _userAttributeService.InsertUserAttribute(userAttribute);

                //activity log
                _userActivityService.InsertActivity("AddNewUserAttribute",
                                                    string.Format(_localizationService.GetResource("ActivityLog.AddNewUserAttribute"), userAttribute.Id),
                                                    userAttribute);

                //locales
                UpdateAttributeLocales(userAttribute, model);

                SuccessNotification(_localizationService.GetResource("Admin.Users.UserAttributes.Added"));

                if (!continueEditing)
                {
                    return(RedirectToAction("List"));
                }

                //selected tab
                SaveSelectedTabName();

                return(RedirectToAction("Edit", new { id = userAttribute.Id }));
            }

            //prepare model
            model = _userAttributeModelFactory.PrepareUserAttributeModel(model, null, true);

            //if we got this far, something failed, redisplay form
            return(View(model));
        }