コード例 #1
0
 /**
  * @dataProvider providerSugarCurrencyFormat
  */
 public function testSugarCurrencyFormat($params, $expected, $as_regexp = false)
 {
     $return = smarty_function_sugar_currency_format($params, $this->smarty);
     if ($as_regexp) {
         $this->assertRegExp('/' . $expected . '$/', $return);
     } else {
         $this->assertEquals($expected, $return);
     }
 }
</<?php 
                    echo is_array($_tmp = @$this->_tpl_vars['pageData']['tag'][$this->_tpl_vars['id']][$this->_tpl_vars['params']['ACLTag']]) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['pageData']['tag'][$this->_tpl_vars['id']]['MAIN']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['pageData']['tag'][$this->_tpl_vars['id']]['MAIN']);
                    ?>
>
					<?php 
                } elseif ($this->_tpl_vars['params']['customCode']) {
                    ?>
						<?php 
                    echo smarty_function_sugar_evalcolumn(array('var' => $this->_tpl_vars['params']['customCode'], 'rowData' => $this->_tpl_vars['rowData']), $this);
                    ?>

					<?php 
                } elseif ($this->_tpl_vars['params']['currency_format']) {
                    ?>
						<?php 
                    echo smarty_function_sugar_currency_format(array('var' => $this->_tpl_vars['rowData'][$this->_tpl_vars['col']], 'round' => $this->_tpl_vars['params']['currency_format']['round'], 'decimals' => $this->_tpl_vars['params']['currency_format']['decimals'], 'symbol' => $this->_tpl_vars['params']['currency_format']['symbol']), $this);
                    ?>

					<?php 
                } elseif ($this->_tpl_vars['params']['type'] == 'bool') {
                    ?>
							<input type='checkbox' disabled=disabled class='checkbox'
							<?php 
                    if (!empty($this->_tpl_vars['rowData'][$this->_tpl_vars['col']])) {
                        ?>
								checked=checked
							<?php 
                    }
                    ?>
							/>
					
コード例 #3
0
<?php

/* Smarty version 2.6.11, created on 2015-12-04 23:37:18
   compiled from include/SugarFields/Fields/Currency/ListView.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'sugar_currency_format', 'include/SugarFields/Fields/Currency/ListView.tpl', 39, false))), $this);
?>

<?php 
echo smarty_function_sugar_currency_format(array('var' => $this->_tpl_vars['amount'], 'currency_id' => $this->_tpl_vars['currency_id'], 'currency_symbol' => $this->_tpl_vars['currency_symbol']), $this);
<?php 
if ($this->_tpl_vars['hideLevel'] < 5) {
    ?>
<input type='text' id='default' name='default' value='<?php 
    echo smarty_function_sugar_currency_format(array('var' => $this->_tpl_vars['vardef']['default'], 'currency_symbol' => false), $this);
    ?>
'>
<script>
addToValidate('popup_form', 'default', 'float', false,'<?php 
    echo smarty_function_sugar_translate(array('module' => 'DynamicFields', 'label' => 'COLUMN_TITLE_DEFAULT_VALUE'), $this);
    ?>
' );
</script>
<?php 
} else {
    ?>
<input type='hidden' name='default' value='<?php 
    echo smarty_function_sugar_currency_format(array('var' => $this->_tpl_vars['vardef']['default'], 'currency_symbol' => false), $this);
    ?>
'><?php 
    echo smarty_function_sugar_currency_format(array('var' => $this->_tpl_vars['vardef']['default']), $this);
    ?>

<?php 
}
?>
</td></tr><?php 
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "modules/DynamicFields/templates/Fields/Forms/coreBottom.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);