webdav portal multiselect + delete ability added
This commit is contained in:
parent
c16a9a6c66
commit
29747087ff
38 changed files with 964 additions and 66 deletions
|
@ -0,0 +1,21 @@
|
|||
using System.Reflection;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.CustomAttributes
|
||||
{
|
||||
public class FormValueRequiredAttribute : ActionMethodSelectorAttribute
|
||||
{
|
||||
private readonly string _submitButtonName;
|
||||
|
||||
public FormValueRequiredAttribute(string submitButtonName)
|
||||
{
|
||||
_submitButtonName = submitButtonName;
|
||||
}
|
||||
|
||||
public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo)
|
||||
{
|
||||
var value = controllerContext.HttpContext.Request.Form[_submitButtonName];
|
||||
return !string.IsNullOrEmpty(value);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue