File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 5252 color : var (--admin-interface-generic-link-active-color );
5353}
5454
55+ .admin-interface .tabbed-changeform-tabs .tabbed-changeform-tablink .error {
56+ color : var (--error-fg ) !important ;
57+ }
58+
5559.admin-interface .tabbed-changeform-tabs-remaining-space {
5660 flex : 1 ;
5761 border-bottom : 1px solid var (--border-color );
Original file line number Diff line number Diff line change 44
55 scope . tabbedChangeForm = {
66
7+ hightlightTabsWithErrors : function ( ) {
8+ document . querySelectorAll ( ".errorlist" ) . forEach ( ( el ) => {
9+ const tabContent = el . closest ( ".tabbed-changeform-tabcontent" ) ;
10+ if ( tabContent ) {
11+ const tabName = tabContent . id . replace ( "tabcontent-" , "" ) ;
12+ const tabEl = document . getElementById ( "tablink-" + tabName ) ;
13+ if ( tabEl ) {
14+ tabEl . classList . add ( "error" ) ;
15+ }
16+ }
17+ } ) ;
18+ } ,
19+
720 openTab : function ( event , tabName ) {
821 this . openTabByName ( tabName ) ;
922 } ,
6780
6881 // scope.tabbedChangeForm.openTabByLocationHash();
6982 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
83+ scope . tabbedChangeForm . hightlightTabsWithErrors ( ) ;
7084 scope . tabbedChangeForm . openTabByLocationHash ( ) ;
7185 } , false ) ;
7286
Original file line number Diff line number Diff line change 55
66 {% get_admin_interface_setting "show_fieldsets_as_tabs" as show_fieldsets_as_tabs %}
77 {% get_admin_interface_setting "show_inlines_as_tabs" as show_inlines_as_tabs %}
8- {% admin_interface_use_changeform_tabs adminform inline_admin_formsets as admin_interface_use_changeform_tabs %}
8+ {% admin_interface_use_changeform_tabs adminform inline_admin_formsets as use_changeform_tabs %}
99
10- {% if not admin_interface_use_changeform_tabs %}
10+ {% if not use_changeform_tabs %}
1111
1212 {{ block.super }}
1313
You can’t perform that action at this time.
0 commit comments