File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed 
build/media_src/com_associations/js Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -26,21 +26,17 @@ Joomla = window.Joomla || {};
2626
2727  Joomla . showAssociationMessage  =  ( )  =>  { 
2828    const  controlGroup  =  [ ] . slice . call ( document . querySelectorAll ( '#associations .control-group' ) ) ; 
29+     const  associations  =  document . getElementById ( 'associations' ) ; 
2930
30-     controlGroup . forEach ( ( element )  =>  { 
31-       element . style . display  =  'none' ; 
31+     if  ( associations )  { 
32+       const  html  =  document . createElement ( 'joomla-alert' ) ; 
33+       html . innerHTML  =  Joomla . JText . _ ( 'JGLOBAL_ASSOC_NOT_POSSIBLE' ) ; 
3234
33-       const  associations  =  document . getElementById ( 'associations' ) ; 
34- 
35-       if  ( associations )  { 
36-         const  html  =  document . createElement ( 'div' ) ; 
37-         html . classList . add ( 'alert' ) ; 
38-         html . classList . add ( 'alert-info' ) ; 
39-         html . id  =  'associations-notice' ; 
40-         html . innerHTML  =  Joomla . JText . _ ( 'JGLOBAL_ASSOC_NOT_POSSIBLE' ) ; 
35+       associations . insertAdjacentElement ( 'afterbegin' ,  html ) ; 
36+     } 
4137
42-          associations . insertAdjacentElement ( 'afterbegin' ,   html ) ; 
43-       } 
38+     controlGroup . forEach ( ( element )   =>   { 
39+       element . style . display   =   'none' ; 
4440    } ) ; 
4541  } ; 
4642
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments