当前位置: 首页>>代码示例>>PHP>>正文


PHP EmailTemplate::generateFieldDefsJS方法代码示例

本文整理汇总了PHP中EmailTemplate::generateFieldDefsJS方法的典型用法代码示例。如果您正苦于以下问题:PHP EmailTemplate::generateFieldDefsJS方法的具体用法?PHP EmailTemplate::generateFieldDefsJS怎么用?PHP EmailTemplate::generateFieldDefsJS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EmailTemplate的用法示例。


在下文中一共展示了EmailTemplate::generateFieldDefsJS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testgenerateFieldDefsJS

 public function testgenerateFieldDefsJS()
 {
     error_reporting(E_ERROR | E_PARSE);
     $emailTemplate = new EmailTemplate();
     //execute the method and verify that it retunrs expected results
     $expected = 'var field_defs = {"Contacts":[{"name":"contact_name","value":"Name"},{"name":"contact_description","value":"Description"},{"name":"contact_salutation","value":"Salutation"},{"name":"contact_first_name","value":"First Name"},{"name":"contact_last_name","value":"Last Name"},{"name":"contact_full_name","value":"Name"},{"name":"contact_title","value":"Title"},{"name":"contact_photo","value":"Photo"},{"name":"contact_department","value":"Department"},{"name":"contact_phone_home","value":"Home"},{"name":"contact_email","value":"Any Email"},{"name":"contact_phone_mobile","value":"Mobile"},{"name":"contact_phone_work","value":"Office Phone"},{"name":"contact_phone_other","value":"Other Phone"},{"name":"contact_phone_fax","value":"Fax"},{"name":"contact_email1","value":"Email Address"},{"name":"contact_email2","value":"Other Email"},{"name":"contact_primary_address_street","value":"Primary Address Street"},{"name":"contact_primary_address_street_2","value":"Primary Address Street 2"},{"name":"contact_primary_address_street_3","value":"Primary Address Street 3"},{"name":"contact_primary_address_city","value":"Primary Address City"},{"name":"contact_primary_address_state","value":"Primary Address State"},{"name":"contact_primary_address_postalcode","value":"Primary Address Postal Code"},{"name":"contact_primary_address_country","value":"Primary Address Country"},{"name":"contact_alt_address_street","value":"Alternate Address Street"},{"name":"contact_alt_address_street_2","value":"Alternate Address Street 2"},{"name":"contact_alt_address_street_3","value":"Alternate Address Street 3"},{"name":"contact_alt_address_city","value":"Alternate Address City"},{"name":"contact_alt_address_state","value":"Alternate Address State"},{"name":"contact_alt_address_postalcode","value":"Alternate Address Postal Code"},{"name":"contact_alt_address_country","value":"Alternate Address Country"},{"name":"contact_assistant","value":"Assistant"},{"name":"contact_assistant_phone","value":"Assistant Phone"},{"name":"contact_email_addresses_non_primary","value":"Non Primary E-mails"},{"name":"contact_email_and_name1","value":"Name"},{"name":"contact_lead_source","value":"Lead Source"},{"name":"contact_birthdate","value":"Birthdate"},{"name":"contact_joomla_account_id","value":"LBL_JOOMLA_ACCOUNT_ID"},{"name":"contact_joomla_account_access","value":"LBL_JOOMLA_ACCOUNT_ACCESS"},{"name":"contact_portal_user_type","value":"Portal User Type"},{"name":"contact_event_status_name","value":"LBL_LIST_INVITE_STATUS_EVENT"},{"name":"contact_event_invite_id","value":"LBL_LIST_INVITE_STATUS"},{"name":"contact_event_accept_status","value":"LBL_LIST_ACCEPT_STATUS_EVENT"},{"name":"contact_event_status_id","value":"Accept Status"},{"name":"contact_jjwg_maps_address_c","value":""},{"name":"contact_jjwg_maps_geocode_status_c","value":""},{"name":"contact_jjwg_maps_lat_c","value":""},{"name":"contact_jjwg_maps_lng_c","value":""},{"name":"contact_refered_by","value":"Referred By"},{"name":"contact_lead_source_description","value":"Lead Source Description"},{"name":"contact_status","value":"Status"},{"name":"contact_status_description","value":"Status Description"},{"name":"contact_account_name","value":"Account Name"},{"name":"contact_account_id","value":"Account ID"},{"name":"contact_webtolead_email1","value":"Email Address"},{"name":"contact_webtolead_email2","value":"Other Email"},{"name":"contact_portal_name","value":"Portal Name"},{"name":"contact_portal_app","value":"Portal Application"},{"name":"contact_website","value":"Website"},{"name":"contact_tracker_key","value":"Tracker Key"}],"Accounts":[{"name":"account_name","value":"Name"},{"name":"account_description","value":"Description"},{"name":"account_account_type","value":"Type"},{"name":"account_industry","value":"Industry"},{"name":"account_annual_revenue","value":"Annual Revenue"},{"name":"account_phone_fax","value":"Fax"},{"name":"account_billing_address_street","value":"Billing Street"},{"name":"account_billing_address_street_2","value":"Billing Street 2"},{"name":"account_billing_address_street_3","value":"Billing Street 3"},{"name":"account_billing_address_street_4","value":"Billing Street 4"},{"name":"account_billing_address_city","value":"Billing City"},{"name":"account_billing_address_state","value":"Billing State"},{"name":"account_billing_address_postalcode","value":"Billing Postal Code"},{"name":"account_billing_address_country","value":"Billing Country"},{"name":"account_rating","value":"Rating"},{"name":"account_phone_office","value":"Office Phone"},{"name":"account_phone_alternate","value":"Alternate Phone"},{"name":"account_website","value":"Website"},{"name":"account_ownership","value":"Ownership"},{"name":"account_employees","value":"Employees"},{"name":"account_ticker_symbol","value":"Ticker Symbol"},{"name":"account_shipping_address_street","value":"Shipping Street"},{"name":"account_shipping_address_street_2","value":"Shipping Street 2"},{"name":"account_shipping_address_street_3","value":"Shipping Street 3"},{"name":"account_shipping_address_street_4","value":"Shipping Street 4"},{"name":"account_shipping_address_city","value":"Shipping City"},{"name":"account_shipping_address_state","value":"Shipping State"},{"name":"account_shipping_address_postalcode","value":"Shipping Postal Code"},{"name":"account_shipping_address_country","value":"Shipping Country"},{"name":"account_email1","value":"Email Address"},{"name":"account_email_addresses_non_primary","value":"Non Primary E-mails"},{"name":"account_parent_id","value":"Parent Account ID"},{"name":"account_sic_code","value":"SIC Code"},{"name":"account_email","value":"Any Email"},{"name":"account_jjwg_maps_address_c","value":""},{"name":"account_jjwg_maps_geocode_status_c","value":""},{"name":"account_jjwg_maps_lat_c","value":""},{"name":"account_jjwg_maps_lng_c","value":""}],"Users":[{"name":"contact_user_user_name","value":"User Name"},{"name":"contact_user_pwd_last_changed","value":"Password Last Changed"},{"name":"contact_user_first_name","value":"First Name"},{"name":"contact_user_last_name","value":"Last Name"},{"name":"contact_user_full_name","value":"Full Name"},{"name":"contact_user_name","value":"Full Name"},{"name":"contact_user_description","value":"Description"},{"name":"contact_user_title","value":"Title"},{"name":"contact_user_photo","value":"Photo"},{"name":"contact_user_department","value":"Department"},{"name":"contact_user_phone_home","value":"Home Phone"},{"name":"contact_user_phone_mobile","value":"Mobile"},{"name":"contact_user_phone_work","value":"Work Phone"},{"name":"contact_user_phone_other","value":"Other Phone"},{"name":"contact_user_phone_fax","value":"Fax"},{"name":"contact_user_status","value":"Status"},{"name":"contact_user_address_street","value":"Address Street"},{"name":"contact_user_address_city","value":"Address City"},{"name":"contact_user_address_state","value":"Address State"},{"name":"contact_user_address_country","value":"Address Country"},{"name":"contact_user_address_postalcode","value":"Address Postal Code"},{"name":"contact_user_usertype","value":"User Type"},{"name":"contact_user_employee_status","value":"Employee Status"},{"name":"contact_user_messenger_id","value":"IM Name"},{"name":"contact_user_messenger_type","value":"IM Type"},{"name":"contact_user_email1","value":"Email Address"},{"name":"contact_user_email_link_type","value":"Email Client"},{"name":"contact_user_securitygroup_noninherit_id","value":"LBL_securitygroup_noninherit_id"}]};';
     $actual = $emailTemplate->generateFieldDefsJS();
     //$this->assertSame($expected,$actual);
     $this->assertGreaterThan(0, strlen($actual));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:10,代码来源:EmailTemplateTest.php

示例2: urlencode

    $xtpl->assign("SUBJECT", $focus->subject);
} else {
    $xtpl->assign("SUBJECT", "");
}
if ($focus->published == 'on') {
    $xtpl->assign("PUBLISHED", "CHECKED");
}
//if text only is set to true, then make sure input is checked and value set to 1
if (isset($focus->text_only) && $focus->text_only) {
    $xtpl->assign("TEXTONLY_CHECKED", "CHECKED");
    $xtpl->assign("TEXTONLY_VALUE", "1");
} else {
    //set value to 0
    $xtpl->assign("TEXTONLY_VALUE", "0");
}
$xtpl->assign("FIELD_DEFS_JS", $focus->generateFieldDefsJS());
$xtpl->assign("LBL_CONTACT", $app_list_strings['moduleList']['Contacts']);
global $current_user;
if (is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])) {
    $record = '';
    if (!empty($_REQUEST['record'])) {
        $record = $_REQUEST['record'];
    }
    $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $record . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' alt='Edit Layout' align='bottom'") . "</a>");
}
if (isset($focus->parent_type) && $focus->parent_type != "") {
    $change_parent_button = "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' accessKey='" . $app_strings['LBL_SELECT_BUTTON_KEY'] . "'\ntabindex='3' type='button' class='button' value='" . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "' name='button' LANGUAGE=javascript onclick='return\nwindow.open(\"index.php?module=\"+ document.EditView.parent_type.value +\n\"&action=Popup&html=Popup_picker&form=TasksEditView\",\"test\",\"width=600,height=400,resizable=1,scrollbars=1\");'>";
    $xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button);
}
if ($focus->parent_type == "Account") {
    $xtpl->assign("DEFAULT_SEARCH", "&query=true&account_id={$focus->parent_id}&account_name=" . urlencode($focus->parent_name));
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:EditView.php


注:本文中的EmailTemplate::generateFieldDefsJS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。