mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] use _update_tab_invalid_class funcion name instead of _check_invalid_tab, update tab.attr('id') condition, update description
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user