Changeset 3025

Show
Ignore:
Timestamp:
11/07/06 13:16:34 (7 years ago)
Author:
gregmac
Message:

Added warnings for disabled modules, revised look of warning text on config page

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/common/mainstyle.css

    r3009 r3025  
    7171 
    7272.warning { 
    73   padding:5px 20px; 
     73  padding:10px 10px 0 10px; 
     74  margin:5px 0; 
    7475  background:rgb(255,242,202); 
     76  border:1px dotted #ccc; 
     77} 
     78.warning p { 
     79  margin-top: 0; 
     80  margin-bottom:10px; 
    7581} 
    7682 
  • freepbx/trunk/amp_conf/htdocs/admin/config.php

    r3023 r3025  
    277277    if ($astman) { 
    278278      printf( "<h2>%s</h2>", dgettext("welcome page", "Welcome to freePBX.") ); 
     279 
     280      $modules_needup = module_getinfo(false, MODULE_STATUS_NEEDUPGRADE); 
     281      $modules_broken = module_getinfo(false, MODULE_STATUS_BROKEN); 
     282      if (count($modules_needup) || count($modules_broken)) { 
     283        echo "<div class=\"warning\">"; 
     284        if (count($modules_needup)) { 
     285          echo "<p>"._("Warning: The following modules are disabled because they need upgrading: "); 
     286          echo implode(", ",array_keys($modules_needup)); 
     287          echo "</p>"; 
     288        } 
     289        if (count($modules_broken)) { 
     290          echo "<p>"._("Warning: The following modules are disabled because they are broken: "); 
     291          echo implode(", ",array_keys($modules_broken)); 
     292          echo "</p>"; 
     293        } 
     294        echo "<p>", sprintf(dgettext("welcome page","You should go to the <a href='%s'>Module Admin</a> page to fix these.</p>"), "config.php?display=modules&amp;type=tool"); 
     295        echo "</div>"; 
     296      } 
     297       
    279298// BETA code - remove later. 
    280299      echo "<div class=\"warning\">";