public ActionResult Basics(BasicsViewModel model) { if (model.BaseUrl.StartsWith("http://yourServerName", StringComparison.OrdinalIgnoreCase)) ModelState.AddModelError("BaseUrl", "You must specify a correct server name in the URL, or all links in notification emails will be incorrect."); if (model.BaseUrl.StartsWith("http://localhost", StringComparison.OrdinalIgnoreCase)) ModelState.AddModelError("BaseUrl", "You must specify a correct server name in the URL, or all links in notification emails will be incorrect."); if (model.BaseUrl.StartsWith("https://localhost", StringComparison.OrdinalIgnoreCase)) ModelState.AddModelError("BaseUrl", "You must specify a correct server name in the URL, or all links in notification emails will be incorrect."); if (!ModelState.IsValid) { ViewBag.NextLink = ""; return View(model); } var settings = new BaseConfiguration(); if (!model.BaseUrl.EndsWith("/")) model.BaseUrl += "/"; if (model.BaseUrl.IndexOf("localhost", StringComparison.OrdinalIgnoreCase) != -1) { ModelState.AddModelError("BaseUrl", "Use the servers real DNS name instead of 'localhost'. If you don't the Ajax request wont work as CORS would be enforced by IIS."); return View(model); } settings.BaseUrl = new Uri(model.BaseUrl); settings.SupportEmail = model.SupportEmail; _configStore.Store(settings); return Redirect(Url.GetNextWizardStep()); }
public ActionResult Basics(BasicsViewModel model) { var settings = new BaseConfiguration(); settings.BaseUrl = new Uri(model.BaseUrl); settings.SupportEmail = model.SupportEmail; ConfigurationStore.Instance.Store(settings); return(Redirect(Url.GetNextWizardStep())); }
public override bool IsComplete(Project project) { if (project == null) { return(false); } var basicsResults = new BasicsViewModel(project).GetValidationResults(); return(!basicsResults.Any()); }
public ActionResult Basics() { var model = new BasicsViewModel(); var config = ConfigurationStore.Instance.Load <BaseConfiguration>(); if (config != null) { model.BaseUrl = config.BaseUrl.ToString(); model.SupportEmail = config.SupportEmail; } else { model.BaseUrl = Request.Url.ToString().Replace("installation/setup/basics/", ""); ViewBag.NextLink = ""; } return(View(model)); }
public ActionResult Basics(BasicsViewModel model) { var settings = new BaseConfiguration(); if (!model.BaseUrl.EndsWith("/")) { model.BaseUrl += "/"; } if (model.BaseUrl.IndexOf("localhost", StringComparison.OrdinalIgnoreCase) != -1) { ModelState.AddModelError("BaseUrl", "Use the servers real DNS name instead of 'localhost'. If you don't the Ajax request wont work as CORS would be enforced by IIS."); return(View(model)); } settings.BaseUrl = new Uri(model.BaseUrl); settings.SupportEmail = model.SupportEmail; ConfigurationStore.Instance.Store(settings); return(Redirect(Url.GetNextWizardStep())); }
public ActionResult Basics() { var model = new BasicsViewModel(); var config = _configStore.Load<BaseConfiguration>(); if (config.BaseUrl != null) { model.BaseUrl = config.BaseUrl.ToString(); model.SupportEmail = config.SupportEmail; } else { model.BaseUrl = Request.GetDisplayUrl() .Replace("installation/setup/basics/", "") .Replace("localhost", "yourServerName"); ViewBag.NextLink = ""; } return View(model); }
public ActionResult Basics(BasicsViewModel model) { if (model.BaseUrl.StartsWith("http://yourServerName/", StringComparison.OrdinalIgnoreCase)) { ModelState.AddModelError("BaseUrl", "You must specify a correct URL, or all links in notification emails will be incorrect."); } if (!ModelState.IsValid) { ViewBag.NextLink = ""; return(View(model)); } var settings = new BaseConfiguration { BaseUrl = new Uri(model.BaseUrl), SupportEmail = model.SupportEmail, AllowRegistrations = model.AllowRegistrations }; _configStore.Store(settings); return(Redirect(Url.GetNextWizardStep())); }
public CheckLogin() { Button_Login = new BasicsViewModel(Button_LoginAction); }