mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
If HTML5 validation fails, switch to the appropriate tab so message can be shown
This commit is contained in:
parent
06ff3cf08b
commit
97cb3a0586
@ -9,6 +9,20 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle HTML5 validation on tabs
|
||||||
|
*/
|
||||||
|
jQuery().ready(function() {
|
||||||
|
jQuery('.tab_body :input').bind('invalid', function(e) {
|
||||||
|
// Activate the appropriate tab
|
||||||
|
var tab = jQuery(this).parentsUntil('.tab_body').last();
|
||||||
|
var alltabs = [tab.attr("id")];
|
||||||
|
tab.siblings('div').each(function() {
|
||||||
|
alltabs.push(this.id);
|
||||||
|
});
|
||||||
|
activate_tab(tab.attr("id"), alltabs.join('|'));
|
||||||
|
});
|
||||||
|
});
|
||||||
function submitit(form,name)
|
function submitit(form,name)
|
||||||
{
|
{
|
||||||
//alert(name+' pressed');
|
//alert(name+' pressed');
|
||||||
|
Loading…
Reference in New Issue
Block a user