Ejemplo n.º 1
0
	public function install() {
		
		$fields = array(
			array('name' => _M('Project Name'), 'type'=>'text', 'required'=>true, 'param'=>'64', 'extra'=>false, 'visible'=>true,'display_callback'=>array('Tests_BugtrackCommon', 'display_bugtrack')),	
			array('name' => _M('Company Name'), 'type'=>'select', 'required'=>true, 'param'=>array('company'=>'Company Name'), 'extra'=>false, 'visible'=>true),
			array('name' => _M('Due Date'), 'type'=>'date', 'required'=>true, 'param'=>64, 'extra'=>false, 'visible'=>true),
			array('name' => _M('Status'), 'type'=>'commondata', 'required'=>true, 'param'=>'Bugtrack_Status', 'extra'=>false,'visible'=>true),
			array('name' => _M('Description'), 'type'=>'long text', 'required'=>false, 'param'=>'64', 'extra'=>false)
		);
		Utils_RecordBrowserCommon::install_new_recordset('bugtrack', $fields);
		Utils_RecordBrowserCommon::new_filter('bugtrack', 'Company Name');
		Utils_RecordBrowserCommon::set_quickjump('bugtrack', 'Project Name');
		Utils_RecordBrowserCommon::set_favorites('bugtrack', true);
		Utils_RecordBrowserCommon::set_recent('bugtrack', 15);
		Utils_RecordBrowserCommon::set_caption('bugtrack', _M('Bugtrack'));
		Utils_RecordBrowserCommon::set_icon('bugtrack', Base_ThemeCommon::get_template_filename('Tests/Bugtrack', 'icon.png'));
		
// ************ addons ************** //
		Utils_AttachmentCommon::new_addon('bugtrack');
		Utils_RecordBrowserCommon::new_addon('company', 'Tests/Bugtrack', 'company_bugtrack_addon', 'Bugtrack');

// ************ other ************** //	
		Utils_CommonDataCommon::new_array('Bugtrack_Status',array('new'=>_M('New'),'inprog'=>_M('In Progress'),'cl'=>_M('Closed')),true,true);

		Utils_RecordBrowserCommon::add_access('bugtrack', 'view', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'add', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'edit', 'ACCESS:employee');
		Utils_RecordBrowserCommon::add_access('bugtrack', 'delete', array('ACCESS:employee', 'ACCESS:manager'));

		return true;
	}
Ejemplo n.º 2
0
 public function install()
 {
     Base_ThemeCommon::install_default_theme(CRM_ContactsInstall::module_name());
     Utils_RecordBrowserCommon::register_datatype('crm_company', 'CRM_ContactsCommon', 'crm_company_datatype');
     Utils_RecordBrowserCommon::register_datatype('crm_contact', 'CRM_ContactsCommon', 'crm_contact_datatype');
     Utils_RecordBrowserCommon::register_datatype('crm_company_contact', 'CRM_ContactsCommon', 'crm_company_contact_datatype');
     Utils_RecordBrowserCommon::register_datatype('email', 'CRM_ContactsCommon', 'email_datatype');
     ModuleManager::include_common('CRM_Contacts', 0);
     // ************ companies ************** //
     $fields = array(array('name' => _M('Company Name'), 'type' => 'text', 'required' => true, 'param' => '128', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_cname')), array('name' => _M('Short Name'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => false), array('name' => _M('Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Fax'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Email'), 'type' => 'email', 'required' => false, 'param' => array('unique' => true), 'extra' => true, 'visible' => false), array('name' => _M('Web address'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_webaddress'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_webaddress')), array('name' => _M('Group'), 'type' => 'multiselect', 'required' => false, 'visible' => true, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Companies_Groups'), 'extra' => false, 'filter' => true), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => true), array('name' => _M('Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Country'), 'type' => 'commondata', 'required' => true, 'param' => array('Countries'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country'), 'extra' => true, 'visible' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Tax ID'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_tax_id')));
     Utils_RecordBrowserCommon::install_new_recordset('company', $fields);
     // ************ contacts ************** //
     $fields = array(array('name' => _M('Last Name'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label')), array('name' => _M('First Name'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('Utils_RecordBrowserCommon', 'display_linked_field_label')), array('name' => _M('Company Name'), 'type' => 'crm_company', 'param' => array('field_type' => 'select'), 'required' => false, 'extra' => false, 'visible' => true, 'filter' => true), array('name' => _M('Related Companies'), 'type' => 'crm_company', 'param' => array('field_type' => 'multiselect'), 'required' => false, 'extra' => true, 'visible' => false, 'filter' => true), array('name' => _M('Group'), 'type' => 'multiselect', 'required' => false, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Contacts_Groups'), 'extra' => true, 'filter' => true), array('name' => _M('Title'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Work Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Mobile Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Fax'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Email'), 'type' => 'email', 'required' => false, 'param' => array('unique' => true), 'extra' => false, 'visible' => false), array('name' => _M('Web address'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_webaddress'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_webaddress')), array('name' => _M('Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'visible' => true, 'display_callback' => array('CRM_ContactsCommon', 'maplink')), array('name' => _M('Country'), 'type' => 'commondata', 'required' => true, 'param' => array('Countries'), 'extra' => true, 'visible' => false, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country'), 'extra' => true, 'visible' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => true), array('name' => _M('Details'), 'type' => 'page_split'), array('name' => _M('Home Phone'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'display_phone')), array('name' => _M('Home Address 1'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home Address 2'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home City'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true, 'display_callback' => array('CRM_ContactsCommon', 'home_maplink')), array('name' => _M('Home Country'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_country')), array('name' => _M('Home Zone'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Home Country'), 'extra' => true, 'QFfield_callback' => array('Data_CountriesCommon', 'QFfield_zone')), array('name' => _M('Home Postal Code'), 'type' => 'text', 'required' => false, 'param' => '64', 'extra' => true), array('name' => _M('Birth Date'), 'type' => 'date', 'required' => false, 'param' => 64, 'extra' => true), array('name' => _M('Login Panel'), 'type' => 'page_split', 'param' => 1), array('name' => _M('Login'), 'type' => 'integer', 'required' => false, 'param' => '64', 'extra' => false, 'display_callback' => array('CRM_ContactsCommon', 'display_login'), 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_login'), 'style' => ''), array('name' => _M('Username'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_username')), array('name' => _M('Set Password'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_password')), array('name' => _M('Confirm Password'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_repassword')), array('name' => _M('Admin'), 'type' => 'calculated', 'required' => false, 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_admin'), 'display_callback' => array('CRM_ContactsCommon', 'display_admin')), array('name' => _M('Access'), 'type' => 'multiselect', 'required' => false, 'param' => Utils_RecordBrowserCommon::multiselect_from_common('Contacts/Access'), 'extra' => false, 'QFfield_callback' => array('CRM_ContactsCommon', 'QFfield_access')));
     Utils_RecordBrowserCommon::install_new_recordset('contact', $fields);
     DB::CreateIndex('contact_data_1__f_login_idx', 'contact_data_1', 'f_login,active');
     // ************ company settings ************** //
     Utils_RecordBrowserCommon::register_processing_callback('company', array('CRM_ContactsCommon', 'submit_company'));
     Utils_RecordBrowserCommon::set_quickjump('company', 'Company Name');
     Utils_RecordBrowserCommon::set_favorites('company', true);
     Utils_RecordBrowserCommon::set_recent('company', 15);
     Utils_RecordBrowserCommon::set_caption('company', _M('Companies'));
     Utils_RecordBrowserCommon::set_icon('company', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'companies.png'));
     Utils_RecordBrowserCommon::set_description_callback('company', array('CRM_ContactsCommon', 'company_format_default'));
     Utils_RecordBrowserCommon::enable_watchdog('company', array('CRM_ContactsCommon', 'company_watchdog_label'));
     Utils_RecordBrowserCommon::set_clipboard_pattern('company', "%{{company_name}<BR>}\n%{{address_1}<BR>}\n%{{address_2}<BR>}\n%{%{{city} }%{{zone} }{postal_code}<BR>}\n%{{country}<BR>}\n%{tel. {phone}<BR>}\n%{fax. {fax}<BR>}\n%{{web_address}<BR>}");
     // ************ contacts settings ************** //
     Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'Contact'));
     Utils_RecordBrowserCommon::register_processing_callback('contact', array('CRM_ContactsCommon', 'submit_contact'));
     Utils_RecordBrowserCommon::set_quickjump('contact', 'Last Name');
     Utils_RecordBrowserCommon::set_favorites('contact', true);
     Utils_RecordBrowserCommon::set_recent('contact', 15);
     Utils_RecordBrowserCommon::set_caption('contact', _M('Contacts'));
     Utils_RecordBrowserCommon::set_icon('contact', Base_ThemeCommon::get_template_filename(CRM_ContactsInstall::module_name(), 'icon.png'));
     Utils_RecordBrowserCommon::set_description_callback('contact', array('CRM_ContactsCommon', 'contact_format_default'));
     Utils_RecordBrowserCommon::enable_watchdog('contact', array('CRM_ContactsCommon', 'contact_watchdog_label'));
     Utils_RecordBrowserCommon::set_clipboard_pattern('contact', "%{{first_name} {last_name}<BR>}\n%{{title}<BR>}\n%{{company_name}<BR>}\n%{{address_1}<BR>}\n%{{address_2}<BR>}\n%{%{{city} }%{{zone} }{postal_code}<BR>}\n%{{country}<BR>}\n%{tel. {work_phone}<BR>}\n%{{email}<BR>}");
     // ************ addons ************** //
     Utils_RecordBrowserCommon::new_addon('company', CRM_ContactsInstall::module_name(), 'company_addon', _M('Contacts'));
     Utils_AttachmentCommon::new_addon('company');
     Utils_AttachmentCommon::new_addon('contact');
     // ************ other ************** //
     Utils_CommonDataCommon::new_array('Companies_Groups', array('customer' => _M('Customer'), 'vendor' => _M('Vendor'), 'other' => _M('Other'), 'manager' => _M('Manager')), true, true);
     Utils_CommonDataCommon::new_array('Contacts_Groups', array('office' => _M('Office Staff'), 'field' => _M('Field Staff'), 'custm' => _M('Customer')), true, true);
     Utils_CommonDataCommon::new_array('Contacts/Access', array('manager' => _M('Manager')), true, true);
     Utils_BBCodeCommon::new_bbcode('contact', 'CRM_ContactsCommon', 'contact_bbcode');
     Utils_BBCodeCommon::new_bbcode('company', 'CRM_ContactsCommon', 'company_bbcode');
     Utils_RecordBrowserCommon::set_search('company', 1, 2);
     Utils_RecordBrowserCommon::set_search('contact', 1, 2);
     Base_AclCommon::add_clearance_callback(array('CRM_ContactsCommon', 'crm_clearance'));
     Utils_CommonDataCommon::extend_array('Contacts/Access', array('employee' => _M('Employee')));
     self::install_permissions();
     return true;
 }
Ejemplo n.º 3
0
 public function install()
 {
     //addons table
     $fields = array(array('name' => _M('Recordset'), 'type' => 'text', 'param' => 64, 'display_callback' => array($this->get_type() . 'Common', 'display_recordset'), 'QFfield_callback' => array($this->get_type() . 'Common', 'QFfield_recordset'), 'required' => true, 'extra' => false, 'visible' => true));
     Utils_RecordBrowserCommon::install_new_recordset('phonecall_related', $fields);
     Utils_RecordBrowserCommon::set_caption('phonecall_related', _M('Phonecalls Related Recordsets'));
     Utils_RecordBrowserCommon::register_processing_callback('phonecall_related', array('CRM_PhoneCallCommon', 'processing_related'));
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'view', 'ACCESS:employee');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'add', 'ADMIN');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'edit', 'SUPERADMIN');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'delete', 'SUPERADMIN');
     // ************ phone calls ************** //
     Base_ThemeCommon::install_default_theme(CRM_PhoneCallInstall::module_name());
     $fields = array(array('name' => _M('Subject'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_subject')), array('name' => _M('Contact Name'), 'type' => 'hidden', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_contact_name')), array('name' => _M('Phone Number'), 'type' => 'hidden', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_phone_number')), array('name' => _M('Customer'), 'type' => 'crm_company_contact', 'param' => array('field_type' => 'select'), 'extra' => false), array('name' => _M('Other Customer'), 'type' => 'checkbox', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_other_contact')), array('name' => _M('Other Customer Name'), 'type' => 'text', 'param' => '64', 'extra' => false), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => false), array('name' => _M('Employees'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('CRM_PhoneCallCommon', 'employees_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => true, 'extra' => false, 'visible' => true, 'filter' => true), array('name' => _M('Status'), 'type' => 'commondata', 'required' => true, 'filter' => true, 'param' => array('order_by_key' => true, 'CRM/Status'), 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_status')), array('name' => _M('Priority'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Priority'), 'extra' => false), array('name' => _M('Phone'), 'type' => 'integer', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_phone'), 'display_callback' => array('CRM_PhoneCallCommon', 'display_phone')), array('name' => _M('Other Phone'), 'type' => 'checkbox', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_other_phone')), array('name' => _M('Other Phone Number'), 'type' => 'text', 'param' => '64', 'extra' => false), array('name' => _M('Date and Time'), 'type' => 'timestamp', 'required' => true, 'extra' => false, 'visible' => true), array('name' => _M('Description'), 'type' => 'long text', 'required' => false, 'param' => '255', 'extra' => false), array('name' => _M('Related'), 'type' => 'multiselect', 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_related'), 'param' => '__RECORDSETS__::;CRM_PhoneCallCommon::related_crits', 'extra' => false, 'required' => false, 'visible' => true));
     Utils_RecordBrowserCommon::install_new_recordset('phonecall', $fields);
     Utils_RecordBrowserCommon::set_tpl('phonecall', Base_ThemeCommon::get_template_filename(CRM_PhoneCallInstall::module_name(), 'default'));
     Utils_RecordBrowserCommon::register_processing_callback('phonecall', array('CRM_PhoneCallCommon', 'submit_phonecall'));
     Utils_RecordBrowserCommon::set_icon('phonecall', Base_ThemeCommon::get_template_filename(CRM_PhoneCallInstall::module_name(), 'icon.png'));
     Utils_RecordBrowserCommon::set_recent('phonecall', 5);
     Utils_RecordBrowserCommon::set_caption('phonecall', _M('Phonecalls'));
     Utils_RecordBrowserCommon::enable_watchdog('phonecall', array('CRM_PhoneCallCommon', 'watchdog_label'));
     Utils_RecordBrowserCommon::set_search('phonecall', 2, 0);
     // ************ addons ************** //
     Utils_AttachmentCommon::new_addon('phonecall');
     Utils_RecordBrowserCommon::new_addon('phonecall', CRM_PhoneCallInstall::module_name(), 'messanger_addon', _M('Alerts'));
     CRM_RoundcubeCommon::new_addon('phonecall');
     // ************ other ************** //
     CRM_CalendarCommon::new_event_handler(_M('Phonecalls'), array('CRM_PhoneCallCommon', 'crm_calendar_handler'));
     Utils_BBCodeCommon::new_bbcode('phone', 'CRM_PhoneCallCommon', 'phone_bbcode');
     if (ModuleManager::is_installed('Premium_SalesOpportunity') >= 0) {
         Utils_RecordBrowserCommon::new_record_field('phonecall', _M('Opportunity'), 'select', true, false, 'premium_salesopportunity::Opportunity Name;Premium_SalesOpportunityCommon::crm_opportunity_reference_crits', '', false);
     }
     Utils_RecordBrowserCommon::add_access('phonecall', 'view', 'ACCESS:employee', array('(!permission' => 2, '|employees' => 'USER'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'add', 'ACCESS:employee');
     Utils_RecordBrowserCommon::add_access('phonecall', 'edit', 'ACCESS:employee', array('(permission' => 0, '|employees' => 'USER', '|customer' => 'USER'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'delete', 'ACCESS:employee', array(':Created_by' => 'USER_ID'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
     return true;
 }
Ejemplo n.º 4
0
 public function install()
 {
     Utils_CommonDataCommon::new_array('crm_assets_category', array(_M('Desktop'), _M('Server'), _M('Notebook'), _M('Monitor'), _M('Printer'), _M('Other')), true, true);
     Utils_CommonDataCommon::new_id('crm_assets_monitor_type', true);
     Utils_CommonDataCommon::new_array('crm_assets_monitor_type', array(_M('CRT'), _M('LCD'), _M('Other')));
     Utils_CommonDataCommon::new_id('crm_assets_printer_type', true);
     Utils_CommonDataCommon::new_array('crm_assets_printer_type', array(_M('Ink'), _M('Laser'), _M('Other')));
     $fields = array(array('name' => _M('Asset ID'), 'type' => 'calculated', 'param' => Utils_RecordBrowserCommon::actual_db_type('text', 16), 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_AssetsCommon', 'display_asset_id')), array('name' => _M('Active'), 'type' => 'checkbox', 'extra' => false, 'visible' => true, 'filter' => true), array('name' => _M('Category'), 'type' => 'commondata', 'param' => array('crm_assets_category'), 'extra' => false, 'visible' => true, 'filter' => true, 'required' => true, 'QFfield_callback' => array('CRM_AssetsCommon', 'QFfield_category')), array('name' => _M('Asset Name'), 'type' => 'text', 'param' => '128', 'extra' => false, 'visible' => true, 'required' => true), array('name' => _M('Asset Tag'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Company'), 'type' => 'crm_company', 'extra' => false, 'visible' => true, 'param' => array('field_type' => 'select', 'crits' => array('CRM_AssetsCommon', 'company_crits')), 'filter' => true), array('name' => _M('Date Purchased'), 'type' => 'date', 'extra' => false), array('name' => _M('Serial Number'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('IP Address'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('General Info'), 'type' => 'calculated', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_AssetsCommon', 'display_info'), 'QFfield_callback' => array('CRM_AssetsCommon', 'QFfield_info')), array('name' => _M('Host Name'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Operating System'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Processor'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('RAM'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('HDD'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Optical Devices'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Audio'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Software'), 'type' => 'long text', 'extra' => false), array('name' => _M('Display Type'), 'type' => 'commondata', 'extra' => false, 'param' => array('crm_assets_monitor_type')), array('name' => _M('Screen Size'), 'type' => 'text', 'param' => '128', 'extra' => false), array('name' => _M('Printer Type'), 'type' => 'commondata', 'extra' => false, 'param' => array('order_by_key' => true, 'crm_assets_printer_type')), array('name' => _M('Color Printing'), 'type' => 'checkbox', 'extra' => false));
     Utils_RecordBrowserCommon::install_new_recordset('crm_assets', $fields);
     Utils_RecordBrowserCommon::set_recent('crm_assets', 10);
     Utils_RecordBrowserCommon::set_favorites('crm_assets', true);
     Utils_RecordBrowserCommon::set_caption('crm_assets', _M('Assets'));
     Utils_RecordBrowserCommon::set_quickjump('crm_assets', 'Asset Name');
     Utils_RecordBrowserCommon::set_icon('crm_assets', Base_ThemeCommon::get_template_filename('CRM/Assets', 'icon.png'));
     Utils_RecordBrowserCommon::register_processing_callback('crm_assets', array('CRM_AssetsCommon', 'process_request'));
     Utils_RecordBrowserCommon::enable_watchdog('crm_assets', array('CRM_AssetsCommon', 'watchdog_label'));
     Utils_RecordBrowserCommon::add_default_access('crm_assets');
     Utils_RecordBrowserCommon::set_search('crm_assets', 2, 0);
     Utils_RecordBrowserCommon::new_addon('company', 'CRM/Assets', 'assets_addon', _M('Assets'));
     Utils_AttachmentCommon::new_addon('crm_assets');
     Base_ThemeCommon::install_default_theme($this->get_type());
     return true;
 }
Ejemplo n.º 5
0
if (Utils_RecordBrowserCommon::delete_addon('premium_ecommerce_pages_data', 'Premium/Warehouse/eCommerce', 'attachment_page_addon')) {
    Utils_AttachmentCommon::new_addon('premium_ecommerce_pages_data');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_ecommerce_pages_data', 'Premium/Warehouse/eCommerce', 'attachment_page_desc_addon')) {
    Utils_AttachmentCommon::new_addon('premium_ecommerce_pages_data');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_ecommerce_products', 'Premium/Warehouse/eCommerce', 'attachment_product_addon')) {
    Utils_AttachmentCommon::new_addon('premium_ecommerce_products');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_ecommerce_descriptions', 'Premium/Warehouse/eCommerce', 'attachment_product_desc_addon')) {
    Utils_AttachmentCommon::new_addon('premium_ecommerce_descriptions');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_warehouse_items', 'Premium/Warehouse/Items', 'attachment_addon')) {
    Utils_AttachmentCommon::new_addon('premium_warehouse_items');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_warehouse_items_orders', 'Premium/Warehouse/Items/Orders', 'attachment_addon')) {
    Utils_AttachmentCommon::new_addon('premium_warehouse_items_orders');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_warehouse', 'Premium/Warehouse', 'attachment_addon')) {
    Utils_AttachmentCommon::new_addon('premium_warehouse');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_warehouse_distributor', 'Premium/Warehouse/Wholesale', 'attachment_addon')) {
    Utils_AttachmentCommon::new_addon('premium_warehouse_distributor');
}
if (Utils_RecordBrowserCommon::delete_addon('bugtrack', 'Tests/Bugtrack', 'bugtrack_attachment_addon')) {
    Utils_AttachmentCommon::new_addon('bugtrack');
}
if (Utils_RecordBrowserCommon::delete_addon('premium_schoolregister_lesson', 'Premium/SchoolRegister', 'lesson_notes_addon')) {
    Utils_AttachmentCommon::new_addon('premium_schoolregister_lesson');
    DB::Execute('UPDATE utils_attachment_link SET local=' . DB::Concat(DB::qstr('premium_schoolregister_lesson/'), 'local') . ' WHERE local NOT LIKE ' . DB::Concat(DB::qstr('%'), DB::qstr('/'), DB::qstr('%')));
}