PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/cache/smarty/templates_c/%%02^022^02283FE3%%ConvertLead.tpl.php

https://github.com/joshbhamilton/sugar
PHP | 223 lines | 175 code | 14 blank | 34 comment | 43 complexity | 22ae5ffe381b9b09de2e3231bc8ff7fd MD5 | raw file
  1. <?php /* Smarty version 2.6.11, created on 2011-09-01 16:50:26
  2. compiled from modules/Leads/tpls/ConvertLead.tpl */ ?>
  3. <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
  4. smarty_core_load_plugins(array('plugins' => array(array('function', 'counter', 'modules/Leads/tpls/ConvertLead.tpl', 41, false),array('function', 'sugar_field', 'modules/Leads/tpls/ConvertLead.tpl', 88, false),array('function', 'sugar_evalcolumn', 'modules/Leads/tpls/ConvertLead.tpl', 155, false),array('modifier', 'strtoupper', 'modules/Leads/tpls/ConvertLead.tpl', 83, false),array('modifier', 'count', 'modules/Leads/tpls/ConvertLead.tpl', 111, false),)), $this); ?>
  5. {*
  6. /*********************************************************************************
  7. * SugarCRM Community Edition is a customer relationship management program developed by
  8. * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
  9. *
  10. * This program is free software; you can redistribute it and/or modify it under
  11. * the terms of the GNU Affero General Public License version 3 as published by the
  12. * Free Software Foundation with the addition of the following permission added
  13. * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  14. * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
  15. * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  16. *
  17. * This program is distributed in the hope that it will be useful, but WITHOUT
  18. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  19. * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  20. * details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License along with
  23. * this program; if not, see http://www.gnu.org/licenses or write to the Free
  24. * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  25. * 02110-1301 USA.
  26. *
  27. * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
  28. * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
  29. *
  30. * The interactive user interfaces in modified source and object code versions
  31. * of this program must display Appropriate Legal Notices, as required under
  32. * Section 5 of the GNU Affero General Public License version 3.
  33. *
  34. * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
  35. * these Appropriate Legal Notices must retain the display of the "Powered by
  36. * SugarCRM" logo. If the display of the logo is not reasonably feasible for
  37. * technical reasons, the Appropriate Legal Notices must display the words
  38. * "Powered by SugarCRM".
  39. ********************************************************************************/
  40. *}
  41. <span class="color">{$ERROR}</span>
  42. <?php $_from = $this->_tpl_vars['sectionPanels']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['section'] = array('total' => count($_from), 'iteration' => 0);
  43. if ($this->_foreach['section']['total'] > 0):
  44. foreach ($_from as $this->_tpl_vars['label'] => $this->_tpl_vars['panel']):
  45. $this->_foreach['section']['iteration']++;
  46. echo smarty_function_counter(array('name' => 'panelCount','print' => false), $this);?>
  47. <h4>
  48. <style>
  49. input[disabled] {ldelim}
  50. background-color:lightgray;
  51. {rdelim}
  52. </style>
  53. <table><tr><td>
  54. <input type="hidden" name="convert_create_<?php echo $this->_tpl_vars['module']; ?>
  55. " id="convert_create_<?php echo $this->_tpl_vars['module']; ?>
  56. "
  57. {if ($def.required && empty($def.select)) || (!empty($def.default_action) && $def.default_action == "create")} value="true" {/if}/>
  58. <?php if (isset ( $this->_tpl_vars['def']['templateMeta']['form']['hidden'] )): $_from = $this->_tpl_vars['def']['templateMeta']['form']['hidden']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  59. foreach ($_from as $this->_tpl_vars['field']):
  60. echo $this->_tpl_vars['field']; ?>
  61. <?php endforeach; endif; unset($_from); endif; ?>
  62. {if !$def.required || !empty($def.select)}
  63. <input class="checkbox" type="checkbox" name="new<?php echo $this->_tpl_vars['module']; ?>
  64. " id="new<?php echo $this->_tpl_vars['module']; ?>
  65. " onclick="toggleDisplay('create<?php echo $this->_tpl_vars['module']; ?>
  66. ');<?php if (! empty ( $this->_tpl_vars['def']['select'] )): ?>toggle<?php echo $this->_tpl_vars['module']; ?>
  67. Select();<?php endif; ?>">
  68. <script type="text/javascript">
  69. <?php if (! empty ( $this->_tpl_vars['def']['select'] )): ?>
  70. toggle<?php echo $this->_tpl_vars['module']; ?>
  71. Select = function(){ldelim}
  72. var inputs = document.getElementById('select<?php echo $this->_tpl_vars['module']; ?>
  73. ').getElementsByTagName('input');
  74. for(var i in inputs) {ldelim}inputs[i].disabled = !inputs[i].disabled;{rdelim}
  75. var buttons = document.getElementById('select<?php echo $this->_tpl_vars['module']; ?>
  76. ').getElementsByTagName('button');
  77. for(var i in buttons) {ldelim}buttons[i].disabled = !buttons[i].disabled;{rdelim}
  78. {rdelim}
  79. <?php endif; ?>
  80. {if !empty($def.default_action) && $def.default_action == "create"}
  81. YAHOO.util.Event.onContentReady('create<?php echo $this->_tpl_vars['module']; ?>
  82. ', function(){ldelim}
  83. toggleDisplay('create<?php echo $this->_tpl_vars['module']; ?>
  84. ');
  85. document.getElementById('new<?php echo $this->_tpl_vars['module']; ?>
  86. ').checked = true;
  87. <?php if (! empty ( $this->_tpl_vars['def']['select'] )): ?>
  88. toggle<?php echo $this->_tpl_vars['module']; ?>
  89. Select();
  90. <?php endif; ?>
  91. {rdelim});
  92. {/if}
  93. {/if}
  94. </script>
  95. </td><td>
  96. {sugar_translate label='<?php echo $this->_tpl_vars['label']; ?>
  97. ' module='Leads'}
  98. </td><td>
  99. <?php if (! empty ( $this->_tpl_vars['def']['select'] )): ?>
  100. {sugar_translate label='LNK_SELECT_<?php echo ((is_array($_tmp=$this->_tpl_vars['module'])) ? $this->_run_mod_handler('strtoupper', true, $_tmp) : strtoupper($_tmp)); ?>
  101. ' module='Leads'}
  102. {if $def.required }
  103. <span class="required"><?php echo $this->_tpl_vars['APP']['LBL_REQUIRED_SYMBOL']; ?>
  104. </span>
  105. {/if}
  106. </td><td id ="select<?php echo $this->_tpl_vars['module']; ?>
  107. ">
  108. <?php echo smarty_function_sugar_field(array('parentFieldArray' => 'contact_def','vardef' => $this->_tpl_vars['contact_def'][$this->_tpl_vars['def']['select']],'displayType' => 'EditView','formName' => $this->_tpl_vars['form_name'],'form_name' => $this->_tpl_vars['form_name']), $this);?>
  109. <script>
  110. if (typeof(sqs_objects) == "undefined") sqs_objects = [];
  111. sqs_objects['<?php echo $this->_tpl_vars['form_name']; ?>
  112. _<?php echo $this->_tpl_vars['def']['select']; ?>
  113. '] = {ldelim}
  114. form : '<?php echo $this->_tpl_vars['form_name']; ?>
  115. ',
  116. method : 'query',
  117. modules : ['<?php echo $this->_tpl_vars['module']; ?>
  118. '],
  119. group : 'or',
  120. field_list : ['name', 'id'],
  121. populate_list : ['<?php echo $this->_tpl_vars['def']['select']; ?>
  122. ', '<?php echo $this->_tpl_vars['contact_def'][$this->_tpl_vars['def']['select']]['id_name']; ?>
  123. '],
  124. conditions : [{ldelim}'name':'name','op':'like','end':'%','value':''{rdelim}],
  125. required_list : ['<?php echo $this->_tpl_vars['contact_def'][$this->_tpl_vars['def']['select']]['id_name']; ?>
  126. '],
  127. order : 'name',
  128. limit : '10'
  129. {rdelim}
  130. </script>
  131. <?php endif; ?>
  132. </td></tr></table>
  133. </h4>
  134. <table width="100%" border="0" cellspacing="1" cellpadding="0" class="{$def.templateMeta.panelClass|default:'edit view'}" id ="create<?php echo $this->_tpl_vars['module']; ?>
  135. " {if !$def.required || !empty($def.select)}style="display:none"{/if}>
  136. <?php $this->assign('rowCount', 0); $_from = $this->_tpl_vars['panel']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['rowIteration'] = array('total' => count($_from), 'iteration' => 0);
  137. if ($this->_foreach['rowIteration']['total'] > 0):
  138. foreach ($_from as $this->_tpl_vars['row'] => $this->_tpl_vars['rowData']):
  139. $this->_foreach['rowIteration']['iteration']++;
  140. ?>
  141. <tr>
  142. <?php $this->assign('columnsInRow', count($this->_tpl_vars['rowData'])); ?>
  143. <?php $this->assign('columnsUsed', 0); ?>
  144. <?php echo smarty_function_counter(array('name' => 'colCount','start' => 0,'print' => false,'assign' => 'colCount'), $this);?>
  145. <?php $_from = $this->_tpl_vars['rowData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['colIteration'] = array('total' => count($_from), 'iteration' => 0);
  146. if ($this->_foreach['colIteration']['total'] > 0):
  147. foreach ($_from as $this->_tpl_vars['col'] => $this->_tpl_vars['colData']):
  148. $this->_foreach['colIteration']['iteration']++;
  149. ?>
  150. <?php echo smarty_function_counter(array('name' => 'colCount','print' => false), $this);?>
  151. <?php if (count ( $this->_tpl_vars['rowData'] ) == $this->_tpl_vars['colCount']): ?>
  152. <?php $this->assign('colCount', 0); ?>
  153. <?php endif; ?>
  154. <?php if (empty ( $this->_tpl_vars['def']['templateMeta']['labelsOnTop'] ) && empty ( $this->_tpl_vars['colData']['field']['hideLabel'] )): ?>
  155. <td valign="top" id='<?php echo $this->_tpl_vars['colData']['field']['name']; ?>
  156. _label' width='<?php echo $this->_tpl_vars['def']['templateMeta']['widths'][($this->_foreach['colIteration']['iteration']-1)]['label']; ?>
  157. %' scope="row">
  158. <?php if (isset ( $this->_tpl_vars['colData']['field']['customLabel'] )): ?>
  159. <?php echo $this->_tpl_vars['colData']['field']['customLabel']; ?>
  160. <?php elseif (isset ( $this->_tpl_vars['colData']['field']['label'] )): ?>
  161. {capture name="label" assign="label"}
  162. {sugar_translate label='<?php echo $this->_tpl_vars['colData']['field']['label']; ?>
  163. ' module='<?php echo $this->_tpl_vars['module']; ?>
  164. '}
  165. {/capture}
  166. {$label|strip_semicolon}:
  167. <?php elseif (isset ( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']] )): ?>
  168. {capture name="label" assign="label"}
  169. {sugar_translate label='<?php echo $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['vname']; ?>
  170. ' module='<?php echo $this->_tpl_vars['module']; ?>
  171. '}
  172. {/capture}
  173. {$label|strip_semicolon}:
  174. <?php endif; ?>
  175. <?php if (( $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]['required'] && ! isset ( $this->_tpl_vars['colData']['field']['displayParams']['required'] ) ) || ( isset ( $this->_tpl_vars['colData']['field']['displayParams']['required'] ) && $this->_tpl_vars['colData']['field']['displayParams']['required'] )): ?>
  176. <span class="required"><?php echo $this->_tpl_vars['APP']['LBL_REQUIRED_SYMBOL']; ?>
  177. </span>
  178. <?php endif; ?>
  179. </td>
  180. <?php endif; ?>
  181. <td valign="top" width='<?php echo $this->_tpl_vars['def']['templateMeta']['widths'][($this->_foreach['colIteration']['iteration']-1)]['field']; ?>
  182. %' <?php if ($this->_tpl_vars['colData']['colspan']): ?>colspan='<?php echo $this->_tpl_vars['colData']['colspan']; ?>
  183. '<?php endif; ?>>
  184. <?php if ($this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']] && ! empty ( $this->_tpl_vars['colData']['field']['fields'] )): ?>
  185. <?php $_from = $this->_tpl_vars['colData']['field']['fields']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  186. foreach ($_from as $this->_tpl_vars['subField']):
  187. ?>
  188. <?php if ($this->_tpl_vars['fields'][$this->_tpl_vars['subField']['name']]): ?>
  189. {counter name="panelFieldCount" print=false}
  190. <?php echo smarty_function_sugar_field(array('parentFieldArray' => 'fields','tabindex' => $this->_tpl_vars['colData']['field']['tabindex'],'vardef' => $this->_tpl_vars['fields'][$this->_tpl_vars['subField']['name']],'displayType' => 'EditView','displayParams' => $this->_tpl_vars['subField']['displayParams'],'formName' => $this->_tpl_vars['form_name']), $this);?>
  191. &nbsp;
  192. <?php endif; ?>
  193. <?php endforeach; endif; unset($_from); ?>
  194. <?php elseif (! empty ( $this->_tpl_vars['colData']['field']['customCode'] )): ?>
  195. {counter name="panelFieldCount" print=false}
  196. <?php $this->_tpl_vars['colData']['field']['displayParams']['idName'] = $this->_tpl_vars['module'] . $this->_tpl_vars['colData']['field']['name']; ?>
  197. <?php echo smarty_function_sugar_evalcolumn(array('var' => $this->_tpl_vars['colData']['field']['customCode'],'colData' => $this->_tpl_vars['colData'],'tabindex' => $this->_tpl_vars['colData']['field']['tabindex']), $this);?>
  198. <?php elseif ($this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']]): ?>
  199. {counter name="panelFieldCount" print=false}
  200. <?php echo $this->_tpl_vars['colData']['displayParams']; ?>
  201. <?php $this->_tpl_vars['colData']['field']['displayParams']['idName'] = $this->_tpl_vars['module'] . $this->_tpl_vars['colData']['field']['name']; ?>
  202. <?php echo smarty_function_sugar_field(array('parentFieldArray' => 'fields','tabindex' => $this->_tpl_vars['colData']['field']['tabindex'],'vardef' => $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']],'displayType' => 'EditView','displayParams' => $this->_tpl_vars['colData']['field']['displayParams'],'typeOverride' => $this->_tpl_vars['colData']['field']['type'],'formName' => $this->_tpl_vars['form_name']), $this);?>
  203. <?php endif; ?>
  204. </td>
  205. <?php endforeach; endif; unset($_from); ?>
  206. </tr>
  207. <?php endforeach; endif; unset($_from); ?>
  208. </table>
  209. <?php endforeach; endif; unset($_from); ?>