/**
  * @dataProvider providerStripColonSting
  * @ticket 41983
  */
 public function testStripColonString($string, $returnedString)
 {
     $langpack = new SugarTestLangPackCreator();
     $langpack->setModString('LBL_TEST_JS_ESCAPED_STRING', $string, 'Contacts');
     $langpack->save();
     $smarty = new Sugar_Smarty();
     $this->assertEquals($returnedString, smarty_function_sugar_translate(array('label' => 'LBL_TEST_JS_ESCAPED_STRING', 'module' => 'Contacts', 'trimColon' => false), $smarty));
 }
</table>
<?php 
echo $this->_tpl_vars['fieldLayout'];
?>

</form>

<script>
<?php 
echo '
function validate_type_selection(){
    var typeSel = document.getElementById(\'type\');
    if(typeSel && typeSel.options){
        if(typeSel.options[typeSel.selectedIndex].value == \'\'){
            alert(\'';
echo smarty_function_sugar_translate(array('module' => 'DynamicFields', 'label' => 'ERR_SELECT_FIELD_TYPE'), $this);
echo '\');
            return false;
        }
    }
    if (document.getElementById("customTypeValidate")){
        return document.getElementById("customTypeValidate").onchange(); 
    }
    return true;
}
';
?>

ModuleBuilder.helpSetup('fieldsEditor','<?php 
echo $this->_tpl_vars['help_group'];
?>
echo smarty_function_counter(array('name' => 'fieldsHidden', 'start' => 0, 'print' => false, 'assign' => 'fieldsHidden'), $this);
?>

<?php 
ob_start();
?>
<tr>
<?php 
echo smarty_function_counter(array('name' => 'fieldsUsed'), $this);
?>

<td width='12.5%' scope="col">
<?php 
if (!$this->_tpl_vars['fields']['description']['hidden']) {
    ob_start();
    echo smarty_function_sugar_translate(array('label' => 'LBL_DESCRIPTION', 'module' => 'Users'), $this);
    $this->_smarty_vars['capture']['label'] = ob_get_contents();
    $this->assign('label', ob_get_contents());
    ob_end_clean();
    echo is_array($_tmp = $this->_tpl_vars['label']) ? $this->_run_mod_handler('strip_semicolon', true, $_tmp) : smarty_modifier_strip_semicolon($_tmp);
    ?>
:
<?php 
}
?>
</td>
<td width='37.5%' colspan='3' >
<?php 
if (!$this->_tpl_vars['fields']['description']['hidden']) {
    echo smarty_function_counter(array('name' => 'panelFieldCount'), $this);
    ?>
echo smarty_function_counter(array('name' => 'panelFieldCount', 'print' => false), $this);
?>


<?php 
if (empty($this->_tpl_vars['fields']['description']['value'])) {
    $this->assign('value', $this->_tpl_vars['fields']['description']['default_value']);
} else {
    $this->assign('value', $this->_tpl_vars['fields']['description']['value']);
}
?>
  
<textarea  id='Accountsdescription' name='Accountsdescription'
rows="6" 
cols="80" 
title='' tabindex="0" 
 ><?php 
echo $this->_tpl_vars['value'];
?>
</textarea>
</td>
</tr>
</table><?php 
echo '
<script type="text/javascript">
addForm(\'ConvertLead\');addToValidateBinaryDependency(\'ConvertLead\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Accounts', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'Accounts', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
</script>';
' height='<?php 
                echo $this->_tpl_vars['arrowHeight'];
                ?>
' align='absmiddle' alt='<?php 
                echo $this->_tpl_vars['arrowAlt'];
                ?>
'>
	                <?php 
            }
            ?>
	                </a>
	           <?php 
        } else {
            ?>
	           		<?php 
            echo smarty_function_sugar_translate(array('label' => $this->_tpl_vars['params']['label'], 'module' => $this->_tpl_vars['pageData']['bean']['moduleDir']), $this);
            ?>

	           <?php 
        }
        ?>
			   </div>
            </td>
        <?php 
    }
}
unset($_from);
?>
		<?php 
if (!empty($this->_tpl_vars['quickViewLinks'])) {
    ?>
echo '\' );
addToValidate(\'EditView\', \'accept_status_name\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LIST_ACCEPT_STATUS', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'sync_contact\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SYNC_CONTACT', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'contact_photo_c\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_CONTACT_PHOTO', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\' );
addToValidateBinaryDependency(\'EditView\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Contacts', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
addToValidateBinaryDependency(\'EditView\', \'account_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Contacts', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ACCOUNT_NAME', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\', \'account_id\' );
addToValidateBinaryDependency(\'EditView\', \'report_to_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Contacts', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_REPORTS_TO', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\', \'reports_to_id\' );
addToValidateBinaryDependency(\'EditView\', \'campaign_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Contacts', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_CAMPAIGN', 'module' => 'Contacts', 'for_js' => true), $this);
echo '\', \'campaign_id\' );
</script><script language="javascript">if(typeof sqs_objects == \'undefined\'){var sqs_objects = new Array;}sqs_objects[\'EditView_account_name\']={"form":"EditView","method":"query","modules":["Accounts"],"group":"or","field_list":["name","id","billing_address_street","billing_address_city","billing_address_state","billing_address_postalcode","billing_address_country","phone_office"],"populate_list":["EditView_account_name","account_id","primary_address_street","primary_address_city","primary_address_state","primary_address_postalcode","primary_address_country","phone_work"],"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],"required_list":["account_id"],"order":"name","limit":"30","no_match_text":"No Match"};sqs_objects[\'EditView_report_to_name\']={"form":"EditView","method":"get_contact_array","modules":["Contacts"],"field_list":["salutation","first_name","last_name","id"],"populate_list":["report_to_name","reports_to_id","reports_to_id","reports_to_id"],"required_list":["reports_to_id"],"group":"or","conditions":[{"name":"first_name","op":"like_custom","end":"%","value":""},{"name":"last_name","op":"like_custom","end":"%","value":""}],"order":"last_name","limit":"30","no_match_text":"No Match"};sqs_objects[\'EditView_campaign_name\']={"form":"EditView","method":"query","modules":["Campaigns"],"group":"or","field_list":["name","id"],"populate_list":["campaign_id","campaign_id"],"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],"required_list":["campaign_id"],"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"};</script>';
   compiled from modules/Emails/templates/assignTo.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'sugar_translate', 'modules/Emails/templates/assignTo.tpl', 48, false))), $this);
?>
<form name="Distribute" id="Distribute">
<input type="hidden" name="emailUIAction" value="doAssignmentAssign">

<input type="hidden" name="distribute_method" value="direct">
<input type="hidden" name="action" value="Distribute">


<table cellpadding="4" cellspacing="0" border="0" width="100%" class="edit view"> 
    <tr>
        <td scope="row" nowrap="nowrap" valign="top" >
        <?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO'), $this);
?>
:
        </td>
        <td nowrap="nowrap" width="37%">
        <input name="assigned_user_name" class="sqsEnabled" tabindex="2" id="assigned_user_name" size="" value="<?php 
echo $this->_tpl_vars['currentUserName'];
?>
" type="text">
        <input name="assigned_user_id" id="assigned_user_id" value="<?php 
echo $this->_tpl_vars['currentUserId'];
?>
" type="hidden">
        <input name="btn_assigned_user_name" tabindex="2" title="<?php 
echo $this->_tpl_vars['app_strings']['LBL_SELECT_BUTTON_TITLE'];
?>
                        ?>

								<?php 
                        $_from = $this->_tpl_vars['vals'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        if (count($_from)) {
                            foreach ($_from as $this->_tpl_vars['item']) {
                                ?>
									<?php 
                                echo smarty_function_counter(array('name' => 'oCount'), $this);
                                ?>

									<?php 
                                echo smarty_function_sugar_translate(array('label' => $this->_tpl_vars['params']['options'], 'select' => $this->_tpl_vars['item']), $this);
                                if ($this->_tpl_vars['oCount'] != count($this->_tpl_vars['vals'])) {
                                    ?>
,<?php 
                                }
                                ?>
 
								<?php 
                            }
                        }
                        unset($_from);
                        ?>
                        <?php 
                    } else {
                        ?>
                            <?php 
addToValidate(\'EditView\', \'selkirk_service_status\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SELKIRK_SERVICE_STATUS', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'duration\', \'float\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_DURATION', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'service_category\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SERVICE_CATEGORY', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'sel_selkirk_client_sel_selkirk_service_name\', \'relate\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SEL_SELKIRK_CLIENT_SEL_SELKIRK_SERVICE_FROM_SEL_SELKIRK_CLIENT_TITLE', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'sel_selkirk_project_sel_selkirk_service_name\', \'relate\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SEL_SELKIRK_PROJECT_SEL_SELKIRK_SERVICE_FROM_SEL_SELKIRK_PROJECT_TITLE', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\' );
addToValidateBinaryDependency(\'EditView\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
addToValidateBinaryDependency(\'EditView\', \'sel_selkirk_client_sel_selkirk_service_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_SEL_SELKIRK_CLIENT_SEL_SELKIRK_SERVICE_FROM_SEL_SELKIRK_CLIENT_TITLE', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\', \'sel_selkirk_client_sel_selkirk_servicesel_selkirk_client_ida\' );
addToValidateBinaryDependency(\'EditView\', \'sel_selkirk_project_sel_selkirk_service_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_SEL_SELKIRK_PROJECT_SEL_SELKIRK_SERVICE_FROM_SEL_SELKIRK_PROJECT_TITLE', 'module' => 'sel_Selkirk_Service', 'for_js' => true), $this);
echo '\', \'sel_selkirk_project_sel_selkirk_servicesel_selkirk_project_ida\' );
</script><script language="javascript">if(typeof sqs_objects == \'undefined\'){var sqs_objects = new Array;}sqs_objects[\'EditView_sel_selkirk_client_sel_selkirk_service_name\']={"form":"EditView","method":"query","modules":["sel_Selkirk_Client"],"group":"or","field_list":["name","id"],"populate_list":["sel_selkirk_client_sel_selkirk_service_name","sel_selkirk_client_sel_selkirk_servicesel_selkirk_client_ida"],"required_list":["parent_id"],"conditions":[{"name":"name","op":"like_custom","end":"%","value":""}],"order":"name","limit":"30","no_match_text":"No Match"};sqs_objects[\'EditView_sel_selkirk_project_sel_selkirk_service_name\']={"form":"EditView","method":"query","modules":["sel_Selkirk_Project"],"group":"or","field_list":["name","id"],"populate_list":["sel_selkirk_project_sel_selkirk_service_name","sel_selkirk_project_sel_selkirk_servicesel_selkirk_project_ida"],"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"};</script>';
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'sugar_translate', 'modules/ModuleBuilder/tpls/studioRelationships.tpl', 46, false))), $this);
if ($this->_tpl_vars['view_module'] != 'KBDocuments') {
    ?>
<input type='button' name='addrelbtn' value='<?php 
    echo $this->_tpl_vars['mod_strings']['LBL_BTN_ADD_RELATIONSHIP'];
    ?>
'
	class='button' onclick='ModuleBuilder.moduleLoadRelationship2("");' style="margin-bottom:5px;">
<?php 
}
?>
<div id='relGrid'></div>
<?php 
if ($this->_tpl_vars['studio']) {
    echo smarty_function_sugar_translate(array('label' => 'LBL_CUSTOM_RELATIONSHIPS', 'module' => 'ModuleBuilder'), $this);
    ?>
</h3><?php 
}
?>
<script>
<?php 
echo '
//Workaround for YUI bug 2527707: http://yuilibrary.com/projects/yui2/ticket/913efafad48ce433199f3e72e4847b18, should be removed when YUI 2.8+ is used
YAHOO.widget.DataTable.prototype.getColumn = function(column) {
    var oColumn = this._oColumnSet.getColumn(column);

    if(!oColumn) {
        // Validate TD element
        var elCell = column.nodeName.toLowerCase() != "th" ? this.getTdEl(column) : false;
        if(elCell) {
echo '\' );
addToValidate(\'EditView\', \'alt_address_state\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_ALT_ADDRESS_STATE', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'alt_address_postalcode\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_ALT_ADDRESS_POSTALCODE', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'alt_address_country\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_ALT_ADDRESS_COUNTRY', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'assistant\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSISTANT', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'assistant_phone\', \'phone\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSISTANT_PHONE', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'email_addresses_non_primary\', \'email\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_EMAIL_NON_PRIMARY', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'legal_observer\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LEGAL_OBSERVER', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'state_c\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_STATE', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\' );
addToValidateBinaryDependency(\'EditView\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'legal_witnesses', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
</script>';
    ?>
"><?php 
} else {
    ?>
<input type="hidden" name="help" value="<?php 
    echo $this->_tpl_vars['vardef']['help'];
    ?>
"><?php 
    echo $this->_tpl_vars['vardef']['help'];
}
?>
	</td>
</tr>
<tr>
    <td class='mbLBL'><?php 
echo smarty_function_sugar_translate(array('module' => 'DynamicFields', 'label' => 'COLUMN_TITLE_COMMENT_TEXT'), $this);
?>
:</td><td><?php 
if ($this->_tpl_vars['hideLevel'] < 5) {
    ?>
<input type="text" name="comments" value="<?php 
    echo $this->_tpl_vars['vardef']['comments'];
    ?>
"><?php 
} else {
    ?>
<input type="hidden" name="comment" value="<?php 
    echo $this->_tpl_vars['vardef']['comment'];
    ?>
"><?php 
    echo $this->_tpl_vars['vardef']['comment'];
$this->_smarty_include(array('smarty_include_tpl_file' => "modules/Emails/templates/addressSearch.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
		</div>
		
        <table >
        <tr>
            <td width="60%">
                <div id="addrSearchGrid" ></div>
	           <div id='dt-pag-nav-addressbook'></div>
	        </td>
	        <td width="3%">
	           <span style="position:relative; top:1px;">&nbsp;
	               <div style="overflow: visible; height: 0; position: absolute; width: 0; right:-2em; top:-166px;">
	                   <h3 style=""><?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_SELECTED_ADDR', 'module' => 'Emails'), $this);
?>
:</h3>
	               </div>
	           </span>
	        </td>
	        <td width="37%"valign="top">
	           <div id="addrSearchResultGrid"></div>
	           <div class="yui-pg-container">&nbsp;</div>
	         </td>
        </tr>
        </table>
	    
    </div>
</div>
echo smarty_function_counter(array('name' => 'fieldsHidden', 'start' => 0, 'print' => false, 'assign' => 'fieldsHidden'), $this);
?>

<?php 
ob_start();
?>
<tr>
<?php 
echo smarty_function_counter(array('name' => 'fieldsUsed'), $this);
?>

<td width='12.5%' scope="col">
<?php 
if (!$this->_tpl_vars['fields']['amount']['hidden']) {
    ob_start();
    echo smarty_function_sugar_translate(array('label' => 'LBL_AMOUNT', 'module' => 'opalo_solicitudes'), $this);
    $this->_smarty_vars['capture']['label'] = ob_get_contents();
    $this->assign('label', ob_get_contents());
    ob_end_clean();
    echo is_array($_tmp = $this->_tpl_vars['label']) ? $this->_run_mod_handler('strip_semicolon', true, $_tmp) : smarty_modifier_strip_semicolon($_tmp);
    ?>
:
<?php 
}
?>
</td>
<td width='37.5%' colspan='3' >
<?php 
if (!$this->_tpl_vars['fields']['amount']['hidden']) {
    echo smarty_function_counter(array('name' => 'panelFieldCount'), $this);
    ?>
echo smarty_function_sugar_translate(array('label' => 'LBL_STAY_AWAY', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'support_contact_c\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SUPPORT_CONTACT', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'support_needs_c\', \'text\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SUPPORT_NEEDS', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'support_person_c\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_SUPPORT_PERSON', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'unconfirmed_arrest_c\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_UNCONFIRMED_ARREST', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'wants_bail_c\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_WANTS_BAIL', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'wants_lawyer_c\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_WANTS_LAWYER', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\' );
addToValidateBinaryDependency(\'EditView\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
addToValidateBinaryDependency(\'EditView\', \'lawyer\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_LAWYER', 'module' => 'legal_arrestees', 'for_js' => true), $this);
echo '\', \'account_id\' );
</script><script language="javascript">if(typeof sqs_objects == \'undefined\'){var sqs_objects = new Array;}sqs_objects[\'EditView_lawyer\']={"form":"EditView","method":"query","modules":["legal_lawyers"],"group":"or","field_list":["name","id"],"populate_list":["lawyer","account_id"],"required_list":["parent_id"],"conditions":[{"name":"last_name","op":"like_custom","end":"%","value":""}],"order":"last_name","limit":"30","no_match_text":"No Match"};</script>';
	<?php 
} else {
    ?>
		<input type='hidden' name='default[]' id='default[]' value='$vardef.default'><?php 
    echo $this->_tpl_vars['vardef']['default'];
    ?>

	<?php 
}
?>
	</td>
</tr>
<tr>
	<td class='mbLBL' ><?php 
echo smarty_function_sugar_translate(array('module' => 'DynamicFields', 'label' => 'COLUMN_TITLE_MASS_UPDATE'), $this);
?>
:</td>
	<td>
	<?php 
if ($this->_tpl_vars['hideLevel'] < 5) {
    ?>
		<input type="checkbox" id="massupdate"  name="massupdate" value="1" <?php 
    if (!empty($this->_tpl_vars['vardef']['massupdate'])) {
        ?>
checked<?php 
    }
    ?>
/>
	<?php 
} else {
: </td>
                    <td>
                        <input type='text' size='3' maxlength='1' name='default_decimal_seperator'  value='<?php 
echo $this->_tpl_vars['config']['default_decimal_seperator'];
?>
'>
                    </td>
                    <td nowrap="nowrap" scope="row"></td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="4"><hr /></td>
                </tr>
                <tr>
                    <td nowrap="nowrap" scope="row" valign="top"><?php 
echo smarty_function_sugar_translate(array('module' => 'Administration', 'label' => 'LBL_LOCALE_DEFAULT_NAME_FORMAT'), $this);
?>
: </td>
                    <td>
                        <?php 
echo smarty_function_html_options(array('id' => 'default_locale_name_format', 'name' => 'default_locale_name_format', 'selected' => $this->_tpl_vars['config']['default_locale_name_format'], 'options' => $this->_tpl_vars['NAMEFORMATS']), $this);
?>

                    </td>
                </tr>
            </table>
            </div>
        </td>
    </tr>
    </table>
    <div class="nav-buttons">
	<td scope='row' width='10%' nowrap="nowrap">
	    <?php 
    echo smarty_function_sugar_translate(array('label' => 'LBL_MODIFY_CURRENT_SEARCH', 'module' => 'SavedSearch'), $this);
    ?>
:
	</td>
	<td width='30%' nowrap>
        <input class='button' onclick='SUGAR.savedViews.setChooser(); return SUGAR.savedViews.saved_search_action("update")' value='<?php 
    echo $this->_tpl_vars['APP']['LBL_UPDATE'];
    ?>
' title='<?php 
    echo $this->_tpl_vars['APP']['LBL_UPDATE'];
    ?>
' name='ss_update' id='ss_update' type='button' >
		<input class='button' onclick='return SUGAR.savedViews.saved_search_action("delete", "<?php 
    echo smarty_function_sugar_translate(array('label' => 'LBL_DELETE_CONFIRM', 'module' => 'SavedSearch'), $this);
    ?>
")' value='<?php 
    echo $this->_tpl_vars['APP']['LBL_DELETE'];
    ?>
' title='<?php 
    echo $this->_tpl_vars['APP']['LBL_DELETE'];
    ?>
' name='ss_delete' id='ss_delete' type='button'>
		<br><span id='curr_search_name'></span>
	</td>
</tr>

<tr>
<td colspan='6'>
<div style='<?php 
        document.getElementById('up_down_img').src='<?php 
echo smarty_function_sugar_getimagepath(array('file' => "basic_search.gif"), $this);
?>
';
        document.getElementById('up_down_img').setAttribute('alt',"<?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_ALT_HIDE_OPTIONS'), $this);
?>
");
<?php 
echo '
    }else{
';
?>

        document.getElementById('up_down_img').src='<?php 
echo smarty_function_sugar_getimagepath(array('file' => "advanced_search.gif"), $this);
?>
';
        document.getElementById('up_down_img').setAttribute('alt',"<?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_ALT_SHOW_OPTIONS'), $this);
?>
");
<?php 
echo '			
        document.getElementById(\'showSSDIV\').value = \'no\';		
        document.getElementById(\'inlineSavedSearch\').style.display = \'none\';		
    }
}
</script>
';
		<br>
	</td>
	<td scope='row' align='left' width='10%'>
		<?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_ORDER_BY_COLUMNS', 'module' => 'SavedSearch'), $this);
?>


	</td>
	<td width='23%'>
		<select name='orderBy' id='orderBySelect'>
		</select>
	</td>
	<td scope='row' width='10%'>
		<?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_DIRECTION', 'module' => 'SavedSearch'), $this);
?>

	</td>
	<td width='23%'>
		<div><input id='sort_order_desc_radio' type='radio' name='sortOrder' value='DESC' <?php 
if ($this->_tpl_vars['selectedSortOrder'] == 'DESC') {
    ?>
checked<?php 
}
?>
>&nbsp;<span onclick='document.getElementById("sort_order_desc_radio").checked = true' style="cursor: pointer; cursor: hand"><?php 
echo $this->_tpl_vars['MOD']['LBL_DESCENDING'];
?>
</span></div>
		
                echo $this->_tpl_vars['viewLinkString'];
                ?>
' href='index.php?action=DetailView&module=<?php 
                echo is_array($_tmp = @$this->_tpl_vars['params']['module']) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['pageData']['bean']['moduleDir']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['pageData']['bean']['moduleDir']);
                ?>
&record=<?php 
                echo is_array($_tmp = @$this->_tpl_vars['rowData'][$this->_tpl_vars['params']['parent_id']]) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['rowData']['ID']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['rowData']['ID']);
                ?>
&offset=<?php 
                echo $this->_tpl_vars['pageData']['offsets']['current'] + $this->_foreach['rowIteration']['iteration'];
                ?>
&stamp=<?php 
                echo $this->_tpl_vars['pageData']['stamp'];
                ?>
&return_module=Home&return_action=index' title="<?php 
                echo smarty_function_sugar_translate(array('label' => 'LBL_VIEW_INLINE'), $this);
                ?>
><?php 
                echo smarty_function_sugar_getimage(array('name' => "view_inline.png", 'attr' => 'border="0" ', 'alt' => $this->_tpl_vars['alt_view']), $this);
                ?>
</a>
				<?php 
            }
            ?>
			</td>
			<?php 
        }
        ?>
	    	</tr>
	<?php 
    }
echo smarty_function_counter(array('name' => 'fieldsHidden', 'start' => 0, 'print' => false, 'assign' => 'fieldsHidden'), $this);
?>

<?php 
ob_start();
?>
<tr>
<?php 
echo smarty_function_counter(array('name' => 'fieldsUsed'), $this);
?>

<td width='12.5%' scope="col">
<?php 
if (!$this->_tpl_vars['fields']['date_entered']['hidden']) {
    ob_start();
    echo smarty_function_sugar_translate(array('label' => 'LBL_DATE_ENTERED', 'module' => 'Notes'), $this);
    $this->_smarty_vars['capture']['label'] = ob_get_contents();
    $this->assign('label', ob_get_contents());
    ob_end_clean();
    echo is_array($_tmp = $this->_tpl_vars['label']) ? $this->_run_mod_handler('strip_semicolon', true, $_tmp) : smarty_modifier_strip_semicolon($_tmp);
    ?>
:
<?php 
}
?>
</td>
<td width='37.5%' colspan='3' >
<?php 
if (!$this->_tpl_vars['fields']['date_entered']['hidden']) {
    echo smarty_function_counter(array('name' => 'panelFieldCount'), $this);
    ?>
                    echo $this->_tpl_vars['pageData']['stamp'];
                    ?>
&return_module=<?php 
                    echo $this->_tpl_vars['linkModule'];
                    ?>
&action=<?php 
                    echo $this->_tpl_vars['action'];
                    ?>
&record=<?php 
                    echo $this->_tpl_vars['rowData']['ID'];
                    ?>
"
	                >
	                    <?php 
                    ob_start();
                    echo smarty_function_sugar_translate(array('label' => 'LNK_EDIT'), $this);
                    $this->_smarty_vars['capture']['tmp1'] = ob_get_contents();
                    $this->assign('alt_edit', ob_get_contents());
                    ob_end_clean();
                    ?>
	                    <?php 
                    echo smarty_function_sugar_getimage(array('name' => "edit_inline.gif", 'attr' => 'border="0" ', 'alt' => $this->_tpl_vars['alt_edit']), $this);
                    ?>
</a>
	                <?php 
                }
                ?>
	            </td>
	
				<?php 
            }
echo smarty_function_sugar_translate(array('label' => 'LBL_EMAIL', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'email_link_type\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_EMAIL_LINK_TYPE', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'is_group\', \'bool\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_GROUP_USER', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'c_accept_status_fields\', \'relate\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LIST_ACCEPT_STATUS', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'m_accept_status_fields\', \'relate\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LIST_ACCEPT_STATUS', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'accept_status_id\', \'varchar\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LIST_ACCEPT_STATUS', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidate(\'EditView\', \'accept_status_name\', \'enum\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'LBL_LIST_ACCEPT_STATUS', 'module' => 'Users', 'for_js' => true), $this);
echo '\' );
addToValidateBinaryDependency(\'EditView\', \'assigned_user_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Users', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO', 'module' => 'Users', 'for_js' => true), $this);
echo '\', \'assigned_user_id\' );
addToValidateBinaryDependency(\'EditView\', \'reports_to_name\', \'alpha\', false,\'';
echo smarty_function_sugar_translate(array('label' => 'ERR_SQS_NO_MATCH_FIELD', 'module' => 'Users', 'for_js' => true), $this);
echo ': ';
echo smarty_function_sugar_translate(array('label' => 'LBL_REPORTS_TO_NAME', 'module' => 'Users', 'for_js' => true), $this);
echo '\', \'reports_to_id\' );
</script><script language="javascript">if(typeof sqs_objects == \'undefined\'){var sqs_objects = new Array;}sqs_objects[\'EditView_reports_to_name\']={"form":"EditView","method":"get_user_array","field_list":["user_name","id"],"populate_list":["reports_to_name","reports_to_id"],"required_list":["reports_to_id"],"conditions":[{"name":"user_name","op":"like_custom","end":"%","value":""}],"limit":"30","no_match_text":"No Match"};</script>';
	<?php 
echo smarty_function_math(array('equation' => "left % right", 'left' => $this->_tpl_vars['index'], 'right' => $this->_tpl_vars['basicMaxColumns'], 'assign' => 'modVal'), $this);
?>

	<?php 
if ($this->_tpl_vars['index'] % $this->_tpl_vars['basicMaxColumns'] == 1 && $this->_tpl_vars['index'] != 1) {
    ?>
		</tr><tr>
	<?php 
}
?>
	
	<td scope="row" nowrap="nowrap" width='1%' >
		
		<label for='legal_observer_basic' ><?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_LEGAL_OBSERVER', 'module' => 'legal_witnesses'), $this);
?>
</label>
    	</td>

	
	<td  nowrap="nowrap" width='1%'>
			
<?php 
$this->assign('yes', "");
$this->assign('no', "");
$this->assign('default', "");
?>

<?php 
if (strval($this->_tpl_vars['fields']['legal_observer_basic']['value']) == '1') {
?>
'); return false;"></td>
    </tr>
</table>
<div id='more_<?php 
echo $this->_tpl_vars['id'];
?>
' style='display:none;padding-top:5px'>
<table>
<tr>
    <td><?php 
echo smarty_function_html_options(array('name' => 'link_type', 'options' => $this->_tpl_vars['link_types']), $this);
?>
</td>
    <td><input type='text' name='link_url' title="<?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_URL_LINK_TITLE', 'module' => 'SugarFeed'), $this);
?>
"  size='30'/></td>
</tr>
</table>
</div>
</div>

</form>

<form name='SugarFeedReplyForm_<?php 
echo $this->_tpl_vars['id'];
?>
' id='SugarFeedReplyForm_<?php 
echo $this->_tpl_vars['id'];
?>
    </div>
    <?php 
if ($this->_tpl_vars['AUTHENTICATED']) {
    ?>
    <div class="companyLogo"><a href="index.php?module=Home&action=index" border="0"><img src="<?php 
    echo $this->_tpl_vars['COMPANY_LOGO_URL'];
    ?>
" width="<?php 
    echo $this->_tpl_vars['COMPANY_LOGO_WIDTH'];
    ?>
" height="<?php 
    echo $this->_tpl_vars['COMPANY_LOGO_HEIGHT'];
    ?>
" alt="<?php 
    echo smarty_function_sugar_translate(array('label' => 'LBL_COMPANY_LOGO'), $this);
    ?>
" border="0"/></a></div>
    <div id="links">
        <button id="print_page" onclick="printpage()"><?php 
    echo $this->_tpl_vars['MOD']['LBL_SUITE_PRINT'];
    ?>
</button>
        <button id="backtotop"><?php 
    echo $this->_tpl_vars['MOD']['LBL_SUITE_TOP'];
    ?>
</button>
    </div>
    <?php 
}
?>
echo smarty_function_counter(array('name' => 'fieldsHidden', 'start' => 0, 'print' => false, 'assign' => 'fieldsHidden'), $this);
?>

<?php 
ob_start();
?>
<tr>
<?php 
echo smarty_function_counter(array('name' => 'fieldsUsed'), $this);
?>

<td width='12.5%' scope="col">
<?php 
if (!$this->_tpl_vars['fields']['assigned_user_name']['hidden']) {
    ob_start();
    echo smarty_function_sugar_translate(array('label' => 'LBL_ASSIGNED_TO_NAME', 'module' => 'Contacts'), $this);
    $this->_smarty_vars['capture']['label'] = ob_get_contents();
    $this->assign('label', ob_get_contents());
    ob_end_clean();
    echo is_array($_tmp = $this->_tpl_vars['label']) ? $this->_run_mod_handler('strip_semicolon', true, $_tmp) : smarty_modifier_strip_semicolon($_tmp);
    ?>
:
<?php 
}
?>
</td>
<td width='37.5%' colspan='3' >
<?php 
if (!$this->_tpl_vars['fields']['assigned_user_name']['hidden']) {
    echo smarty_function_counter(array('name' => 'panelFieldCount'), $this);
    ?>
	<?php 
echo smarty_function_math(array('equation' => "left % right", 'left' => $this->_tpl_vars['index'], 'right' => $this->_tpl_vars['basicMaxColumns'], 'assign' => 'modVal'), $this);
?>

	<?php 
if ($this->_tpl_vars['index'] % $this->_tpl_vars['basicMaxColumns'] == 1 && $this->_tpl_vars['index'] != 1) {
    ?>
		</tr><tr>
	<?php 
}
?>
	
	<td scope="row" nowrap="nowrap" width='1%' >
		
		<label for='current_user_only_basic' ><?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_CURRENT_USER_FILTER', 'module' => 'AOS_Quotes'), $this);
?>
</label>
    	</td>

	
	<td  nowrap="nowrap" width='1%'>
			
<?php 
if (strval($this->_tpl_vars['fields']['current_user_only_basic']['value']) == '1' || strval($this->_tpl_vars['fields']['current_user_only_basic']['value']) == 'yes' || strval($this->_tpl_vars['fields']['current_user_only_basic']['value']) == 'on') {
    ?>
 
<?php 
    $this->assign('checked', 'CHECKED');
} else {
    $this->assign('checked', "");
	<?php 
echo smarty_function_math(array('equation' => "left % right", 'left' => $this->_tpl_vars['index'], 'right' => $this->_tpl_vars['basicMaxColumns'], 'assign' => 'modVal'), $this);
?>

	<?php 
if ($this->_tpl_vars['index'] % $this->_tpl_vars['basicMaxColumns'] == 1 && $this->_tpl_vars['index'] != 1) {
    ?>
		</tr><tr>
	<?php 
}
?>
	
	<td scope="row" nowrap="nowrap" width='1%' >
		
		<label for='open_only_basic' ><?php 
echo smarty_function_sugar_translate(array('label' => 'LBL_OPEN_ITEMS', 'module' => 'Leads'), $this);
?>
</label>
    	</td>

	
	<td  nowrap="nowrap" width='1%'>
			
<?php 
if (strval($this->_tpl_vars['fields']['open_only_basic']['value']) == '1' || strval($this->_tpl_vars['fields']['open_only_basic']['value']) == 'yes' || strval($this->_tpl_vars['fields']['open_only_basic']['value']) == 'on') {
    ?>
 
<?php 
    $this->assign('checked', 'CHECKED');
} else {
    $this->assign('checked', "");