예제 #1
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>";
     }
 }
예제 #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();
 }
예제 #3
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();
 }