Fix: Replace deprecated getBrightness with new method
New method created in is_themecore module: Uses use PrestaShop\PrestaShop\Core\Util\ColorBrightnessCalculator and adds as smarty function in SmartyHelperFunctions.php
This commit is contained in:
@ -60,7 +60,7 @@
|
||||
<td class="hidden-md-down align-middle">{$order.details.payment}</td>
|
||||
<td class="align-middle">
|
||||
<span
|
||||
class="label label-pill badge {if Tools::getBrightness($order.history.current.color) < 128}text-white{/if}"
|
||||
class="label label-pill badge {if !$order.history.current.color|is_bright}text-white{/if}"
|
||||
style="background-color:{$order.history.current.color}"
|
||||
>
|
||||
{$order.history.current.ostate_name}
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
<td>{$state.history_date}</td>
|
||||
<td>
|
||||
<span
|
||||
class="label label-pill badge {if Tools::getBrightness($state.color) < 128}text-white{/if}"
|
||||
class="label label-pill badge {if !$state.color|is_bright}text-white{/if}"
|
||||
style="background-color:{$state.color}">
|
||||
{$state.ostate_name}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user