2025-11-12 19:46:06 +03:00
< ? php /* Smarty version Smarty - 3.1 . 7 , created on 2025 - 11 - 02 18 : 25 : 21
2025-09-26 10:43:05 +03:00
compiled from " /var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Vtiger/uitypes/File.tpl " */ ?>
2025-11-12 19:46:06 +03:00
< ? php /*%%SmartyHeaderCode:604144910690777e11c4b70-44203887%%*/ if ( ! defined ( 'SMARTY_DIR' )) exit ( 'no direct access allowed' );
2025-09-26 10:43:05 +03:00
$_valid = $_smarty_tpl -> decodeProperties ( array (
'file_dependency' =>
array (
'65e3cb4b0efea09be18fd0b94e17419a7a8618e4' =>
array (
0 => '/var/www/fastuser/data/www/crm.clientright.ru/includes/runtime/../../layouts/v7/modules/Vtiger/uitypes/File.tpl' ,
1 => 1758649447 ,
2 => 'file' ,
),
),
2025-11-12 19:46:06 +03:00
'nocache_hash' => '604144910690777e11c4b70-44203887' ,
2025-09-26 10:43:05 +03:00
'function' =>
array (
),
'variables' =>
array (
'FIELD_MODEL' => 0 ,
'MODULE' => 0 ,
'FIELD_VALUE' => 0 ,
'SPECIAL_VALIDATOR' => 0 ,
'FIELD_INFO' => 0 ,
'MAX_UPLOAD_LIMIT_MB' => 0 ,
'MAX_UPLOAD_LIMIT_BYTES' => 0 ,
'IS_EXTERNAL_LOCATION_TYPE' => 0 ,
),
'has_nocache_code' => false ,
2025-10-24 19:59:28 +03:00
'version' => 'Smarty-3.1.7' ,
2025-11-12 19:46:06 +03:00
'unifunc' => 'content_690777e11d86c' ,
2025-09-26 10:43:05 +03:00
), false ); /*/%%SmartyHeaderCode%%*/ ?>
2025-11-12 19:46:06 +03:00
< ? php if ( $_valid && ! is_callable ( 'content_690777e11d86c' )) { function content_690777e11d86c ( $_smarty_tpl ) { ?>
2025-09-26 10:43:05 +03:00
< ? php $_smarty_tpl -> tpl_vars [ " FIELD_INFO " ] = new Smarty_variable ( $_smarty_tpl -> tpl_vars [ 'FIELD_MODEL' ] -> value -> getFieldInfo (), null , 0 ); ?> <?php $_smarty_tpl->tpl_vars['FIELD_VALUE'] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('fieldvalue'), null, 0);?><?php $_smarty_tpl->tpl_vars["SPECIAL_VALIDATOR"] = new Smarty_variable($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getValidator(), null, 0);?><div class="fileUploadContainer text-left"><div class="fileUploadBtn btn btn-sm btn-primary"><span><i class="fa fa-laptop"></i> <?php echo vtranslate('LBL_ATTACH_FILES',$_smarty_tpl->tpl_vars['MODULE']->value);?>
</ span >< input type = " file " id = " <?php echo $_smarty_tpl->tpl_vars ['MODULE']->value;?>
_editView_fieldName_ < ? php echo $_smarty_tpl -> tpl_vars [ 'FIELD_MODEL' ] -> value -> get ( 'name' ); ?>
" class= " inputElement < ? php if ( $_smarty_tpl -> tpl_vars [ 'MODULE' ] -> value == 'ModComments' ){ ?> multi <?php }?> " maxlength="6" name="<?php if ($_smarty_tpl->tpl_vars['MODULE']->value=='ModComments'){?><?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
[] < ? php } else { ?> <?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getFieldName();?>
< ? php } ?> "value="<?php echo $_smarty_tpl->tpl_vars['FIELD_VALUE']->value;?>
" <?php if (!empty( $_smarty_tpl->tpl_vars ['SPECIAL_VALIDATOR']->value)) { ?>data-validator='<?php echo Zend_Json::encode( $_smarty_tpl->tpl_vars ['SPECIAL_VALIDATOR']->value);?>
'<?php }?><?php if ($_smarty_tpl->tpl_vars[' FIELD_INFO ']->value["mandatory"]==true){?> data-rule-required="true" <?php }?><?php if (count($_smarty_tpl->tpl_vars[' FIELD_INFO ']->value[' validator '])){?>data-specific-rules=' < ? php echo ZEND_JSON :: encode ( $_smarty_tpl -> tpl_vars [ 'FIELD_INFO' ] -> value [ " validator " ]); ?>
'<?php }?>/></div> <span class="uploadFileSizeLimit fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="<?php echo vtranslate(' LBL_MAX_UPLOAD_SIZE ',$_smarty_tpl->tpl_vars[' MODULE ' ] -> value ); ?>
< ? php echo $_smarty_tpl -> tpl_vars [ 'MAX_UPLOAD_LIMIT_MB' ] -> value ; ?>
< ? php echo vtranslate ( 'MB' , $_smarty_tpl -> tpl_vars [ 'MODULE' ] -> value ); ?>
" ><span class= " maxUploadSize " data-value= " < ? php echo $_smarty_tpl -> tpl_vars [ 'MAX_UPLOAD_LIMIT_BYTES' ] -> value ; ?>
" ></span></span><div class= " uploadedFileDetails < ? php if ( $_smarty_tpl -> tpl_vars [ 'IS_EXTERNAL_LOCATION_TYPE' ] -> value ){ ?> hide<?php }?>"><div class="uploadedFileSize"></div><div class="uploadedFileName"><?php if (!empty($_smarty_tpl->tpl_vars['FIELD_VALUE']->value)&&!$_REQUEST['isDuplicate']){?>[<?php echo $_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getDisplayValue($_smarty_tpl->tpl_vars['FIELD_VALUE']->value);?>
] < ? php } ?> </div></div></div>
< script >
jQuery ( document ) . ready ( function () {
var fileElements = jQuery ( 'input[type="file"]' , jQuery ( this ) . data ( 'fieldinfo' ) == 'file' );
fileElements . on ( 'change' , function ( e ) {
var element = jQuery ( this );
var fileSize = e . target . files [ 0 ] . size ;
var maxFileSize = element . closest ( 'form' ) . find ( '.maxUploadSize' ) . data ( 'value' );
if ( fileSize > maxFileSize ) {
alert ( app . vtranslate ( 'JS_EXCEEDS_MAX_UPLOAD_SIZE' ));
element . val ( null );
}
});
});
</ script >
< ? php }} ?>