<?php /* Smarty version Smarty-3.1.7, created on 2018-10-05 18:21:12
         compiled from "/var/www/html/crm.fursysperu.com.pe/includes/runtime/../../layouts/vlayout2/modules/Leads/ConvertLead.tpl" */ ?>
<?php /*%%SmartyHeaderCode:3090703695b17347a8bfbe3-67434106%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7d553b44598bd1d87b80bafb9f1206cdbeb1da9a' => 
    array (
      0 => '/var/www/html/crm.fursysperu.com.pe/includes/runtime/../../layouts/vlayout2/modules/Leads/ConvertLead.tpl',
      1 => 1538763442,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3090703695b17347a8bfbe3-67434106',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.7',
  'unifunc' => 'content_5b17347a9f05b',
  'variables' => 
  array (
    'CONVERT_LEAD_FIELDS' => 0,
    'MODULE' => 0,
    'RECORD' => 0,
    'MODULE_NAME' => 0,
    'PROSPECTO_DE' => 0,
    'FECHA_ESTIMADA_CIERRE' => 0,
    'ACCOUNT_FIELD_MODEL' => 0,
    'CONTACT_FIELD_MODEL' => 0,
    'CONTACT_ACCOUNT_FIELD_MODEL' => 0,
    'SINGLE_MODULE_NAME' => 0,
    'MODULE_FIELD_MODEL' => 0,
    'FIELD_MODEL' => 0,
    'ASSIGN_TO' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5b17347a9f05b')) {function content_5b17347a9f05b($_smarty_tpl) {?>
<div id="convertLeadContainer" class='modelContainer'><?php if (!$_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Accounts']&&!$_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Contacts']){?><input type="hidden" id="convertLeadErrorTitle" value="<?php echo vtranslate('LBL_CONVERT_LEAD_ERROR_TITLE',$_smarty_tpl->tpl_vars['MODULE']->value);?>
"/><input id="convertLeadError" class="convertLeadError" type="hidden" value="<?php echo vtranslate('LBL_CONVERT_LEAD_ERROR',$_smarty_tpl->tpl_vars['MODULE']->value);?>
"/><?php }else{ ?><div class="modal-header contentsBackground"><button data-dismiss="modal" class="close" title="<?php echo vtranslate('LBL_CLOSE');?>
">&times;</button><h3><?php echo vtranslate('LBL_CONVERT_LEAD',$_smarty_tpl->tpl_vars['MODULE']->value);?>
 : <?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getName();?>
</h3></div></div><form class="form-horizontal" id="convertLeadForm" method="post" action="index.php"><input type="hidden" name="module" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value;?>
"/><input type="hidden" name="view" value="SaveConvertLead"/><input type="hidden" name="record" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
"/><input type="hidden" name="modules" value=''/><div class="modal-body accordion" id="leadAccordion"><div class="row" style="width:600px"><div class="col-lg-1"></div><div class="col-lg-8 moduleContent" ><h5 style="text-align: center; color: #EF5E29;">Usted convertirá un Pre-Contacto a Cuenta, Contacto y Oportunidad con los siguientes datos. Por favor verifique que estos datos estén correctos:</h5></div></div><?php  $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->_loop = false;
 $_smarty_tpl->tpl_vars['MODULE_NAME'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->value){
$_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->_loop = true;
 $_smarty_tpl->tpl_vars['MODULE_NAME']->value = $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->key;
?><div class="accordion-group convertLeadModules"><div class="header accordion-heading"><div data-parent="#leadAccordion" data-toggle="collapse" class="accordion-toggle table-bordered moduleSelection" href="#<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
_FieldInfo"><input type="hidden" id="prospecto_de" value="<?php echo $_smarty_tpl->tpl_vars['PROSPECTO_DE']->value;?>
"><input type="hidden" id="fecha_estimada_cierre" value="<?php echo $_smarty_tpl->tpl_vars['FECHA_ESTIMADA_CIERRE']->value;?>
"><?php if ($_smarty_tpl->tpl_vars['ACCOUNT_FIELD_MODEL']->value->isMandatory()){?><input type="hidden" id="oppAccMandatory" value=<?php echo $_smarty_tpl->tpl_vars['ACCOUNT_FIELD_MODEL']->value->isMandatory();?>
 /><?php }?><?php if ($_smarty_tpl->tpl_vars['CONTACT_FIELD_MODEL']->value->isMandatory()){?><input type="hidden" id="oppConMandatory" value=<?php echo $_smarty_tpl->tpl_vars['CONTACT_FIELD_MODEL']->value->isMandatory();?>
 /><?php }?><?php if ($_smarty_tpl->tpl_vars['CONTACT_ACCOUNT_FIELD_MODEL']->value->isMandatory()){?><input type="hidden" id="conAccMandatory" value=<?php echo $_smarty_tpl->tpl_vars['CONTACT_ACCOUNT_FIELD_MODEL']->value->isMandatory();?>
 /><?php }?><input id="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
Module" class="convertLeadModuleSelection alignBottom" data-module="<?php echo vtranslate($_smarty_tpl->tpl_vars['MODULE_NAME']->value,$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
" value="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
" type="checkbox" checked=""/><?php $_smarty_tpl->tpl_vars['SINGLE_MODULE_NAME'] = new Smarty_variable("SINGLE_".($_smarty_tpl->tpl_vars['MODULE_NAME']->value), null, 0);?><span style="position:relative;top:2px;">&nbsp;&nbsp;&nbsp;<?php echo vtranslate('LBL_CREATE',$_smarty_tpl->tpl_vars['MODULE']->value);?>
&nbsp;<?php echo vtranslate($_smarty_tpl->tpl_vars['SINGLE_MODULE_NAME']->value,$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</span><span class="pull-right"><i class="iconArrow<?php if ($_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Accounts']&&$_smarty_tpl->tpl_vars['MODULE_NAME']->value=="Accounts"){?> icon-inverted icon-chevron-up <?php }elseif(!$_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Accounts']&&$_smarty_tpl->tpl_vars['MODULE_NAME']->value=="Contacts"){?> icon-inverted icon-chevron-up <?php }else{ ?> icon-inverted icon-chevron-down <?php }?>alignBottom"></i></span></div></div><div id="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
_FieldInfo" class="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
_FieldInfo accordion-body collapse fieldInfo <?php if ($_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Accounts']&&$_smarty_tpl->tpl_vars['MODULE_NAME']->value=="Accounts"){?> in <?php }elseif(!$_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value['Accounts']&&$_smarty_tpl->tpl_vars['MODULE_NAME']->value=="Contacts"){?> in <?php }?>"><table class="table table-bordered moduleBlock"><?php  $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value){
$_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true;
?><tr><td class="fieldLabel"><label class='muted pull-right marginRight10px'><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> <span class="redColor">*</span> <?php }?><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
</label></td><td class="fieldValue"><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getTemplateName()), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
</td></tr><?php } ?></table></div></div><?php } ?><div class="overflowVisible"><table class="table table-bordered"><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['ASSIGN_TO']->value, null, 0);?><tr><td class="fieldLabel"><label class='muted pull-right'><span class="redColor">*</span> <?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
<?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> <?php }?></label></td><td class="fieldValue"><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getTemplateName(),$_smarty_tpl->tpl_vars['MODULE']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
</td></tr><tr><td class="fieldLabel"><label class='muted pull-right'><?php echo vtranslate('LBL_TRANSFER_RELATED_RECORD',$_smarty_tpl->tpl_vars['MODULE']->value);?>
</label></td><td class="fieldValue"><?php  $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->_loop = false;
 $_smarty_tpl->tpl_vars['MODULE_NAME'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['CONVERT_LEAD_FIELDS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->value){
$_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->_loop = true;
 $_smarty_tpl->tpl_vars['MODULE_NAME']->value = $_smarty_tpl->tpl_vars['MODULE_FIELD_MODEL']->key;
?><?php if ($_smarty_tpl->tpl_vars['MODULE_NAME']->value!='Potentials'){?><input type="radio" id="transfer<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
" class="transferModule alignBottom" name="transferModule" value="<?php echo $_smarty_tpl->tpl_vars['MODULE_NAME']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['MODULE_NAME']->value=="Accounts"){?> checked="" <?php }?>/><?php if ($_smarty_tpl->tpl_vars['MODULE_NAME']->value=='Contacts'){?>&nbsp; <?php echo vtranslate('SINGLE_Contacts',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
 &nbsp;&nbsp;<?php }else{ ?>&nbsp; <?php echo vtranslate('SINGLE_Accounts',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
 &nbsp;&nbsp;<?php }?><?php }?><?php } ?></td></tr></table></div></div><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path('ModalFooter.tpl',$_smarty_tpl->tpl_vars['MODULE']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

                <script type="text/javascript">
                    $(document).ready(function(){
                        //-- Henry
                        console.log('setea');
                        setTimeout(function(){
                        	var form = $("#convertLeadForm");
	                        var asignado = $("select[name='assigned_user_id']",form);
	                        $("select[name='assigned_user_id'] option:selected",form).removeAttr("selected");
	    					asignado.append('<option value="" selected="selected">Seleccione Usuario</option>').trigger("chosen:updated");
	    					$(".chzn-container-single a span",asignado.parent()).text("");
	    					$('#Potentials_FieldInfo select[name="sales_stage"]').children('option[value="Home: Interes"]').attr('selected', true).trigger("liszt:updated");
                        },1000)
                        
                    });
                </script>
            </form><?php }?></div><?php }} ?>