public function testAssignSmartyVariable() { $params = array(); $params['string'] = "^Employee^"; $params['default'] = "Cold Call"; $params['assign'] = "multi"; smarty_function_multienum_to_array($params, $this->_smarty); $this->assertEquals($this->_smarty->get_template_vars($params['assign']), array("Employee")); }
ob_end_clean(); ?> <?php $this->assign('ac_key', $this->_smarty_vars['capture']['ac_key']); ?> <input type="hidden" id="<?php echo $this->_tpl_vars['fields']['charges_c']['name']; ?> _multiselect" name="<?php echo $this->_tpl_vars['fields']['charges_c']['name']; ?> _multiselect" value="true"> <?php echo smarty_function_multienum_to_array(array('string' => $this->_tpl_vars['fields']['charges_c']['value'], 'default' => $this->_tpl_vars['fields']['charges_c']['default'], 'assign' => 'values'), $this); ?> <select style='display:none' id="<?php echo $this->_tpl_vars['fields']['charges_c']['name']; ?> " name="<?php echo $this->_tpl_vars['fields']['charges_c']['name']; ?> []" multiple="true" size='6' style="width:150" title='To add new charge, go to Admin -> Dropdown Editor -> charges_list and add the new charge in the left pane.' tabindex="1" > <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['fields']['charges_c']['options'], 'selected' => $this->_tpl_vars['values']), $this); ?>
?> checked=checked <?php } ?> /> <?php } elseif ($this->_tpl_vars['params']['type'] == 'multienum') { ?> <?php echo smarty_function_counter(array('name' => 'oCount', 'assign' => 'oCount', 'start' => 0), $this); ?> <?php echo smarty_function_multienum_to_array(array('string' => $this->_tpl_vars['rowData'][$this->_tpl_vars['col']], 'assign' => 'vals'), $this); ?> <?php $_from = $this->_tpl_vars['vals']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } if (count($_from)) { foreach ($_from as $this->_tpl_vars['item']) { ?> <?php echo smarty_function_counter(array('name' => 'oCount'), $this); ?> <?php
echo smarty_function_counter(array('name' => 'panelFieldCount'), $this); ?> <?php if (!empty($this->_tpl_vars['fields']['domaine_c']['value']) && $this->_tpl_vars['fields']['domaine_c']['value'] != '^^') { ?> <input type="hidden" class="sugar_field" id="<?php echo $this->_tpl_vars['fields']['domaine_c']['name']; ?> " value="<?php echo $this->_tpl_vars['fields']['domaine_c']['value']; ?> "> <?php echo smarty_function_multienum_to_array(array('string' => $this->_tpl_vars['fields']['domaine_c']['value'], 'assign' => 'vals'), $this); ?> <?php $_from = $this->_tpl_vars['vals']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } if (count($_from)) { foreach ($_from as $this->_tpl_vars['item']) { ?> <li style="margin-left:10px;"><?php echo $this->_tpl_vars['fields']['domaine_c']['options'][$this->_tpl_vars['item']]; ?> </li> <?php