public static ActionResult RedirectToLocal([NotNull] this Controller thisValue, string returnUrl, Regex logOffUrlExpression, ControllerActionData defaultUrlData)
        {
            string defaultUrl = defaultUrlData?.CreateUrl(thisValue.Url);

            return(RedirectToLocal(thisValue, returnUrl, logOffUrlExpression, defaultUrl));
        }
Exemple #2
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, AbstractComponent component)
 {
     return(new ComponentConfigResult(component));
 }
Exemple #3
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, object value, string id, object attributes)
 {
     return(new RemoteTreeResult {
         Value = value, Attributes = attributes, NodeID = id
     });
 }
Exemple #4
0
 public static void AddErrors(this System.Web.Mvc.Controller controller, string property, string error)
 {
     controller.ModelState.AddModelError(property, error);
 }
Exemple #5
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller)
 {
     return(new RemoteTreeResult());
 }
Exemple #6
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, bool accept, string message)
 {
     return(new RemoteTreeResult {
         Accept = accept, RefusalMessage = message
     });
 }
        /// <summary>
        /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
        /// </summary>
        /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
        /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
        public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller)
        {
            var config = RecaptchaConfigurationManager.GetConfiguration();

            return(new RecaptchaVerificationHelper(config.SecretKey));
        }
Exemple #8
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, string viewName, object model)
 {
     return(new ComponentConfigResult(viewName: viewName, model: model));
 }
 // TODO Stuart: Add arguments like Deleporter
 public static void FlashError(this Controller controller, string message)
 {
     FlashMessage(controller, Error, message);
 }
 /// <summary>
 /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
 /// </summary>
 /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
 /// <param name="secretKey">The private key required for making the recaptcha verification request.</param>
 /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
 public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller, string secretKey)
 {
     return(new RecaptchaVerificationHelper(secretKey));
 }
 public static void FlashWarning(this Controller controller, string message)
 {
     FlashMessage(controller, Warning, message);
 }
 public static void FlashInfo(this Controller controller, string message)
 {
     FlashMessage(controller, Info, message);
 }
 /// <summary>
 /// Gets an instance of the <see cref="RecaptchaVerificationHelper"/> class that can be used to verify user's response to the recaptcha's challenge.
 /// </summary>
 /// <param name="controller">The <see cref="System.Web.Mvc.Controller"/> object to which the extension method is added to.</param>
 /// <returns>Returns an instance of the <see cref="RecaptchaVerificationHelper"/> class.</returns>
 public static RecaptchaVerificationHelper GetRecaptchaVerificationHelper(this System.Web.Mvc.Controller controller)
 {
     return(new RecaptchaVerificationHelper("{recaptchaPrivateKey}"));
 }
Exemple #14
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, IEnumerable <AbstractComponent> components)
 {
     return(new ComponentConfigResult(components));
 }
Exemple #15
0
 public static ActionResult ErrorJson(this System.Web.Mvc.Controller controller, string message)
 {
     return(controller.ErrorJson(null, message));
 }
Exemple #16
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller)
 {
     return(new ComponentConfigResult());
 }
 public static ClientBlockPartialResult ClientBlockPartialView(this System.Web.Mvc.Controller controller, object model, string modelJsName, string blockId)
 {
     return(ClientBlockPartialView(controller, null, model, modelJsName, blockId));
 }
Exemple #18
0
 public static ComponentConfigResult ComponentConfig(this System.Web.Mvc.Controller controller, string viewName, object model, ViewDataDictionary viewData, TempDataDictionary tempData)
 {
     return(new ComponentConfigResult(viewName: viewName, model: model, viewData: viewData, tempData: tempData));
 }
Exemple #19
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="controller"></param>
 /// <param name="viewName"></param>
 /// <returns></returns>
 public static PartialViewResult PartialExtView(this System.Web.Mvc.Controller controller, string viewName)
 {
     return(PartialExtView(controller, viewName, null /* model */));
 }
Exemple #20
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, bool accept)
 {
     return(new RemoteTreeResult {
         Accept = accept
     });
 }
Exemple #21
0
 public static FormPanelResult FormPanel(this System.Web.Mvc.Controller controller)
 {
     return(new FormPanelResult());
 }
Exemple #22
0
 public static RemoteTreeResult RemoteTree(this System.Web.Mvc.Controller controller, object value)
 {
     return(new RemoteTreeResult {
         Value = value
     });
 }
Exemple #23
0
 public static FormPanelResult FormPanel(this System.Web.Mvc.Controller controller, ModelStateDictionary modelState)
 {
     return(new FormPanelResult(modelState));
 }
 public static void SaveUploadedFiles(this System.Web.Mvc.Controller controller)
 {
 }
Exemple #25
0
 public static DirectResult Direct(this System.Web.Mvc.Controller controller)
 {
     return(new DirectResult());
 }
Exemple #26
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="controller"></param>
 /// <param name="model"></param>
 /// <returns></returns>
 public static PartialViewResult PartialExtView(this System.Web.Mvc.Controller controller, object model)
 {
     return(PartialExtView(controller, null /* viewName */, model));
 }
        public static ActionResult RedirectToLocal([NotNull] this Controller thisValue, string returnUrl, ControllerActionData logOffActionData, ControllerActionData defaultUrlData)
        {
            Regex logOffUrlExpression = logOffActionData == null ? null : UriHelper.CreateBadRedirectExpression(logOffActionData.CreateUrl(thisValue.Url));

            return(RedirectToLocal(thisValue, returnUrl, logOffUrlExpression, defaultUrlData));
        }