133 lines
15 KiB
PHP
133 lines
15 KiB
PHP
<?php /* Smarty version Smarty-3.1.7, created on 2021-12-14 14:53:58
|
|
compiled from "/home/sophalnexs/www/sophalcrm/includes/runtime/../../layouts/v7/modules/Vtiger/partials/EditViewContents.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:13296368235e5f6b3f5ce749-50564388%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'5f7dd0fdb9f62f2aab29c4692e7a0604346be789' =>
|
|
array (
|
|
0 => '/home/sophalnexs/www/sophalcrm/includes/runtime/../../layouts/v7/modules/Vtiger/partials/EditViewContents.tpl',
|
|
1 => 1639493629,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '13296368235e5f6b3f5ce749-50564388',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_5e5f6b3f73714',
|
|
'variables' =>
|
|
array (
|
|
'PICKIST_DEPENDENCY_DATASOURCE' => 0,
|
|
'DUPLICATE_RECORDS' => 0,
|
|
'MODULE' => 0,
|
|
'RECORD_STRUCTURE' => 0,
|
|
'BLOCK_FIELDS' => 0,
|
|
'BLOCK_LABEL' => 0,
|
|
'FIELD_NAME' => 0,
|
|
'FIELD_MODEL' => 0,
|
|
'isPharma' => 0,
|
|
'isMedecin' => 0,
|
|
'isGrossiste' => 0,
|
|
'refrenceList' => 0,
|
|
'COUNTER' => 0,
|
|
'isReferenceField' => 0,
|
|
'refrenceListCount' => 0,
|
|
'DISPLAYID' => 0,
|
|
'REFERENCED_MODULE_STRUCTURE' => 0,
|
|
'value' => 0,
|
|
'REFERENCED_MODULE_NAME' => 0,
|
|
'TAXCLASS_DETAILS' => 0,
|
|
'taxCount' => 0,
|
|
'FILE_LOCATION_TYPE_FIELD' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_5e5f6b3f73714')) {function content_5e5f6b3f73714($_smarty_tpl) {?>
|
|
|
|
<?php if (!empty($_smarty_tpl->tpl_vars['PICKIST_DEPENDENCY_DATASOURCE']->value)){?><input type="hidden" name="picklistDependency" value='<?php echo Vtiger_Util_Helper::toSafeHTML($_smarty_tpl->tpl_vars['PICKIST_DEPENDENCY_DATASOURCE']->value);?>
|
|
' /><?php }?><div name='editContent'><?php if ($_smarty_tpl->tpl_vars['DUPLICATE_RECORDS']->value){?><div class="fieldBlockContainer duplicationMessageContainer"><div class="duplicationMessageHeader"><b><?php echo vtranslate('LBL_DUPLICATES_DETECTED',$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</b></div><div><?php echo getDuplicatesPreventionMessage($_smarty_tpl->tpl_vars['MODULE']->value,$_smarty_tpl->tpl_vars['DUPLICATE_RECORDS']->value);?>
|
|
</div></div><?php }?><?php $_smarty_tpl->tpl_vars['BLOCK_FIELDS'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['BLOCK_LABEL'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['RECORD_STRUCTURE']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key => $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value){
|
|
$_smarty_tpl->tpl_vars['BLOCK_FIELDS']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['BLOCK_LABEL']->value = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->key;
|
|
?><?php if (count($_smarty_tpl->tpl_vars['BLOCK_FIELDS']->value)>0){?><div class='fieldBlockContainer' data-block="<?php echo $_smarty_tpl->tpl_vars['BLOCK_LABEL']->value;?>
|
|
" <?php if ($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value=='Gestion des focus'){?>style='display: none;' id='focus'<?php }?>><h4 class='fieldBlockHeader'><?php echo vtranslate($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value,$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
</h4><hr><table class="table table-borderless"><tr><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable(0, null, 0);?><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['BLOCK_FIELDS']->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;
|
|
$_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key;
|
|
?><?php if (($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='industry'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue')=='Pharmacie')){?><?php $_smarty_tpl->tpl_vars["isPharma"] = new Smarty_variable(1, null, 0);?><?php }?><?php if (($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='industry'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue')=='Medecin')){?><?php $_smarty_tpl->tpl_vars["isMedecin"] = new Smarty_variable(1, null, 0);?><?php }?><?php if (($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='industry'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue')=='Grossiste')){?><?php $_smarty_tpl->tpl_vars["isGrossiste"] = new Smarty_variable(1, null, 0);?><?php }?><?php if (($_smarty_tpl->tpl_vars['MODULE']->value=='Events'&&$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='subject')){?><?php continue 1?><?php }?><?php $_smarty_tpl->tpl_vars["isPotentiel"] = new Smarty_variable(0, null, 0);?><?php if (($_smarty_tpl->tpl_vars['MODULE']->value=='Accounts'&&$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='rating'&&$_smarty_tpl->tpl_vars['isPharma']->value)){?><?php $_smarty_tpl->tpl_vars["isPotentiel"] = new Smarty_variable(1, null, 0);?><?php }?><?php if (($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1159'||$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1063'||$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1157')&&!$_smarty_tpl->tpl_vars['isMedecin']->value){?><?php continue 1?><?php }?><?php if (($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_968'||$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1015'||$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1161')&&!$_smarty_tpl->tpl_vars['isPharma']->value){?><?php continue 1?><?php }?><?php if ($_smarty_tpl->tpl_vars['FIELD_NAME']->value=='cf_1025'&&!$_smarty_tpl->tpl_vars['isGrossiste']->value){?><?php continue 1?><?php }?><?php $_smarty_tpl->tpl_vars["isReferenceField"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType(), null, 0);?><?php $_smarty_tpl->tpl_vars["refrenceList"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getReferenceList(), null, 0);?><?php $_smarty_tpl->tpl_vars["refrenceListCount"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['refrenceList']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isEditable()==true){?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=="19"){?><?php if ($_smarty_tpl->tpl_vars['COUNTER']->value=='1'){?><td></td><td></td></tr><tr><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable(0, null, 0);?><?php }?><?php }?><?php if ($_smarty_tpl->tpl_vars['COUNTER']->value==2){?></tr><tr><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable(1, null, 0);?><?php }else{ ?><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable($_smarty_tpl->tpl_vars['COUNTER']->value+1, null, 0);?><?php }?><td class="fieldLabel alignMiddle"><?php if ($_smarty_tpl->tpl_vars['isReferenceField']->value=="reference"){?><?php if ($_smarty_tpl->tpl_vars['refrenceListCount']->value>1){?><?php $_smarty_tpl->tpl_vars["DISPLAYID"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?><?php $_smarty_tpl->tpl_vars["REFERENCED_MODULE_STRUCTURE"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getReferenceModule($_smarty_tpl->tpl_vars['DISPLAYID']->value), null, 0);?><?php if (!empty($_smarty_tpl->tpl_vars['REFERENCED_MODULE_STRUCTURE']->value)){?><?php $_smarty_tpl->tpl_vars["REFERENCED_MODULE_NAME"] = new Smarty_variable($_smarty_tpl->tpl_vars['REFERENCED_MODULE_STRUCTURE']->value->get('name'), null, 0);?><?php }?><select disabled style="width: 140px;" class="select2 referenceModulesList"><?php $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['index'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['refrenceList']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value){
|
|
$_smarty_tpl->tpl_vars['value']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['index']->value = $_smarty_tpl->tpl_vars['value']->key;
|
|
?><option value="<?php echo $_smarty_tpl->tpl_vars['value']->value;?>
|
|
" <?php if ($_smarty_tpl->tpl_vars['value']->value==$_smarty_tpl->tpl_vars['REFERENCED_MODULE_NAME']->value){?> selected <?php }?>><?php echo vtranslate($_smarty_tpl->tpl_vars['value']->value,$_smarty_tpl->tpl_vars['value']->value);?>
|
|
</option><?php } ?></select><?php }else{ ?><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
<?php }?><?php }elseif($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=="83"){?><?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('COUNTER'=>$_smarty_tpl->tpl_vars['COUNTER']->value,'MODULE'=>$_smarty_tpl->tpl_vars['MODULE']->value), 0);?>
|
|
<?php if ($_smarty_tpl->tpl_vars['TAXCLASS_DETAILS']->value){?><?php $_smarty_tpl->tpl_vars['taxCount'] = new Smarty_variable(count($_smarty_tpl->tpl_vars['TAXCLASS_DETAILS']->value)%2, null, 0);?><?php if ($_smarty_tpl->tpl_vars['taxCount']->value==0){?><?php if ($_smarty_tpl->tpl_vars['COUNTER']->value==2){?><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable(1, null, 0);?><?php }else{ ?><?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable(2, null, 0);?><?php }?><?php }?><?php }?><?php }else{ ?><?php if ($_smarty_tpl->tpl_vars['MODULE']->value=='Documents'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label')=='File Name'){?><?php $_smarty_tpl->tpl_vars['FILE_LOCATION_TYPE_FIELD'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD_STRUCTURE']->value['LBL_FILE_INFORMATION']['filelocationtype'], null, 0);?><?php if ($_smarty_tpl->tpl_vars['FILE_LOCATION_TYPE_FIELD']->value){?><?php if ($_smarty_tpl->tpl_vars['FILE_LOCATION_TYPE_FIELD']->value->get('fieldvalue')=='E'){?><?php echo vtranslate("LBL_FILE_URL",$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
<span class="redColor">*</span><?php }else{ ?><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
<?php }?><?php }else{ ?><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
<?php }?><?php }else{ ?><?php if ($_smarty_tpl->tpl_vars['MODULE']->value=='Accounts'&&$_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label')=="Assigned To"){?>Visiteur<?php }else{ ?><?php echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'),$_smarty_tpl->tpl_vars['MODULE']->value);?>
|
|
<?php }?><?php }?><?php }?> <?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->isMandatory()==true){?> <span class="redColor">*</span> <?php }?></td><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')!='83'){?><td class="fieldValue" <?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldDataType()=='boolean'){?> style="width:25%" <?php }?> <?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('uitype')=='19'){?> colspan="3" <?php $_smarty_tpl->tpl_vars['COUNTER'] = new Smarty_variable($_smarty_tpl->tpl_vars['COUNTER']->value+1, null, 0);?> <?php }?>><?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);?>
|
|
<?php if (($_smarty_tpl->tpl_vars['MODULE']->value=='Accounts'&&$_smarty_tpl->tpl_vars['FIELD_NAME']->value=='rating'&&!$_smarty_tpl->tpl_vars['isPharma']->value)){?> <span id='help' class="btn addButton btn-success">?</span> <?php }?></td><?php }?><?php }?><?php } ?><?php if ((1 & $_smarty_tpl->tpl_vars['COUNTER']->value)){?><td></td><td></td><?php }?></tr><?php if ($_smarty_tpl->tpl_vars['BLOCK_LABEL']->value=='GPS'){?><tr><td class="fieldLabel alignMiddle"></td><td class="fieldLabel alignMiddle"><button type="button" class="btn addButton btn-danger" onclick ="getLocation();"><div class="fa fa-crosshairs" aria-hidden="true"></div> Géolocalisation</button></td></tr><?php }?></table></div><?php }?><?php } ?></div><div class="modal fade" id="helpModalCenter" tabindex="-1"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header"><button style="margin-top:0px;" type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true"><span aria-hidden="true">×</span></button><h5 class="modal-title" id="helpModalLongTitle">Segmentation</h5></div><div class="modal-body"><br><p> A : plus de 200 patients / Semaine</p><br><p> B : 150 - 199 patients / Semaine</p><br><p"> C : 100 - 149 patients / Semaine</p><br><p> D : 50 - 99 patients / Semaine</p><br><p> E : 0 - 49 patients / Semaine</p><br><br><p> + : Pro SOPHAL</p><br><p> - : Pro Concurrent</p></div><div class="modal-footer"></div></div></div></div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$("#help").click(function(){
|
|
|
|
$('#helpModalCenter').modal('show');
|
|
|
|
});
|
|
|
|
|
|
|
|
function showLocation(position) {
|
|
|
|
var latitude = position.coords.latitude;
|
|
|
|
var longitude = position.coords.longitude;
|
|
|
|
document.getElementById("Accounts_editView_fieldName_cf_986").value = latitude;
|
|
|
|
document.getElementById("Accounts_editView_fieldName_cf_988").value = longitude;
|
|
|
|
}
|
|
|
|
|
|
|
|
function errorHandler(err) {
|
|
|
|
|
|
|
|
if(err.code == 1) {
|
|
|
|
alert("Erreur: Accès refusé");
|
|
|
|
} else if( err.code == 2) {
|
|
|
|
alert("Erreur: Votre position n'est pas disponible");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function getLocation() {
|
|
|
|
|
|
|
|
if(navigator.geolocation) {
|
|
|
|
navigator.geolocation.getCurrentPosition(function(position){
|
|
|
|
navigator.geolocation.getCurrentPosition(showLocation, errorHandler, { enableHighAccuracy: true, maximumAge: 1000, timeout: 6000 });
|
|
|
|
},function(){}, { maximumAge: 0, timeout: 6000 });
|
|
|
|
} else {
|
|
|
|
alert("Votre navigateur ne supporte pas la géolocalisation!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
var res = $('#activitytype').val();
|
|
|
|
|
|
|
|
if(res == 'Focus'){
|
|
|
|
$("#focus").css("display", "block");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
$('#activitytype').change(function() {
|
|
|
|
var res = $(this).val();
|
|
|
|
|
|
|
|
if(res == 'Focus'){
|
|
|
|
$("#focus").css("display", "block");
|
|
|
|
}else{
|
|
|
|
$("#focus").css("display", "none");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<?php }} ?>
|