<?php
/* Smarty version 4.3.2, created on 2024-05-22 18:04:07
  from '/var/www/html/public/legacy/cache/themes/suite8/modules/Documents/EditView.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.2',
  'unifunc' => 'content_664e3397bc44d6_91287114',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '77fb2e0ce3dec10a3b5d8dd5d6c4f57d268a8d22' => 
    array (
      0 => '/var/www/html/public/legacy/cache/themes/suite8/modules/Documents/EditView.tpl',
      1 => 1716401047,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_664e3397bc44d6_91287114 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_checkPlugins(array(0=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/modifier.escape.php','function'=>'smarty_modifier_escape',),1=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_include.php','function'=>'smarty_function_sugar_include',),2=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_translate.php','function'=>'smarty_function_sugar_translate',),3=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/block.minify.php','function'=>'smarty_block_minify',),4=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/modifier.strip_semicolon.php','function'=>'smarty_modifier_strip_semicolon',),5=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.counter.php','function'=>'smarty_function_counter',),6=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_getimage.php','function'=>'smarty_function_sugar_getimage',),7=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_image.php','function'=>'smarty_function_sugar_image',),8=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.html_options.php','function'=>'smarty_function_html_options',),9=>array('file'=>'/var/www/html/public/legacy/include/Smarty/plugins/function.sugar_getscript.php','function'=>'smarty_function_sugar_getscript',),));
?>

<div class="edit-border-bottom"></div>

<?php echo '<script'; ?>
>
    
    $(document).ready(function(){
	    $("ul.clickMenu").each(function(index, node){
	        $(node).sugarActionMenu();
	    });

        if($('.edit-view-pagination').children().length == 0) $('.saveAndContinue').remove();
    });
    
<?php echo '</script'; ?>
>
<div class="clear"></div>
<form action="index.php" method="POST" name="<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
" id="<?php echo $_smarty_tpl->tpl_vars['form_id']->value;?>
" <?php echo $_smarty_tpl->tpl_vars['enctype']->value;?>
>
<div class="edit-view-pagination-mobile-container">
<div class="edit-view-pagination edit-view-mobile-pagination">
<?php echo $_smarty_tpl->tpl_vars['PAGINATION']->value;?>

</div>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dcQuickEdit">
<tr>
<td class="buttons action-buttons">
<input type="hidden" name="module" value="<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
">
<?php if ((isset($_REQUEST['isDuplicate'])) && $_REQUEST['isDuplicate'] == "true") {?>
<input type="hidden" name="record" value="">
<input type="hidden" name="duplicateSave" value="true">
<input type="hidden" name="duplicateId" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['id']['value'];?>
">
<?php } else { ?>
<input type="hidden" name="record" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['id']['value'];?>
">
<?php }?>
<input type="hidden" name="isDuplicate" value="false">
<input type="hidden" name="action">
<input type="hidden" name="return_module" value="<?php echo $_REQUEST['return_module'];?>
">
<input type="hidden" name="return_action" value="<?php echo $_REQUEST['return_action'];?>
">
<input type="hidden" name="return_id" value="<?php echo $_REQUEST['return_id'];?>
">
<input type="hidden" name="module_tab"> 
<input type="hidden" name="contact_role">
<?php if ((!empty($_REQUEST['return_module']) || !empty($_REQUEST['relate_to'])) && !((isset($_REQUEST['isDuplicate'])) && $_REQUEST['isDuplicate'] == "true")) {?>
<input type="hidden" name="relate_to" value="<?php if ($_REQUEST['return_relationship']) {
echo $_REQUEST['return_relationship'];
} elseif ($_REQUEST['relate_to'] && empty($_REQUEST['from_dcmenu'])) {
echo $_REQUEST['relate_to'];
} elseif (empty($_smarty_tpl->tpl_vars['isDCForm']->value) && empty($_REQUEST['from_dcmenu'])) {
echo $_REQUEST['return_module'];
}?>">
<input type="hidden" name="relate_id" value="<?php echo $_REQUEST['return_id'];?>
">
<?php }?>
<input type="hidden" name="offset" value="<?php echo $_smarty_tpl->tpl_vars['offset']->value;?>
">
<?php $_smarty_tpl->_assignInScope('place', "_HEADER");?> <!-- to be used for id for buttons with custom code in def files-->
<input type="hidden" name="old_id" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['document_revision_id']['value'];?>
">   
<input type="hidden" name="contract_id" value="<?php echo $_REQUEST['contract_id'];?>
">   
<?php if ($_smarty_tpl->tpl_vars['bean']->value->aclAccess("save")) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SAVE_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SAVE_BUTTON_KEY'];?>
" class="button primary" onclick="var _form = document.getElementById('EditView'); <?php if ($_smarty_tpl->tpl_vars['isDuplicate']->value) {?>_form.return_id.value=''; <?php }?>_form.action.value='Save'; if(check_form('EditView'))SUGAR.ajaxUI.submitForm(_form);return false;" type="submit" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SAVE_BUTTON_LABEL'];?>
" id="SAVE"><?php }?> 
<?php if (!empty($_REQUEST['return_action']) && ($_REQUEST['return_action'] == "DetailView" && !empty($_REQUEST['return_id']))) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=DetailView&module=<?php echo smarty_modifier_escape($_REQUEST['return_module'],"url");?>
&record=<?php echo smarty_modifier_escape($_REQUEST['return_id'],"url");?>
'); return false;" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" type="button" id="CANCEL"> <?php } elseif (!empty($_REQUEST['return_action']) && ($_REQUEST['return_action'] == "DetailView" && !empty($_smarty_tpl->tpl_vars['fields']->value['id']['value']))) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=DetailView&module=<?php echo smarty_modifier_escape($_REQUEST['return_module'],"url");?>
&record=<?php echo $_smarty_tpl->tpl_vars['fields']->value['id']['value'];?>
'); return false;" type="button" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" id="CANCEL"> <?php } elseif (!empty($_REQUEST['return_action']) && ($_REQUEST['return_action'] == "DetailView" && empty($_smarty_tpl->tpl_vars['fields']->value['id']['value'])) && empty($_REQUEST['return_id'])) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=ListView&module=<?php echo smarty_modifier_escape($_REQUEST['return_module'],"url");?>
&record=<?php echo $_smarty_tpl->tpl_vars['fields']->value['id']['value'];?>
'); return false;" type="button" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" id="CANCEL"> <?php } elseif (!empty($_REQUEST['return_action']) && !empty($_REQUEST['return_module'])) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=<?php echo $_REQUEST['return_action'];?>
&module=<?php echo smarty_modifier_escape($_REQUEST['return_module'],"url");?>
'); return false;" type="button" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" id="CANCEL"> <?php } elseif (empty($_REQUEST['return_action']) || empty($_REQUEST['return_id']) && !empty($_smarty_tpl->tpl_vars['fields']->value['id']['value'])) {?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=index&module=Documents'); return false;" type="button" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" id="CANCEL"> <?php } else { ?><input title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_TITLE'];?>
" accessKey="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_KEY'];?>
" class="button" onclick="SUGAR.ajaxUI.loadContent('index.php?action=index&module=<?php echo smarty_modifier_escape($_REQUEST['return_module'],"url");?>
&record=<?php echo smarty_modifier_escape($_REQUEST['return_id'],"url");?>
'); return false;" type="button" name="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CANCEL_BUTTON_LABEL'];?>
" id="CANCEL"> <?php }
if ($_smarty_tpl->tpl_vars['showVCRControl']->value) {?>
<button type="button" id="save_and_continue" class="button saveAndContinue" title="<?php echo $_smarty_tpl->tpl_vars['app_strings']->value['LBL_SAVE_AND_CONTINUE'];?>
" onClick="SUGAR.saveAndContinue(this);">
<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SAVE_AND_CONTINUE'];?>

</button>
<?php }
if ($_smarty_tpl->tpl_vars['bean']->value->aclAccess("detail")) {
if (!empty($_smarty_tpl->tpl_vars['fields']->value['id']['value']) && $_smarty_tpl->tpl_vars['isAuditEnabled']->value) {?><input id="btn_view_change_log" title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LNK_VIEW_CHANGE_LOG'];?>
" class="button" onclick='open_popup("Audit", "600", "400", "&record=<?php echo $_smarty_tpl->tpl_vars['fields']->value['id']['value'];?>
&module_name=Documents", true, false,  { "call_back_function":"set_return","form_name":"EditView","field_to_name_array":[] } ); return false;' type="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LNK_VIEW_CHANGE_LOG'];?>
"><?php }
}?>
</td>
<td align='right' class="edit-view-pagination-desktop-container">
<div class="edit-view-pagination edit-view-pagination-desktop">
<?php echo $_smarty_tpl->tpl_vars['PAGINATION']->value;?>

</div>
</td>
</tr>
</table>
<?php echo smarty_function_sugar_include(array('include'=>$_smarty_tpl->tpl_vars['includes']->value),$_smarty_tpl);?>

<div id="EditView_tabs">

<ul class="nav nav-tabs">
</ul>
<div class="clearfix"></div>
<div class="tab-content" style="padding: 0; border: 0;">

<div class="tab-pane panel-collapse">&nbsp;</div>
</div>

<div class="panel-content">




<div class="panel panel-default">
<div class="panel-heading ">
<a class="" role="button" data-toggle="collapse-edit" aria-expanded="false">
<div class="col-xs-10 col-sm-11 col-md-11">
<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOCUMENT_INFORMATION','module'=>'Documents'),$_smarty_tpl);?>

</div>
</a>
</div>
<div class="panel-body panel-collapse collapse in panelContainer" id="detailpanel_-1" data-id="LBL_DOCUMENT_INFORMATION">
<div class="tab-content">
<!-- tab_panel_content.tpl -->
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="filename">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_FILENAME">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_FILENAME','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<span class="required">*</span>
<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="file" field="filename"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<?php echo '<script'; ?>
 type="text/javascript" src='cache/include/externalAPI.cache.js?v=k1D8P6kumomUOESvIlRyWw'><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript" src='include/SugarFields/Fields/File/SugarFieldFile.js?v=k1D8P6kumomUOESvIlRyWw'><?php echo '</script'; ?>
>
<?php if (!empty($_smarty_tpl->tpl_vars['fields']->value['filename']['value'])) {
$_smarty_tpl->_assignInScope('showRemove', true);
} else {
$_smarty_tpl->_assignInScope('showRemove', false);
}
if (!empty($_smarty_tpl->tpl_vars['fields']->value['filename']['value'])) {
$_smarty_tpl->_assignInScope('showRemove', true);
$_smarty_tpl->_assignInScope('noChange', true);
} else {
$_smarty_tpl->_assignInScope('noChange', false);
}?>
<input type="hidden" name="deleteAttachment" value="0">
<input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['value'];?>
">
<input type="hidden" name="doc_id" id="doc_id" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['doc_id']['value'];?>
">
<input type="hidden" name="doc_url" id="doc_url" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['doc_url']['value'];?>
">
<input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_old_doctype" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_old_doctype" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['doc_type']['value'];?>
">
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_old" style="display:<?php if (!$_smarty_tpl->tpl_vars['showRemove']->value) {?>none;<?php }?>">
<a href="index.php?entryPoint=download&id=<?php echo $_smarty_tpl->tpl_vars['fields']->value['document_revision_id']['value'];?>
&type=<?php echo $_smarty_tpl->tpl_vars['module']->value;?>
" class="tabDetailViewDFLink"><?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['value'];?>
</a>
<?php if ((isset($_smarty_tpl->tpl_vars['fields']->value['doc_type'])) && !empty($_smarty_tpl->tpl_vars['fields']->value['doc_type']['value']) && $_smarty_tpl->tpl_vars['fields']->value['doc_type']['value'] != 'Sugar' && !empty($_smarty_tpl->tpl_vars['fields']->value['doc_url']['value'])) {
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, 'imageNameCapture', 'imageName', null);
echo $_smarty_tpl->tpl_vars['fields']->value['doc_type']['value'];?>
_image_inline.png
<?php $_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);?>
<a href="<?php echo $_smarty_tpl->tpl_vars['fields']->value['doc_url']['value'];?>
" class="tabDetailViewDFLink" target="_blank"><?php echo smarty_function_sugar_getimage(array('name'=>$_smarty_tpl->tpl_vars['imageName']->value,'alt'=>$_smarty_tpl->tpl_vars['imageName']->value,'other_attributes'=>'border="0" '),$_smarty_tpl);?>
</a>
<?php }
if (!$_smarty_tpl->tpl_vars['noChange']->value) {?>
<input type='button' class='button' id='remove_button' value='<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_REMOVE'];?>
' onclick='SUGAR.field.file.deleteAttachment("<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
","doc_type",this);'>
<?php }?>
</span>
<?php if (!$_smarty_tpl->tpl_vars['noChange']->value) {?>
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_new" style="display:<?php if ($_smarty_tpl->tpl_vars['showRemove']->value) {?>none;<?php }?>">
<input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_escaped">
<input id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file" 
type="file" title='' size="30"
maxlength="255"
>
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_externalApiSelector" style="display:none;">
<br><h4 id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_externalApiLabel">
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_more"><?php echo smarty_function_sugar_image(array('name'=>"advanced_search",'width'=>"8px",'height'=>"8px"),$_smarty_tpl);?>
</span>
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_less" style="display: none;"><?php echo smarty_function_sugar_image(array('name'=>"basic_search",'width'=>"8px",'height'=>"8px"),$_smarty_tpl);?>
</span>
<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SEARCH_EXTERNAL_API'];?>
</h4>
<span id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteNameSpan" style="display: none;">
<input type="text" class="sqsEnabled" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteName" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteName" size="30" 
maxlength="255"
autocomplete="off" value="<?php if (!empty($_smarty_tpl->tpl_vars['fields']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_doc_id']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_doc_id']->value['index'] : null)]['value'])) {
echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];
}?>">
<span class="id-ff multiple">
<button type="button" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteSelectBtn" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteSelectBtn" tabindex="0" title="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_SELECT_FILE_TITLE"),$_smarty_tpl);?>
" class="button firstChild" value="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_SELECT_FILE_LABEL"),$_smarty_tpl);?>
"
onclick="SUGAR.field.file.openPopup('<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
'); return false;">
<span class="suitepicon suitepicon-action-select"></span></button>
<button type="button" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteClearBtn" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteClearBtn" tabindex="0" title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CLEAR_BUTTON_TITLE'];?>
" class="button lastChild" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_CLEAR_BUTTON_LABEL'];?>
" onclick="SUGAR.field.file.clearRemote('<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
'); return false;">
<span class="suitepicon suitepicon-action-clear"></span>
</button>
</span>
</span>
<div style="display: none;" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_securityLevelBox">
<b><?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_EXTERNAL_SECURITY_LEVEL'];?>
: </b>
<select name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_securityLevel" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_securityLevel">
</select>
</div>
<?php echo '<script'; ?>
 type="text/javascript">
YAHOO.util.Event.onDOMReady(function() {
SUGAR.field.file.setupEapiShowHide("<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
","doc_type","<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
");
});

if ( typeof(sqs_objects) == 'undefined' ) {
    sqs_objects = new Array;
}

sqs_objects["<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteName"] = {
"form":"<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
",
"method":"externalApi",
"api":"",
"modules":["EAPM"],
"field_list":["name", "id", "url", "id"],
"populate_list":["<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteName", "doc_id", "doc_url", "<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
"],
"required_list":["name"],
"conditions":[],
"no_match_text":"No Match"
};

if(typeof QSProcessedFieldsArray != 'undefined') {
	QSProcessedFieldsArray["<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_remoteName"] = false;
}
<?php if ($_smarty_tpl->tpl_vars['showRemove']->value && strlen("doc_type") > 0) {?>
document.getElementById("doc_type").disabled = true;
<?php }?>
enableQS(false);
<?php echo '</script'; ?>
>
<?php } else { ?>

<?php echo '<script'; ?>
 type="text/javascript">
YAHOO.util.Event.onDOMReady(function() 
{
document.getElementById("doc_type").disabled = true;
});
<?php echo '</script'; ?>
>
<?php }
echo '<script'; ?>
 type="text/javascript">

var <?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_setFileName = function()

{
    var dom = YAHOO.util.Dom;
    
    sourceElement = "<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file";
    targetElement = "document_name";
	src = new String(dom.get(sourceElement).value);
	target = new String(dom.get(targetElement).value);

	if (target.length == 0) 
	{
		lastindex=src.lastIndexOf("/");
		if (lastindex == -1) {
			lastindex=src.lastIndexOf("\\");
		} 
		if (lastindex == -1) {
			dom.get(targetElement).value=src;
		} else {
			dom.get(targetElement).value=src.substr(++lastindex, src.length);
		}	
	}	
}


YAHOO.util.Event.onDOMReady(function() 
{
if(document.getElementById("document_name"))
{
YAHOO.util.Event.addListener('<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file', 'change', <?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_setFileName);
YAHOO.util.Event.addListener(['<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file', 'doc_type'], 'change', SUGAR.field.file.checkFileExtension,{ fileEl: '<?php echo $_smarty_tpl->tpl_vars['fields']->value['filename']['name'];?>
_file', targEl: 'document_name'});
}
});
<?php echo '</script'; ?>
>
</span>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="status_id">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DOC_STATUS">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_STATUS','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="enum" field="status_id"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<select name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['status_id']['name'];?>
"
id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['status_id']['name'];?>
"
title=''              
>
<?php if ((isset($_smarty_tpl->tpl_vars['fields']->value['status_id']['value']))) {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['status_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['status_id']['value']),$_smarty_tpl);?>

<?php } else {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['status_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['status_id']['default']),$_smarty_tpl);?>

<?php }?>
</select>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="document_name">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_NAME">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_NAME','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<span class="required">*</span>
<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="varchar" field="document_name"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<?php if (strlen($_smarty_tpl->tpl_vars['fields']->value['document_name']['value']) <= 0) {
$_smarty_tpl->_assignInScope('value', $_smarty_tpl->tpl_vars['fields']->value['document_name']['default_value']);
} else {
$_smarty_tpl->_assignInScope('value', $_smarty_tpl->tpl_vars['fields']->value['document_name']['value']);
}?>
<input type='text' name='<?php echo $_smarty_tpl->tpl_vars['fields']->value['document_name']['name'];?>
'
id='<?php echo $_smarty_tpl->tpl_vars['fields']->value['document_name']['name'];?>
' size='30'
maxlength='255'        value='<?php echo $_smarty_tpl->tpl_vars['value']->value;?>
' title=''      >
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="revision">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DOC_VERSION">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_VERSION','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<span class="required">*</span>
<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="varchar" field="revision"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>

<input tabindex="0"  name="revision" type="text" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['revision']['value'];?>
" <?php echo $_smarty_tpl->tpl_vars['DISABLED']->value;?>
>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="template_type">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_TEMPLATE_TYPE">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DET_TEMPLATE_TYPE','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="enum" field="template_type"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<select name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['template_type']['name'];?>
"
id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['template_type']['name'];?>
"
title=''              
>
<?php if ((isset($_smarty_tpl->tpl_vars['fields']->value['template_type']['value']))) {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['template_type']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['template_type']['value']),$_smarty_tpl);?>

<?php } else {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['template_type']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['template_type']['default']),$_smarty_tpl);?>

<?php }?>
</select>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="is_template">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_IS_TEMPLATE">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DET_IS_TEMPLATE','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="bool" field="is_template"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<?php if (strval($_smarty_tpl->tpl_vars['fields']->value['is_template']['value']) == "1" || strval($_smarty_tpl->tpl_vars['fields']->value['is_template']['value']) == "yes" || strval($_smarty_tpl->tpl_vars['fields']->value['is_template']['value']) == "on") {?> 
<?php $_smarty_tpl->_assignInScope('checked', 'checked="checked"');
} else {
$_smarty_tpl->_assignInScope('checked', '');
}?>
<input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['is_template']['name'];?>
" value="0"> 
<input type="checkbox" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['is_template']['name'];?>
" 
name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['is_template']['name'];?>
" 
value="1" title='' tabindex="0" <?php echo $_smarty_tpl->tpl_vars['checked']->value;?>
 >
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="active_date">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DOC_ACTIVE_DATE">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_ACTIVE_DATE','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<span class="required">*</span>
<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="date" field="active_date"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<span class="dateTime">
<?php $_smarty_tpl->_assignInScope('date_value', $_smarty_tpl->tpl_vars['fields']->value['active_date']['value']);?>
<input class="date_input" autocomplete="off" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['active_date']['name'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['active_date']['name'];?>
" value="<?php echo $_smarty_tpl->tpl_vars['date_value']->value;?>
" title=''  tabindex='0'    size="11" maxlength="10" >
<span class="datetimeicon" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['active_date']['name'];?>
_trigger" onclick="return false;">
<?php echo smarty_function_sugar_getimage(array('name'=>"calendar",'attr'=>'border="0" ','alt'=>((string)$_smarty_tpl->tpl_vars['APP']->value['LBL_ENTER_DATE'])),$_smarty_tpl);?>

</span>
</span>
<?php echo '<script'; ?>
 type="text/javascript">
Calendar.setup ({
inputField : "<?php echo $_smarty_tpl->tpl_vars['fields']->value['active_date']['name'];?>
",
form : "EditView",
ifFormat : "<?php echo $_smarty_tpl->tpl_vars['CALENDAR_FORMAT']->value;?>
",
daFormat : "<?php echo $_smarty_tpl->tpl_vars['CALENDAR_FORMAT']->value;?>
",
button : "<?php echo $_smarty_tpl->tpl_vars['fields']->value['active_date']['name'];?>
_trigger",
singleClick : true,
dateStr : "<?php echo $_smarty_tpl->tpl_vars['date_value']->value;?>
",
startWeekday: <?php echo (($tmp = $_smarty_tpl->tpl_vars['CALENDAR_FDOW']->value ?? null)===null||$tmp==='' ? '0' ?? null : $tmp);?>
,
step : 1,
weekNumbers:false
}
);
<?php echo '</script'; ?>
>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="exp_date">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DOC_EXP_DATE">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_EXP_DATE','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="date" field="exp_date"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<span class="dateTime">
<?php $_smarty_tpl->_assignInScope('date_value', $_smarty_tpl->tpl_vars['fields']->value['exp_date']['value']);?>
<input class="date_input" autocomplete="off" type="text" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['exp_date']['name'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['exp_date']['name'];?>
" value="<?php echo $_smarty_tpl->tpl_vars['date_value']->value;?>
" title=''  tabindex='0'    size="11" maxlength="10" >
<span class="datetimeicon" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['exp_date']['name'];?>
_trigger" onclick="return false;">
<?php echo smarty_function_sugar_getimage(array('name'=>"calendar",'attr'=>'border="0" ','alt'=>((string)$_smarty_tpl->tpl_vars['APP']->value['LBL_ENTER_DATE'])),$_smarty_tpl);?>

</span>
</span>
<?php echo '<script'; ?>
 type="text/javascript">
Calendar.setup ({
inputField : "<?php echo $_smarty_tpl->tpl_vars['fields']->value['exp_date']['name'];?>
",
form : "EditView",
ifFormat : "<?php echo $_smarty_tpl->tpl_vars['CALENDAR_FORMAT']->value;?>
",
daFormat : "<?php echo $_smarty_tpl->tpl_vars['CALENDAR_FORMAT']->value;?>
",
button : "<?php echo $_smarty_tpl->tpl_vars['fields']->value['exp_date']['name'];?>
_trigger",
singleClick : true,
dateStr : "<?php echo $_smarty_tpl->tpl_vars['date_value']->value;?>
",
startWeekday: <?php echo (($tmp = $_smarty_tpl->tpl_vars['CALENDAR_FDOW']->value ?? null)===null||$tmp==='' ? '0' ?? null : $tmp);?>
,
step : 1,
weekNumbers:false
}
);
<?php echo '</script'; ?>
>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="category_id">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_SF_CATEGORY">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_SF_CATEGORY','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="enum" field="category_id"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<select name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['category_id']['name'];?>
"
id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['category_id']['name'];?>
"
title=''              
>
<?php if ((isset($_smarty_tpl->tpl_vars['fields']->value['category_id']['value']))) {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['category_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['category_id']['value']),$_smarty_tpl);?>

<?php } else {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['category_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['category_id']['default']),$_smarty_tpl);?>

<?php }?>
</select>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="subcategory_id">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_SF_SUBCATEGORY">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_SF_SUBCATEGORY','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="enum" field="subcategory_id"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<select name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['name'];?>
"
id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['name'];?>
"
title=''              
>
<?php if ((isset($_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['value']))) {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['value']),$_smarty_tpl);?>

<?php } else {
echo smarty_function_html_options(array('options'=>$_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['options'],'selected'=>$_smarty_tpl->tpl_vars['fields']->value['subcategory_id']['default']),$_smarty_tpl);?>

<?php }?>
</select>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-12 edit-view-row-item" data-field="description">


<div class="col-xs-12 col-sm-2 label" data-label="LBL_DESCRIPTION">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DESCRIPTION','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="text" field="description" colspan='3' >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<?php if (empty($_smarty_tpl->tpl_vars['fields']->value['description']['value'])) {
$_smarty_tpl->_assignInScope('value', $_smarty_tpl->tpl_vars['fields']->value['description']['default_value']);
} else {
$_smarty_tpl->_assignInScope('value', $_smarty_tpl->tpl_vars['fields']->value['description']['value']);
}?>
<textarea  id='<?php echo $_smarty_tpl->tpl_vars['fields']->value['description']['name'];?>
' name='<?php echo $_smarty_tpl->tpl_vars['fields']->value['description']['name'];?>
'
    rows="6"
    cols="80"
    title='' tabindex="0" 
     ><?php echo $_smarty_tpl->tpl_vars['value']->value;?>
</textarea>

</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="related_doc_name">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DET_RELATED_DOCUMENT">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DET_RELATED_DOCUMENT','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="relate" field="related_doc_name"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>

<input tabindex="0"  name="related_document_name" type="text" size="30" maxlength="255" value="<?php echo $_smarty_tpl->tpl_vars['RELATED_DOCUMENT_NAME']->value;?>
" readonly>
<input tabindex="0"  name="related_doc_id" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['related_doc_id']['value'];?>
"/>&nbsp;            
<span>
<button style="background: transparent; opacity: 0.3; margin: 0; padding: 0;" title="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SELECT_BUTTON_TITLE'];?>
" type="<?php echo $_smarty_tpl->tpl_vars['RELATED_DOCUMENT_BUTTON_AVAILABILITY']->value;?>
" class="button" value="<?php echo $_smarty_tpl->tpl_vars['APP']->value['LBL_SELECT_BUTTON_LABEL'];?>
" name="btn2" onclick='open_popup("Documents", 600, 400, "", true, false, <?php echo $_smarty_tpl->tpl_vars['encoded_document_popup_request_data']->value;?>
, "single", true);'/>
<?php echo smarty_function_sugar_getimage(array('name'=>"cursor"),$_smarty_tpl);?>

</button>
</span>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>


<div class="col-xs-12 col-sm-6 edit-view-row-item edit-view-bordered" data-field="related_doc_rev_number">


<div class="col-xs-12 col-sm-4 label" data-label="LBL_DET_RELATED_DOCUMENT_VERSION">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_DET_RELATED_DOCUMENT_VERSION','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="varchar" field="related_doc_rev_number"  >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>

<select tabindex="0"  name="related_doc_rev_id" id="related_doc_rev_id" <?php echo $_smarty_tpl->tpl_vars['RELATED_DOCUMENT_REVISION_DISABLED']->value;?>
><?php echo $_smarty_tpl->tpl_vars['RELATED_DOCUMENT_REVISION_OPTIONS']->value;?>
</select>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
<div class="clear"></div>
</div>
<div class="row edit-view-row">



<div class="col-xs-12 col-sm-12 edit-view-row-item" data-field="assigned_user_name">


<div class="col-xs-12 col-sm-2 label" data-label="LBL_ASSIGNED_TO_NAME">

<?php $_smarty_tpl->smarty->_cache['_tag_stack'][] = array('minify', array());
$_block_repeat=true;
echo smarty_block_minify(array(), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
$_smarty_tpl->smarty->ext->_capture->open($_smarty_tpl, "label", "label", null);
echo smarty_function_sugar_translate(array('label'=>'LBL_ASSIGNED_TO_NAME','module'=>'Documents'),$_smarty_tpl);
$_smarty_tpl->smarty->ext->_capture->close($_smarty_tpl);
echo smarty_modifier_strip_semicolon($_smarty_tpl->tpl_vars['label']->value);?>
:

<?php $_block_repeat=false;
echo smarty_block_minify(array(), ob_get_clean(), $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_cache['_tag_stack']);?>
</div>

<div class="col-xs-12 col-sm-8 edit-view-field " type="relate" field="assigned_user_name" colspan='3' >
<?php echo smarty_function_counter(array('name'=>"panelFieldCount",'print'=>false),$_smarty_tpl);?>


<input type="text" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" class="sqsEnabled" tabindex="0" id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" size="" value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['value'];?>
" title='' autocomplete="off"  	 >
<input type="hidden" name="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['id_name'];?>
" 
id="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['id_name'];?>
" 
value="<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_id']['value'];?>
">
<span class="id-ff multiple selectcrossbtn">
<button type="button" name="btn_<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" id="btn_<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" tabindex="0" title="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_SELECT_USERS_TITLE"),$_smarty_tpl);?>
" class="firstChild" value="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_SELECT_USERS_LABEL"),$_smarty_tpl);?>
"
onclick='open_popup(
"<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['module'];?>
", 
600, 
400, 
"", 
true, 
false, 
{"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"assigned_user_id","user_name":"assigned_user_name"}}, 
"single", 
true
);' >
<?php echo smarty_function_sugar_getimage(array('name'=>"cursor",'attr'=>'border="0"'),$_smarty_tpl);?>

</button>
<button type="button" name="btn_clr_<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" id="btn_clr_<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
" tabindex="0" title="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_CLEAR_USERS_TITLE"),$_smarty_tpl);?>
"  class="lastChild"
onclick="SUGAR.clearRelateField(this.form, '<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
', '<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['id_name'];?>
');"  value="<?php echo smarty_function_sugar_translate(array('label'=>"LBL_ACCESSKEY_CLEAR_USERS_LABEL"),$_smarty_tpl);?>
" >
<?php echo smarty_function_sugar_getimage(array('name'=>"cross",'attr'=>'border="0"'),$_smarty_tpl);?>

</button>
</span>
<?php echo '<script'; ?>
 type="text/javascript">
SUGAR.util.doWhen(
		"typeof(sqs_objects) != 'undefined' && typeof(sqs_objects['<?php echo $_smarty_tpl->tpl_vars['form_name']->value;?>
_<?php echo $_smarty_tpl->tpl_vars['fields']->value['assigned_user_name']['name'];?>
']) != 'undefined'",
		enableQS
);
<?php echo '</script'; ?>
>
</div>
<div class="edit-dotted-border"></div>

<!-- [/hide] -->
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>
</div>
</div>

<?php echo '<script'; ?>
 language="javascript">
    var _form_id = '<?php echo $_smarty_tpl->tpl_vars['form_id']->value;?>
';
    
    SUGAR.util.doWhen(function(){
        _form_id = (_form_id == '') ? 'EditView' : _form_id;
        return document.getElementById(_form_id) != null;
    }, SUGAR.themes.actionMenu);
    
<?php echo '</script'; ?>
>
<?php $_smarty_tpl->_assignInScope('place', "_FOOTER");?> <!-- to be used for id for buttons with custom code in def files-->
</form>
<?php echo $_smarty_tpl->tpl_vars['set_focus_block']->value;?>

<!-- Begin Meta-Data Javascript -->
<?php echo smarty_function_sugar_getscript(array('file'=>"include/javascript/popup_parent_helper.js"),$_smarty_tpl);?>

<?php echo smarty_function_sugar_getscript(array('file'=>"cache/include/javascript/sugar_grp_jsolait.js"),$_smarty_tpl);?>

<?php echo smarty_function_sugar_getscript(array('file'=>"modules/Documents/documents.js"),$_smarty_tpl);?>

<!-- End Meta-Data Javascript -->
<?php echo '<script'; ?>
>SUGAR.util.doWhen("document.getElementById('EditView') != null",
        function(){SUGAR.util.buildAccessKeyLabels();});
<?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript">
YAHOO.util.Event.onContentReady("EditView",
    function () { initEditView(document.forms.EditView) });
//window.setTimeout(, 100);
window.onbeforeunload = function () { return onUnloadEditView(); };
// bug 55468 -- IE is too aggressive with onUnload event
if ($.browser.msie) {
$(document).ready(function() {
    $(".collapseLink,.expandLink").click(function (e) { e.preventDefault(); });
  });
}
<?php echo '</script'; ?>
>

<?php echo '<script'; ?>
 type="text/javascript">

    var selectTab = function(tab) {
        $('#EditView_tabs div.tab-content div.tab-pane-NOBOOTSTRAPTOGGLER').hide();
        $('#EditView_tabs div.tab-content div.tab-pane-NOBOOTSTRAPTOGGLER').eq(tab).show().addClass('active').addClass('in');
        $('#EditView_tabs div.panel-content div.panel').hide();
        $('#EditView_tabs div.panel-content div.panel.tab-panel-' + tab).show()
    };

    var selectTabOnError = function(tab) {
        selectTab(tab);
        $('#EditView_tabs ul.nav.nav-tabs li').removeClass('active');
        $('#EditView_tabs ul.nav.nav-tabs li a').css('color', '');

        $('#EditView_tabs ul.nav.nav-tabs li').eq(tab).find('a').first().css('color', 'red');
        $('#EditView_tabs ul.nav.nav-tabs li').eq(tab).addClass('active');

    };

    var selectTabOnErrorInputHandle = function(inputHandle) {
        var tab = $(inputHandle).closest('.tab-pane-NOBOOTSTRAPTOGGLER').attr('id').match(/^tab-content-(.*)$/)[1];
        selectTabOnError(tab);
    };


    $(function(){
        $('#EditView_tabs ul.nav.nav-tabs li > a[data-toggle="tab"]').click(function(e){
            if(typeof $(this).parent().find('a').first().attr('id') != 'undefined') {
                var tab = parseInt($(this).parent().find('a').first().attr('id').match(/^tab(?<number>(.)*)$/)[1]);
                selectTab(tab);
            }
        });

        $('a[data-toggle="collapse-edit"]').click(function(e){
            if($(this).hasClass('collapsed')) {
              // Expand panel
                // Change style of .panel-header
                $(this).removeClass('collapsed');
                // Expand .panel-body
                $(this).parents('.panel').find('.panel-body').removeClass('in').addClass('in');
            } else {
              // Collapse panel
                // Change style of .panel-header
                $(this).addClass('collapsed');
                // Collapse .panel-body
                $(this).parents('.panel').find('.panel-body').removeClass('in').removeClass('in');
            }
        });
    });

    <?php echo '</script'; ?>
>

<?php echo '<script'; ?>
 type="text/javascript">
addForm('EditView');addToValidate('EditView', 'name', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'date_entered_date', 'date', false,'Date Created' );
addToValidate('EditView', 'date_modified_date', 'date', false,'Date Modified' );
addToValidate('EditView', 'modified_user_id', 'assigned_user_name', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_MODIFIED','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'modified_by_name', 'relate', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_MODIFIED_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'created_by', 'assigned_user_name', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_CREATED','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'created_by_name', 'relate', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_CREATED','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'description', 'text', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DESCRIPTION','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'deleted', 'bool', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DELETED','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'assigned_user_id', 'relate', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_ASSIGNED_TO_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'assigned_user_name', 'relate', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_ASSIGNED_TO_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'document_name', 'varchar', true,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'doc_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'doc_type', 'enum', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_TYPE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'doc_url', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_URL','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'filename', 'file', true,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_FILENAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'active_date', 'date', true,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_ACTIVE_DATE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'exp_date', 'date', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_EXP_DATE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'category_id', 'enum', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_SF_CATEGORY','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'subcategory_id', 'enum', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_SF_SUBCATEGORY','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'status_id', 'enum', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_STATUS','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'status', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_STATUS','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'document_revision_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LATEST_REVISION','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'revision', 'varchar', true,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DOC_VERSION','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'last_rev_created_name', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LAST_REV_CREATOR','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'last_rev_mime_type', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LAST_REV_MIME_TYPE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'latest_revision', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LATEST_REVISION','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'last_rev_create_date', 'date', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LAST_REV_CREATE_DATE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'related_doc_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_RELATED_DOCUMENT_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'related_doc_name', 'relate', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DET_RELATED_DOCUMENT','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'related_doc_rev_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_RELATED_DOCUMENT_REVISION_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'related_doc_rev_number', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_DET_RELATED_DOCUMENT_VERSION','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'is_template', 'bool', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_IS_TEMPLATE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'template_type', 'enum', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_TEMPLATE_TYPE','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'latest_revision_name', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LASTEST_REVISION_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'selected_revision_name', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_SELECTED_REVISION_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'contract_status', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_CONTRACT_STATUS','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'contract_name', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_CONTRACT_NAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'linked_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LINKED_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'selected_revision_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_SELECTED_REVISION_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'latest_revision_id', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_LATEST_REVISION_ID','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'selected_revision_filename', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_SELECTED_REVISION_FILENAME','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidate('EditView', 'filecontents', 'varchar', false,'<?php echo smarty_function_sugar_translate(array('label'=>'LBL_FILE_CONTENTS','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
' );
addToValidateBinaryDependency('EditView', 'assigned_user_name', 'alpha', false,'<?php echo smarty_function_sugar_translate(array('label'=>'ERR_SQS_NO_MATCH_FIELD','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
: <?php echo smarty_function_sugar_translate(array('label'=>'LBL_ASSIGNED_TO','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
', 'assigned_user_id' );
addToValidateBinaryDependency('EditView', 'related_doc_name', 'alpha', false,'<?php echo smarty_function_sugar_translate(array('label'=>'ERR_SQS_NO_MATCH_FIELD','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
: <?php echo smarty_function_sugar_translate(array('label'=>'LBL_DET_RELATED_DOCUMENT','module'=>'Documents','for_js'=>true),$_smarty_tpl);?>
', 'related_doc_id' );
<?php echo '</script'; ?>
><?php echo '<script'; ?>
 language="javascript">if(typeof sqs_objects == 'undefined'){var sqs_objects = new Array;}sqs_objects['EditView_related_doc_name']={"form":"EditView","method":"query","modules":["Documents"],"group":"or","field_list":["name","id"],"populate_list":["related_doc_name","related_doc_id"],"required_list":["parent_id"],"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],"order":"name","limit":"30","no_match_text":"No Match"};sqs_objects['EditView_assigned_user_name']={"form":"EditView","method":"get_user_array","field_list":["user_name","id"],"populate_list":["assigned_user_name","assigned_user_id"],"required_list":["assigned_user_id"],"conditions":[{"name":"user_name","op":"like_custom","end":"%","value":""}],"limit":"30","no_match_text":"No Match"};<?php echo '</script'; ?>
>
<?php }
}
