Initial Commit of AgileBill Open Source
This commit is contained in:
20
includes/smarty/plugins/function.grid_bool.php
Normal file
20
includes/smarty/plugins/function.grid_bool.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
* Type: function
|
||||
* Name: grid_boo
|
||||
* Purpose: Formats boolean fields to translated true/false value
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
function smarty_function_grid_bool($params, &$smarty)
|
||||
{
|
||||
extract($params);
|
||||
|
||||
if(!empty($bool))
|
||||
echo translate('true');
|
||||
else
|
||||
echo translate('false');
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user