|
453 | 453 | if (txt) |
454 | 454 | msg = txt; |
455 | 455 | } |
456 | | - methods._showPrompt(errorField, msg, "pass", false, options, true); |
| 456 | + if (options.showPrompts) methods._showPrompt(errorField, msg, "pass", false, options, true); |
457 | 457 | } |
458 | 458 | } else { |
459 | 459 | // the field is invalid, show the red error prompt |
|
463 | 463 | if (txt) |
464 | 464 | msg = txt; |
465 | 465 | } |
466 | | - methods._showPrompt(errorField, msg, "", false, options, true); |
| 466 | + if(options.showPrompts) methods._showPrompt(errorField, msg, "", false, options, true); |
467 | 467 | } |
468 | 468 | } |
469 | 469 | } |
|
694 | 694 | field = form.find("#" + options.usePrefix + methods._jqSelector(field.attr('id')) + options.useSuffix); |
695 | 695 | } |
696 | 696 |
|
697 | | - if (options.isError){ |
| 697 | + if (options.isError && options.showPrompts){ |
698 | 698 | methods._showPrompt(field, promptText, promptType, false, options); |
699 | 699 | }else{ |
700 | 700 | if (!isAjaxValidator) methods._closePrompt(field); |
|
1385 | 1385 | else |
1386 | 1386 | msg = rule.alertText; |
1387 | 1387 |
|
1388 | | - methods._showPrompt(errorField, msg, "", true, options); |
| 1388 | + if (options.showPrompts) methods._showPrompt(errorField, msg, "", true, options); |
1389 | 1389 | } else { |
1390 | 1390 | options.ajaxValidCache[errorFieldId] = true; |
1391 | 1391 |
|
|
1401 | 1401 | else |
1402 | 1402 | msg = rule.alertTextOk; |
1403 | 1403 |
|
1404 | | - // see if we should display a green prompt |
1405 | | - if (msg) |
1406 | | - methods._showPrompt(errorField, msg, "pass", true, options); |
1407 | | - else |
1408 | | - methods._closePrompt(errorField); |
| 1404 | + if (options.showPrompts) { |
| 1405 | + // see if we should display a green prompt |
| 1406 | + if (msg) |
| 1407 | + methods._showPrompt(errorField, msg, "pass", true, options); |
| 1408 | + else |
| 1409 | + methods._closePrompt(errorField); |
| 1410 | + } |
1409 | 1411 |
|
1410 | 1412 | // If a submit form triggered this, we want to re-submit the form |
1411 | 1413 | if (options.eventTrigger == "submit") |
|
1885 | 1887 | scroll: true, |
1886 | 1888 | // Focus on the first input |
1887 | 1889 | focusFirstField:true, |
| 1890 | + // Show prompts, set to false to disable prompts |
| 1891 | + showPrompts: true, |
1888 | 1892 | // Opening box position, possible locations are: topLeft, |
1889 | 1893 | // topRight, bottomLeft, centerRight, bottomRight |
1890 | 1894 | promptPosition: "topRight", |
|
0 commit comments