mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
use invalidHandler instead of bind()
This commit is contained in:
parent
e4aba9ae25
commit
bd15584c65
|
@ -80,16 +80,17 @@ $(document).ready(function() {
|
|||
return false;
|
||||
return true;
|
||||
}, "<?php printMLText("js_no_file");?>");
|
||||
var validator = $("#form1").bind("invalid-form.validate", function() {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}).validate({
|
||||
$("#form1").validate({
|
||||
invalidHandler: function(e, validator) {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
},
|
||||
rules: {
|
||||
'userfile[]': {
|
||||
alternatives: $('#dropfolderfileform1')
|
||||
|
|
|
@ -66,16 +66,17 @@ $(document).ready( function() {
|
|||
ev.preventDefault();
|
||||
});
|
||||
*/
|
||||
var validator = $("#form1").bind("invalid-form.validate", function() {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}).validate({
|
||||
$("#form1").validate({
|
||||
invalidHandler: function(e, validator) {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
},
|
||||
messages: {
|
||||
name: "<?php printMLText("js_no_name");?>",
|
||||
comment: "<?php printMLText("js_no_comment");?>"
|
||||
|
|
|
@ -71,16 +71,17 @@ $(document).ready( function() {
|
|||
ev.preventDefault();
|
||||
});
|
||||
*/
|
||||
var validator = $("#form1").bind("invalid-form.validate", function() {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}).validate({
|
||||
$("#form1").validate({
|
||||
invalidHandler: function(e, validator) {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
},
|
||||
messages: {
|
||||
name: "<?php printMLText("js_no_name");?>",
|
||||
comment: "<?php printMLText("js_no_comment");?>",
|
||||
|
|
|
@ -81,16 +81,17 @@ $(document).ready( function() {
|
|||
return false;
|
||||
return true;
|
||||
}, "<?php printMLText("js_no_file");?>");
|
||||
var validator = $("#form1").bind("invalid-form.validate", function() {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
}).validate({
|
||||
$("#form1").validate({
|
||||
invalidHandler: function(e, validator) {
|
||||
noty({
|
||||
text: (validator.numberOfInvalids() == 1) ? "<?php printMLText("js_form_error");?>".replace('#', validator.numberOfInvalids()) : "<?php printMLText("js_form_errors");?>".replace('#', validator.numberOfInvalids()),
|
||||
type: 'error',
|
||||
dismissQueue: true,
|
||||
layout: 'topRight',
|
||||
theme: 'defaultTheme',
|
||||
timeout: 1500,
|
||||
});
|
||||
},
|
||||
rules: {
|
||||
userfile: {
|
||||
alternatives: $('#dropfolderfileform1')
|
||||
|
|
Loading…
Reference in New Issue
Block a user