forked from Techsystech/web
[IMP] use _update_tab_invalid_class funcion name instead of _check_invalid_tab, update tab.attr('id') condition, update description
parent
3e873c8343
commit
12b1c55d15
|
@ -6,7 +6,7 @@
|
|||
Web invalid tab
|
||||
===============
|
||||
|
||||
This module highlights a tab when fields inside are invalid. Is useful when you have a form with many tabs.
|
||||
This module highlights a tab when fields inside are invalid. It's useful when you have a form with many tabs.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
|
|
@ -26,13 +26,13 @@ openerp.web_invalid_tab = function(instance) {
|
|||
if (!this.disable_utility_classes) {
|
||||
if (this.field_manager.get('display_invalid_fields')) {
|
||||
this.$el.toggleClass('oe_form_invalid', !this.is_valid());
|
||||
this._check_invalid_tab();
|
||||
this._update_tab_invalid_class();
|
||||
}
|
||||
}
|
||||
},
|
||||
_check_invalid_tab: function() {
|
||||
_update_tab_invalid_class: function() {
|
||||
var tab = this.$el.closest(tab_selector);
|
||||
if (tab && tab.attr('id')) {
|
||||
if (tab.attr('id')) {
|
||||
if (this.is_valid()) {
|
||||
if (tab.find('.oe_form_invalid').length == 0) {
|
||||
tab_link(tab).removeClass('oe_form_tab_invalid');
|
||||
|
|
Loading…
Reference in New Issue