This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set the submitHandler callback via the settings object, as is necessary if you are using Unobtrusive Validation. | |
// If you are not using Unobtrusive Validation then you can set submitHandler in the options object passed to validate(). | |
$("#iTrentExportForm").validate().settings.submitHandler = function (form) { | |
BlockPage(); // you may want to block the page during the Ajax call | |
var container = $(form).find("[data-valmsg-summary=true]"), | |
list = container.find("ul"); | |
if (list && list.length) { | |
list.empty(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Mvc; | |
namespace SFR.TOR.Web.Filters | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Web.Json; | |
namespace Web.Filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.ComponentModel; | |
using System.ComponentModel.DataAnnotations; | |
namespace Validators | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.extend(options, { | |
type: element.getAttribute("data-ajax-method") || undefined, | |
url: element.getAttribute("data-ajax-url") || undefined, | |
beforeSend: function (xhr) { | |
var result; | |
asyncOnBeforeSend(xhr, method); | |
result = getFunction(element.getAttribute("data-ajax-begin"), ["xhr"]).apply(this, arguments); | |
if (result !== false) { | |
loading.show(duration); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// validate the form on submit | |
this.submit( function( event ) { | |
if ( validator.settings.debug ) { | |
// prevent form submit to be able to see console output | |
event.preventDefault(); | |
} | |
function handle() { | |
var hidden; | |
if ( validator.settings.submitHandler ) { | |
if (validator.submitButton) { |
NewerOlder