You are here

private function wf_crm_admin_form::addResources in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/wf_crm_admin_form.inc \wf_crm_admin_form::addResources()

Add necessary css & js

1 call to wf_crm_admin_form::addResources()
wf_crm_admin_form::buildForm in includes/wf_crm_admin_form.inc
Build admin form for civicrm tab of a webform

File

includes/wf_crm_admin_form.inc, line 155
Webform CiviCRM module's admin form.

Class

wf_crm_admin_form
@file Webform CiviCRM module's admin form.

Code

private function addResources() {
  $this->form['#attached']['css'][] = drupal_get_path('module', 'webform_civicrm') . '/css/webform_civicrm_admin.css';
  $this->form['#attached']['js'][] = drupal_get_path('module', 'webform_civicrm') . '/js/webform_civicrm_admin.js';
  $this->form['#attached']['js'][] = array(
    'data' => array(
      'webform_civicrm' => array(
        'rTypes' => wf_crm_get_relationship_types(),
      ),
    ),
    'type' => 'setting',
  );

  // Add CiviCRM core css & js, which includes jQuery, jQuery UI + other plugins
  CRM_Core_Resources::singleton()
    ->addCoreResources();

  // Markup needed by CRM popup notifications
  $this->form['#suffix'] = wf_crm_admin_help::helpTemplate();
}