diff options
author | Phil Davis <phil.davis@inf.org> | 2017-02-14 13:29:44 +0545 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-02-14 09:22:27 -0200 |
commit | 5952db66888fbeb74a8180560001e128bf9d132f (patch) | |
tree | 5de4b572660355c3117534c86ca78c7903b04f40 /src/usr/local/www | |
parent | 5371504f3f078307d57e5ba04943ecc43436ad63 (diff) | |
download | pfsense-5952db66888fbeb74a8180560001e128bf9d132f.zip pfsense-5952db66888fbeb74a8180560001e128bf9d132f.tar.gz |
Allow 5 dashboard columns to work
Selecting 1,2,3,4 or 6 dashboards columns results in an exact integer result here and all is good. But 5 columns results in "2.4" and "col-sm-2.4" is not a thing in bootstrap.
We need just the best int we can choose here, which is one that is just the int part of the division. That ensures that the 5 columns extend over less than the standard bootstrap total of 12 "units" wide.
(cherry picked from commit d86cff7f61af51ee2bd9df9df309576b11d7ecc6)
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/index.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index caae6a4..da80249 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -396,7 +396,7 @@ foreach ($widgets as $widgetname => $widgetconfig) { <div class="row"> <?php - $columnWidth = 12 / $numColumns; + $columnWidth = (int) (12 / $numColumns); for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) { |