Example #1
0
 public function display()
 {
     global $sugar_config, $current_user, $app_list_strings;
     $aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
     $this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Contacts');
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     /********************************************************************************************************/
     /*                                                   dynamic dd                                         */
     /********************************************************************************************************/
     //TODO
     $dynamic_dd_fileds = array("country_c" => array("tblname" => "ref_pays", "listname" => "country_list", "field" => "nom"));
     $list = new loadDynamicLists();
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field']);
     }
     //if the current user is not admin then hide the values of certain fields and make them non inline-editable
     if ($current_user->is_admin != 1) {
         echo "\n\t\t\t<script>\n\t\t\t\t\$('html').hide();\n\t\t\t\t\$(document).ready(\n\t\t\t\tfunction()\n\t\t\t\t{\n\n\t\t\t\tvar remove_fields =    \t['email1','phone_mobile','jjwg_maps_address_c','primary_address_postalcode','primary_address_state','primary_address_city','alt_address_city','primary_address_country','phone_work','phone_fax','description'];//you can add the fields you want to hide here\n\n\n\t\t\t\t\$.each( remove_fields, function( key, value ) {\n\n\n\t\t\t\t\$('td[field= ' + value + ']').html( '' );\n\n\t\t\t\t\$('td[field=' + value + ']').removeAttr('field');\n\t\t\t\t});\n\n\t\t\t\t\$('html').show(250);\n\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t</script>";
         //if the field modified_c is not 0 then the user cannot see this record until an Admin user sets it back to 0
         if ($this->bean->modified_c != 0) {
             echo "\n\t\t\t<script>\t\t\t\t\n\t\t\t\t\$(document).ready(\n\t\t\t\t\tfunction()\n\t\t\t\t\t{\n\t\t\t\t\t\$('#pagecontent').html('<div class=\\'alert alert-danger\\' role=\\'alert\\'>Vos modifications sont en attente de validation</div>');\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t</script>";
         }
     }
     if ($current_user->is_admin == 1 && $this->bean->modified_c == 1) {
         //function to uncheck the modified checkbox in order to give access to this Contact to non Admin users
         echo "\n\t\t\t<script>\t\t\t\t\n\t\t\t\t\$(document).ready(\n\t\t\t\t\tfunction()\n\t\t\t\t\t{\n\t\t\t\t\t\$('.subnav').prepend('<li><a href=\\'#\\' onclick=\\'uncheckBox();\\'>Valider</a></li>');\n\t\t\t\t\t}\n\t\t\t\t);\n\n            var uncheckBox = function(){\n                 \n\t\t\t\t\t\$.ajax({\n\t\t\t\t\turl: 'index.php?module=Contacts&action=untag&m=Contact&record=" . $this->bean->id . "',\n\t\t\t\t\tdata: {\n\t\t\t\t\tformat: 'text'\n\t\t\t\t\t},\n\n\t\t\t\t\tdataType: 'text',\n\t\t\t\t\tsuccess: function(data) {\n\t\t\t\t\t\$('#pagecontent').prepend('<div class=\\'alert alert-success\\' role=\\'alert\\'>You have successfully untagged this record.</div>');\n\t\t\t\t\t},\n\t\t\t\t\ttype: 'GET'\n\t\t\t\t\t});\n\n            }\n          \n\n\t\t\t</script>";
     }
     parent::display();
 }
Example #2
0
 /**
  * @see ViewList::preDisplay()
  */
 public function preDisplay()
 {
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::LVPopupHtml('Leads');
     parent::preDisplay();
     $this->lv = new LeadsListViewSmarty();
 }
Example #3
0
 public function preDisplay()
 {
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::LVPopupHtml('Contacts');
     parent::preDisplay();
     $this->lv = new ContactsListViewSmarty();
     /************************************************************/
     //logic for the search dynamic dropdowns
     /************************************************************/
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     global $current_user, $app_list_strings;
     $list = new loadDynamicLists();
     $dynamic_dd_fileds = array("country_c_basic" => array("tblname" => "ref_pays", "listname" => "country_list", "field" => "nom"));
     $list = new loadDynamicLists();
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field']);
     }
     /************************************************************/
     //end logic for the search dynamic dropdowns
     /************************************************************/
     //if the current user is not admin then hide the values of certain fields and make them non inline-editable
     if ($current_user->is_admin != 1) {
         echo "\n\n\t\t\t<script>\n\t\t\t\t\$('html').hide();\n\t\t\t\t\$(document).ready(\n\t\t\t\tfunction()\n\t\t\t\t{\n\n\t\t\t\tvar remove_fields =    \t['email1','phone_mobile','jjwg_maps_address_c','primary_address_postalcode','primary_address_state','primary_address_city','alt_address_city','primary_address_country','phone_work','phone_fax','description'];//you can add the fields you want to hide here\n\n\n\t\t\t\t\$.each( remove_fields, function( key, value ) {\n\n\n\t\t\t\t\$('td[field= ' + value + ']').html( '' );\n\n\t\t\t\t\$('td[field=' + value + ']').removeAttr('field');\n\t\t\t\t});\n\n\t\t\t\t\$('html').show(250);\n\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t</script>";
     }
 }
Example #4
0
 /**
  * display
  * Override the display method to support customization for the buttons that display
  * a popup and allow you to copy the account's address into the selected contacts.
  * The custom_code_billing and custom_code_shipping Smarty variables are found in
  * include/SugarFields/Fields/Address/DetailView.tpl (default).  If it's a English U.S.
  * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
  */
 function display()
 {
     if (empty($this->bean->id)) {
         global $app_strings;
         sugar_die($app_strings['ERROR_NO_RECORD']);
     }
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Accounts');
     $this->dv->process();
     global $mod_strings;
     if (ACLController::checkAccess('Contacts', 'edit', true)) {
         $push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->billing_address_street)) . '&primary_address_city=' . $this->bean->billing_address_city . '&primary_address_state=' . $this->bean->billing_address_state . '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . '&primary_address_country=' . $this->bean->billing_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
         $push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->shipping_address_street)) . '&primary_address_city=' . $this->bean->shipping_address_city . '&primary_address_state=' . $this->bean->shipping_address_state . '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . '&primary_address_country=' . $this->bean->shipping_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
     } else {
         $push_billing = '';
         $push_shipping = '';
     }
     $this->ss->assign("custom_code_billing", $push_billing);
     $this->ss->assign("custom_code_shipping", $push_shipping);
     if (empty($this->bean->id)) {
         global $app_strings;
         sugar_die($app_strings['ERROR_NO_RECORD']);
     }
     echo $this->dv->display();
 }
Example #5
0
 /**
  * @see ViewList::preDisplay()
  */
 public function preDisplay()
 {
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::LVPopupHtml('Accounts');
     parent::preDisplay();
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     global $current_user, $app_list_strings;
     $list = new loadDynamicLists();
     $dynamic_dd_fileds = array("pays_text_c" => array("tblname" => "ref_pays", "listname" => "pays_text_list", "field" => "nom", "tag" => "0"), "id_region_a_c" => array("tblname" => "ref_region", "listname" => "id_region_a_c_list", "field" => "nom", "tag" => "0"));
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field'], $v['tag']);
     }
     //echo "<pre>";
     //var_dump($app_list_strings['id_region_a_c_list']);
     /* foreach($app_list_strings['id_region_a_c_list'] as $k=>$v){
     	  	echo "'".$k."'=>'".$v."',<br>";
     	  }*/
     //if the current user is not admin then hide the values of certain fields and make them non inline-editable
     if ($current_user->is_admin != 1) {
         echo "\n\n\t\t\t<script>\n\t\t\t\t\$('html').hide();\n\t\t\t\t\$(document).ready(\n\t\t\t\tfunction()\n\t\t\t\t{\n\n\t\t\t\tvar remove_fields =    \t['coda_name_c','coda_sname_c','prive_c','id_etat_c','date_effectif_c','date_maj_c','commentaire2_c','code_hier_c','adhesion_c','sigle_c','historique','nb_etud_c','nb_ens_c','nb_cherch_c','rub_c','commentaire2_c','nb_etud_annee_obs_c','nb_ens_annee_obs_c','nb_cherch_annee_obs_c','chiffres_c'];//you can add the fields you want to hide here\n\n\n\t\t\t\t\$.each( remove_fields, function( key, value ) {\n\n\n\t\t\t\t\$('td[field= ' + value + ']').html( '' );\n\n\t\t\t\t\$('td[field=' + value + ']').removeAttr('field');\n\t\t\t\t});\n\n\t\t\t\t\$('html').show(250);\n\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t</script>";
     }
     $this->lv = new AccountsListViewSmarty();
 }
Example #6
0
 public function display()
 {
     global $sugar_config;
     $aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
     $this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Contacts');
     parent::display();
 }
 function buildExportLink($id = 'export_link')
 {
     $script = "";
     if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) {
         if ($this->export) {
             $script = parent::buildExportLink($id);
         }
     }
     return $script . formLetter::LVSmarty();
 }
Example #8
0
 function display()
 {
     global $sugar_config;
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Leads');
     //If the convert lead action has been disabled for already converted leads, disable the action link.
     $disableConvert = $this->bean->status == 'Converted' && !empty($sugar_config['disable_convert_lead']) ? TRUE : FALSE;
     $this->ss->assign("DISABLE_CONVERT_ACTION", $disableConvert);
     parent::display();
 }
 /**
  * display
  *
  * We are overridding the display method to manipulate the portal information.
  * If portal is not enabled then don't show the portal fields.
  */
 function display()
 {
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Contacts');
     parent::display();
 }
Example #10
0
 function buildExportLink($id = 'export_link')
 {
     global $app_strings;
     global $sugar_config;
     $script = "";
     if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) {
         if ($this->export) {
             $script = parent::buildExportLink($id);
         }
     }
     $script .= "<a href='javascript:void(0)' id='map_listview_top' " . " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>";
     return formLetter::LVSmarty() . $script;
 }
Example #11
0
 /**
  * display
  * Override the display method to support customization for the buttons that display
  * a popup and allow you to copy the account's address into the selected contacts.
  * The custom_code_billing and custom_code_shipping Smarty variables are found in
  * include/SugarFields/Fields/Address/DetailView.tpl (default).  If it's a English U.S.
  * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
  */
 function display()
 {
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     global $current_user, $app_list_strings;
     /********************************************************************************************************/
     /*                                                   dynamic dd                                         */
     /********************************************************************************************************/
     $list = new loadDynamicLists();
     $domaine_c = $this->bean->domaine_c;
     $domaine_c = str_replace('^', '', $domaine_c);
     $selected = explode(',', $domaine_c);
     ////special multi enum
     $dynamic_dd_fileds2 = array("domaine_c" => array("tblname" => "ref_discip", "listname" => "domaines_section_c_list", "field" => "Domaine", "field2" => "Discipline"));
     $detail_enum = '';
     foreach ($dynamic_dd_fileds2 as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $detail_enum = $list->populate_list2($v['tblname'], $v['field'], $v['field2'], $selected);
     }
     $dynamic_dd_fileds = array("pays_text_c" => array("tblname" => "ref_pays", "listname" => "pays_text_list", "field" => "nom"), "pays_iso2_c" => array("tblname" => "ref_pays", "listname" => "pays_iso2_c_list", "field" => "code"), "id_region_a_c" => array("tblname" => "ref_region", "listname" => "id_region_a_c_list", "field" => "nom"));
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         if (isset($v['tblname'], $v['field'], $v['pay'])) {
             $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field'], $v['pay']);
         }
     }
     if (empty($this->bean->id)) {
         sugar_die($app_strings['ERROR_NO_RECORD']);
     }
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Accounts');
     $this->dv->process();
     global $mod_strings;
     if (ACLController::checkAccess('Contacts', 'edit', true)) {
         $push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->billing_address_street)) . '&primary_address_city=' . $this->bean->billing_address_city . '&primary_address_state=' . $this->bean->billing_address_state . '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . '&primary_address_country=' . $this->bean->billing_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
         $push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . $this->bean->name . '&html=change_address' . '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->shipping_address_street)) . '&primary_address_city=' . $this->bean->shipping_address_city . '&primary_address_state=' . $this->bean->shipping_address_state . '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . '&primary_address_country=' . $this->bean->shipping_address_country . '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">';
     } else {
         $push_billing = '';
         $push_shipping = '';
     }
     $this->ss->assign("custom_code_billing", $push_billing);
     $this->ss->assign("custom_code_shipping", $push_shipping);
     if (empty($this->bean->id)) {
         global $app_strings;
         sugar_die($app_strings['ERROR_NO_RECORD']);
     }
     //if the current user is not admin then hide the values of certain fields and make them non inline-editable
     echo "\r\n\r\n\t\t\t<script>\r\n\r\n\r\n\r\n\t\t\t\t\$(document).ready(function()\r\n\t\t\t\t{     render();//init\r\n\r\n\t\t\t\t\t\$('td[field=domaine_c]').html('" . $detail_enum['list_detail'] . "');\r\n\r\n\t\t\t\t\t\$( '#type_etablissement_c' ).change(function() {                \r\n                      \r\n                      render();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t  });\t\r\n\t\t\t\t});\r\n\r\n            //custom function\r\n            render = function(){\r\n\r\n            \tvar remove_fields =    \t['coda_name_c','coda_sname_c','prive_c','id_etat_c','date_effectif_c','date_maj_c','statut_c','commentaire2_c','code_hier_c','qualite_c','adhesion_c','sigle_c','historique','nb_etud_c','nb_ens_c','nb_cherch_c','rub_c','commentaire2_c','nb_etud_annee_obs_c','nb_ens_annee_obs_c','nb_cherch_annee_obs_c','chiffres_c'];//you can add the fields you want to hide here\r\n                       \r\n\r\n\t\t\t\t\t\t\$.each( remove_fields, function( key, value ) {\r\n                        var dd_val =\$( '#type_etablissement_c' ).val();\r\n\t\t                if(dd_val=='faculte'){\r\n\t\t                \t\$('td[field= ' + value + ']').css( 'color','white' );\r\n\t\t                \t\$('td[field= ' + value + ']').prev().css( 'color','white' );\r\n\t\t                \t\$('td[field= ' + value + ']').removeClass('inlineEdit');\r\n\t\t                \t\$('td[field= ' + value + ']').html('');\r\n\r\n\r\n\t\t                }\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\$('td[field= ' + value + ']').css( 'color','black' );\r\n\t\t\t\t\t\t\t\$('td[field= ' + value + ']').prev().css( 'color','black' );\r\n\t\t\t\t\t\t\t\$('td[field= ' + value + ']').addClass('inlineEdit');\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t});\r\n            }\r\n\r\n\t\t\t</script>";
     echo $this->dv->display();
 }
Example #12
0
 /**
  * @see SugarView::display()
  *
  * We are overridding the display method to manipulate the portal information.
  * If portal is not enabled then don't show the portal fields.
  */
 public function display()
 {
     global $sugar_config;
     $aop_portal_enabled = !empty($sugar_config['aop']['enable_portal']) && !empty($sugar_config['aop']['enable_aop']);
     $this->ss->assign("AOP_PORTAL_ENABLED", $aop_portal_enabled);
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Contacts');
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
 }
Example #13
0
    static function DVPopupHtml($module)
    {
        global $app_strings;
        $templates = formLetter::getModuleTemplates($module);
        if (!empty($templates)) {
            echo '	<div id="popupDiv_ara" style="display:none;position:fixed;top: 39%; left: 41%;opacity:1;z-index:9999;background:#FFFFFF;">
 				<form id="popupForm" action="index.php?entryPoint=formLetter" method="post">
 				<table style="border: #000 solid 2px;padding-left:40px;padding-right:40px;padding-top:10px;padding-bottom:10px;font-size:110%;" >
					<tr height="20">
						<td colspan="2">
						<b>' . $app_strings['LBL_SELECT_TEMPLATE'] . ':-</b>
						</td>
					</tr>';
            foreach ($templates as $templateid => $template) {
                $js = "document.getElementById('popupDivBack_ara').style.display='none';document.getElementById('popupDiv_ara').style.display='none';var form=document.getElementById('popupForm');if(form!=null){form.templateID.value='" . $templateid . "';form.submit();}else{alert('Error!');}";
                echo '<tr height="20">
					<td width="17" valign="center"><a href="#" onclick="' . $js . '"><img src="themes/default/images/txt_image_inline.gif" width="16" height="16" /></a></td>
					<td scope="row" align="left"><b><a href="#" onclick="' . $js . '">' . $template . '</a></b></td></tr>';
            }
            echo '		<input type="hidden" name="templateID" value="" />
				<input type="hidden" name="module" value="' . $module . '" />
				<input type="hidden" name="uid" value="' . $_REQUEST['record'] . '" />
				</form>
				<tr style="height:10px;"><tr><tr><td colspan="2"><button style=" display: block;margin-left: auto;margin-right: auto" onclick="document.getElementById(\'popupDivBack_ara\').style.display=\'none\';document.getElementById(\'popupDiv_ara\').style.display=\'none\';return false;">Cancel</button></td></tr>
				</table>
				</div>
				
				<div id="popupDivBack_ara" onclick="this.style.display=\'none\';document.getElementById(\'popupDiv_ara\').style.display=\'none\';" style="top:0px;left:0px;position:fixed;height:100%;width:100%;background:#000000;opacity:0.5;display:none;vertical-align:middle;text-align:center;z-index:9998;">
				</div>
				<script>
					function showPopup(){
						var ppd=document.getElementById(\'popupDivBack_ara\');
						var ppd2=document.getElementById(\'popupDiv_ara\');
						if(ppd!=null && ppd2!=null){
							ppd.style.display=\'block\';
							ppd2.style.display=\'block\';
						}else{
							alert(\'Error!\');
						}
					}
				</script>';
        } else {
            echo '<script>
				function showPopup(){
				alert(\'' . $app_strings['LBL_NO_TEMPLATE'] . '\');		
				}
			</script>';
        }
    }
Example #14
0
 /**
  * display
  * Override the display method to support customization for the buttons that display
  * a popup and allow you to copy the account's address into the selected contacts.
  * The custom_code_billing and custom_code_shipping Smarty variables are found in
  * include/SugarFields/Fields/Address/DetailView.tpl (default).  If it's a English U.S.
  * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
  */
 function display()
 {
     require_once 'modules/AOS_PDF_Templates/formLetter.php';
     formLetter::DVPopupHtml('Leads');
     parent::display();
 }