diff --git a/modules/custom/cu_js_includes/cu_js_includes.install b/modules/custom/cu_js_includes/cu_js_includes.install index f58022c42..aca59b256 100644 --- a/modules/custom/cu_js_includes/cu_js_includes.install +++ b/modules/custom/cu_js_includes/cu_js_includes.install @@ -83,9 +83,17 @@ function cu_js_includes_install() { 'admithub' => 'admithub', 'livechat' => 'livechat', 'slateform' => 'slateform', - 'statuspage' => 'statuspage' + 'statuspage' => 'statuspage', + 'burning_glass' => 'burning_glass' ); variable_set('cu_js_includes_enabled', $types); // Menu items are already added so we need to rebuild if types are changed. menu_rebuild(); } + +/** + * Implements hook_uninstall(). + */ +function cu_js_includes_uninstall() { + variable_del('cu_js_includes_enabled'); +} diff --git a/modules/custom/cu_js_includes/cu_js_includes.module b/modules/custom/cu_js_includes/cu_js_includes.module index 97ad41cb6..aef8bf11f 100644 --- a/modules/custom/cu_js_includes/cu_js_includes.module +++ b/modules/custom/cu_js_includes/cu_js_includes.module @@ -400,7 +400,7 @@ function cu_js_includes_block_options() { // Get enabled includes. $enabled_includes = variable_get('cu_js_includes_enabled', array()); // Includes types that are options. - $types = array('statuspage', 'slateform'); + $types = array('statuspage', 'slateform', 'burning_glass'); // Types of filters that are options that are also enabled. $filter = array_intersect($types, $enabled_includes); if (!empty($filter)) { diff --git a/modules/custom/cu_js_includes/includes/cu_js_includes.forms.inc b/modules/custom/cu_js_includes/includes/cu_js_includes.forms.inc index e6fb12070..e18956e1b 100644 --- a/modules/custom/cu_js_includes/includes/cu_js_includes.forms.inc +++ b/modules/custom/cu_js_includes/includes/cu_js_includes.forms.inc @@ -95,3 +95,33 @@ function cu_js_includes_slateform_form(&$form, &$form_state, $id = NULL, $data = '#size' => 128, ); } + +/** + * Form values for burning glass form embed. + * + * @param array $form + * Form containing default embed template form options. + * @param array $form_state + * State of the default embed template form. + * @param int|null $id + * ID of the current embed being edited if that embed exists. + * @param array $data + * Data of the current embed if it is being edited. + */ +function cu_js_includes_burning_glass_form(&$form, &$form_state, $id = NULL, $data = array()) { + $form['options']['access_code'] = array( + '#title' => t('Access Code'), + '#type' => 'textfield', + '#default_value' => !empty($data['access_code']) ? $data['access_code'] : '', + '#required' => TRUE, + '#size' => 128, + ); + + $form['options']['program_code'] = array( + '#title' => t('Program Code'), + '#type' => 'textfield', + '#default_value' => !empty($data['program_code']) ? $data['program_code'] : '', + '#required' => TRUE, + '#size' => 128, + ); +} diff --git a/modules/custom/cu_js_includes/includes/cu_js_includes.permissions.inc b/modules/custom/cu_js_includes/includes/cu_js_includes.permissions.inc index 1a93235e4..4e2864c1f 100644 --- a/modules/custom/cu_js_includes/includes/cu_js_includes.permissions.inc +++ b/modules/custom/cu_js_includes/includes/cu_js_includes.permissions.inc @@ -19,6 +19,7 @@ function cu_js_includes_secure_permissions($role) { 'view livechat js includes', 'view statuspage js includes', 'view slateform js includes', + 'view burning_glass js includes', 'view any js_include bean', ), 'authenticated user' => array( @@ -26,6 +27,7 @@ function cu_js_includes_secure_permissions($role) { 'view livechat js includes', 'view statuspage js includes', 'view slateform js includes', + 'view burning_glass js includes', 'view any js_include bean', ), 'developer' => array( diff --git a/modules/custom/cu_js_includes/includes/cu_js_includes.types.inc b/modules/custom/cu_js_includes/includes/cu_js_includes.types.inc index 5a0461f71..7b932a923 100644 --- a/modules/custom/cu_js_includes/includes/cu_js_includes.types.inc +++ b/modules/custom/cu_js_includes/includes/cu_js_includes.types.inc @@ -43,6 +43,14 @@ function cu_js_includes_get_include_types() { 'template' => 'templates/slateform', ); + $custom_types['burning_glass'] = array( + 'label' => 'Burning Glass', + 'form_callback' => 'cu_js_includes_burning_glass_form', + 'renderer' => 'block', + 'path' => $module_path, + 'template' => 'templates/burning_glass' + ); + return $custom_types; } @@ -57,5 +65,6 @@ function cu_js_includes_express_node_list_groups($bundles) { $bundles['inlcudes']['types'][] = 'Add LiveChat Include'; $bundles['inlcudes']['types'][] = 'Add Slate Form Include'; $bundles['inlcudes']['types'][] = 'Add StatusPage Include'; + $bundles['inlcudes']['types'][] = 'Add Burning Glass Include'; return $bundles; } diff --git a/modules/custom/cu_js_includes/templates/burning_glass.tpl.php b/modules/custom/cu_js_includes/templates/burning_glass.tpl.php new file mode 100644 index 000000000..f821bbb09 --- /dev/null +++ b/modules/custom/cu_js_includes/templates/burning_glass.tpl.php @@ -0,0 +1,19 @@ + +
+ +