- ' . $messages . '
-
' . t('Email This Petition') . '
' . l(t('Click here to return to the petition'), $nice_url, array('attributes' => array('target' => '_top', 'class' => array('no-follow')))) . '
- ';
- print $html;
- exit;
- }
- print '';
- exit;
-}
diff --git a/modules/custom/wh_petitions/wh_petitions.tokens.inc b/modules/custom/wh_petitions/wh_petitions.tokens.inc
deleted file mode 100644
index 8a2d614af..000000000
--- a/modules/custom/wh_petitions/wh_petitions.tokens.inc
+++ /dev/null
@@ -1,45 +0,0 @@
- t('Petition data'),
- 'description' => t('Tokens related to petitions'),
- 'needs-data' => 'petition',
- );
- $petition['title'] = array(
- 'name' => t('Petition title'),
- 'description' => t('Petition title'),
- );
- return array(
- 'types' => $types,
- 'tokens' => array('petition' => $petition),
- );
-}
-
-/**
- * Implements hook_tokens().
- */
-function wh_petitions_tokens($type, $tokens, array $data = array(), array $options = array()) {
- $replacements = array();
- $sanitize = isset($options, $options['sanitize']) ? $options['sanitize'] : FALSE;
-
- if ($type == 'petition' && !empty($data['petition'])) {
- $petition = $data['petition'];
- // Future support for more tokens
- foreach ($tokens as $name => $original) {
- switch ($name){
- case 'title':
- $title = $petition['title'];
- $replacements[$original] = $sanitize ? check_plain($title) : $title;
- break;
- }
- }
- }
- return $replacements;
-}
diff --git a/modules/custom/wh_profile_migrate/profile_migration.inc b/modules/custom/wh_profile_migrate/profile_migration.inc
deleted file mode 100644
index bfe752519..000000000
--- a/modules/custom/wh_profile_migrate/profile_migration.inc
+++ /dev/null
@@ -1,88 +0,0 @@
-description = t('Migration of user profiles from shared_users to D7');
-
- $this->map = new MigrateSQLMap($this->machineName,
- array(
- 'uid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- )
- ),
- MigrateDestinationProfile2::getKeySchema()
- );
-
- // We are getting data from Profile table from the shared database so create connection and set up a query for this data.
-
- $query = db_select('profile_values', 'pv');
- $query->addField('pv', 'uid');
-
- // First Name
- $query->leftJoin('profile_values', 'pv1', 'pv1.uid = pv.uid AND pv1.fid = 1');
- $query->addField('pv1', 'value', 'profile_first_name');
-
- // Last Name
- $query->leftJoin('profile_values', 'pv2', 'pv2.uid = pv.uid AND pv2.fid = 2');
- $query->addField('pv2', 'value', 'profile_last_name');
-
- // City
- $query->leftJoin('profile_values', 'pv7', 'pv7.uid = pv.uid AND pv7.fid = 7');
- $query->addField('pv7', 'value', 'profile_city');
-
- // State
- $query->leftJoin('profile_values', 'pv8', 'pv8.uid = pv.uid AND pv8.fid = 8');
- $query->addField('pv8', 'value', 'profile_state');
-
- // Zip
- $query->leftJoin('profile_values', 'pv9', 'pv9.uid = pv.uid AND pv9.fid = 9');
- $query->addField('pv9', 'value', 'profile_zip');
-
- // Country
- $query->leftJoin('profile_values', 'pv10', 'pv10.uid = pv.uid AND pv10.fid = 10');
- $query->addField('pv10', 'value', 'profile_country');
-
- // Join to Users so we can users Login as highwaterField
- $query->leftJoin('users', 'u', 'u.uid = pv.uid');
- $query->addField('u', 'access');
-
- $query->distinct();
-
- $query->orderBy('u.access');
-
- $this->highwaterField = array(
- 'name' => 'access',
- 'alias' => 'u',
- 'type' => 'int',
- );
-
- $this->source = new MigrateSourceSQL($query, array(), NULL, array('map_joinable' => FALSE));
-
- // Cache the source counts so we don't kill the admin UI the first time we try to load the migration
- // $this->source->cacheCount = TRUE;
-
- $this->destination = new MigrateDestinationProfile2("main");
-
- $this->addUnmigratedDestinations(array('pid', 'language', 'path'));
-
- // Assign mappings TO destination fields FROM source fields.
-
- $this->addFieldMapping('uid', 'uid');
- $this->addFieldMapping('revision_uid', 'uid');
- $this->addFieldMapping('field_first_name', 'profile_first_name');
- $this->addFieldMapping('field_last_name', 'profile_last_name');
- $this->addFieldMapping('field_city', 'profile_city');
- $this->addFieldMapping('field_state', 'profile_state');
- $this->addFieldMapping('field_zip', 'profile_zip');
- $this->addFieldMapping('field_country', 'profile_country');
- $this->addFieldMapping('is_new', '')->defaultValue(TRUE);
- }
-}
diff --git a/modules/custom/wh_profile_migrate/wh_profile_migrate.info b/modules/custom/wh_profile_migrate/wh_profile_migrate.info
deleted file mode 100644
index 178e3e372..000000000
--- a/modules/custom/wh_profile_migrate/wh_profile_migrate.info
+++ /dev/null
@@ -1,12 +0,0 @@
-name = "White House Profile Migrate"
-description = "A one-time profile migration script to initially populate the profile data."
-package = "Custom Developed"
-core = 7.x
-
-dependencies[] = migrate_extras
-dependencies[] = profile2
-dependencies[] = migrate
-dependencies[] = wh_user_profile
-
-files[] = profile_migration.inc
-
diff --git a/modules/custom/wh_profile_migrate/wh_profile_migrate.module b/modules/custom/wh_profile_migrate/wh_profile_migrate.module
deleted file mode 100644
index 5aa1ba1f0..000000000
--- a/modules/custom/wh_profile_migrate/wh_profile_migrate.module
+++ /dev/null
@@ -1,11 +0,0 @@
- 2,
- );
- return $api;
-}
diff --git a/modules/custom/wh_response/templates/wh-response-display-list-response.tpl.php b/modules/custom/wh_response/templates/wh-response-display-list-response.tpl.php
deleted file mode 100644
index 1d7eec75e..000000000
--- a/modules/custom/wh_response/templates/wh-response-display-list-response.tpl.php
+++ /dev/null
@@ -1,9 +0,0 @@
-
\ No newline at end of file
diff --git a/modules/custom/wh_response/templates/wh-response-page-responses.tpl.php b/modules/custom/wh_response/templates/wh-response-page-responses.tpl.php
deleted file mode 100644
index e3db3f195..000000000
--- a/modules/custom/wh_response/templates/wh-response-page-responses.tpl.php
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
- array('class' => 'active no-follow')); else $atts = array('attributes' => array('class' => 'no-follow')); ?>
-
- array('class' => 'active no-follow')); else $atts = array('attributes' => array('class' => 'no-follow')); ?>
-
- -
- array("class" => "popup-title no-follow"))); ?>
-
- -
- array("class" => "popup-title no-follow"))); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- '
' . $count . '', '!total' => $total)), "responses/".$sort."/".($page+1)."/" . $cols . '/' . $issues . '/' . $search, array("html" => TRUE, "attributes" => array("class" => "clear show-more-responses-bar no-follow"))); ?>
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.css b/modules/custom/wh_response/wh_response.css
deleted file mode 100644
index 5edc6e9a9..000000000
--- a/modules/custom/wh_response/wh_response.css
+++ /dev/null
@@ -1,25 +0,0 @@
-.display-none {
- display: none;
-}
-.display-block {
- display: block;
-}
-#wh-response-node-form .petitions .form-type-textarea {
- display:none;
-}
-#wh-response-node-form .petitions .form-type-textfield, #wh-response-node-form .notifications .form-type-textfield {
- width:85%;
-}
-#wh-response-node-form .notifications .preview-button {
- position:relative;
- top:18px;
-}
-.float-right {
- float:right;
-}
-.open-intro {
- cursor:pointer;
-}
-#edit-field-petition-count {
- display:none;
-}
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.form.inc b/modules/custom/wh_response/wh_response.form.inc
deleted file mode 100644
index 357ef9a81..000000000
--- a/modules/custom/wh_response/wh_response.form.inc
+++ /dev/null
@@ -1,180 +0,0 @@
-
' . t('Filter By Issues') . '
' . $form . '
';
-}
-
-/**
- * Callback for the standalone page that has the search filter form.
- */
-function wh_response_filter_search_standalone() {
- $form = drupal_get_form('wh_response_list_page_search_form');
- $form = drupal_render($form);
- drupal_set_title(t('Response Search'));
-
- return '';
- }
- elseif ($i == ($in_each + 1)) {
- $form_element[$key]['#prefix'] = '
';
- }
- elseif ($i == (($in_each * 2) + 1)) {
- $form_element[$key]['#prefix'] = '
';
- }
- elseif ($i == $size) {
- $form_element[($key)]['#suffix'] = '
';
- }
-
- $form_element[$key]['#attributes']['id'] = $form_element['#id']. '-' . $key;
- $i++;
- }
-
- return $form_element;
- }
-}
-
-/**
- * Filter by search form on responses list page
- */
-function wh_response_list_page_search_form($form, &$form_state) {
- global $base_url;
- $form['#attributes'] = array('id' => 'form-item-search-drop', 'class' => array('response-search-form'));
- $form['#action'] = $base_url . '/filter/results/responses';
-
- // Prepopulate if there was something in the url
- $search = arg(5);
- if (!empty($search)) {
- $search = strip_tags(urldecode($search));
- $form_state['values']['filter_search'] = check_plain($search);
- }
-
- $form['filter_search'] = array(
- '#type' => 'textfield',
- '#title' => t('Search Terms'),
- '#required' => FALSE,
- '#attributes' => array('onfocus' => array("if(this.value=='" . t('Enter your search terms') . "'){this.value=''};")),
- '#default_value' => !empty($form_state['values']['filter_search']) ? $form_state['values']['filter_search'] : t('Enter your search terms'),
- );
-
- // Submit Button
- $form['go'] = array(
- '#type' => 'submit',
- '#value' => t('Go'),
- '#attributes' => array('id' => 'search-go-button', 'class' => array('button')),
- );
-
- if (arg(0) == 'filter-search') {
- $form['go']['#attributes'] = array('id' => 'search-go-button', 'class' => array('blue-button'));
- }
-
- return $form;
-}
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.info b/modules/custom/wh_response/wh_response.info
deleted file mode 100644
index 14cd73332..000000000
--- a/modules/custom/wh_response/wh_response.info
+++ /dev/null
@@ -1,8 +0,0 @@
-name = "WH Response"
-description = "Core functionality for Responses"
-package = "Custom"
-core = "7.x"
-version = "7.x-1.0"
-dependencies[] = "mongodb"
-dependencies[] = "taxonomy"
-dependencies[] = "wh_petitions"
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.install b/modules/custom/wh_response/wh_response.install
deleted file mode 100644
index 558b401b0..000000000
--- a/modules/custom/wh_response/wh_response.install
+++ /dev/null
@@ -1,33 +0,0 @@
-fields(array('weight' => 2))
- ->condition('type', 'module')
- ->condition('name', 'wh_response')
- ->execute();
-}
-
-/**
- * Implements hook_update_N().
- */
-function wh_response_update_7001() {
- // Set the weight to 2 (must be after pathauto)
- db_update('system')
- ->fields(array('weight' => 2))
- ->condition('type', 'module')
- ->condition('name', 'wh_response')
- ->execute();
-}
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.js b/modules/custom/wh_response/wh_response.js
deleted file mode 100644
index 59ed0c480..000000000
--- a/modules/custom/wh_response/wh_response.js
+++ /dev/null
@@ -1,31 +0,0 @@
-(function ($) {
-/* Display the correct media field based on the status of the dropdown */
-Drupal.behaviors.mediaChange = {
- attach: function(context) {
- $('#edit-field-response-media select').change(function() {
- tid = $(this).val();
- $('.column-wrapper .media-type').each(function() {
- if($(this).hasClass('media-id-' + tid)) {
- $(this).removeClass('display-none');
- $(this).addClass('display-block');
- }
- else {
- $(this).removeClass('display-block');
- $(this).addClass('display-none');
- }
- });
- });
- }
-}
-
-/* Slide open the intro field on the response edit form */
-Drupal.behaviors.openIntro = {
- attach: function(context) {
- $('#wh-response-node-form .petitions .open-intro').click(function() {
- var id_arr = $(this).attr('id').split('-');
- id = id_arr[2];
- $('#wh-response-node-form .petitions .form-item-petitions-petition-'+id+'-intro').slideToggle();
- });
- }
-}
-})(jQuery);
\ No newline at end of file
diff --git a/modules/custom/wh_response/wh_response.module b/modules/custom/wh_response/wh_response.module
deleted file mode 100644
index 15af3d24e..000000000
--- a/modules/custom/wh_response/wh_response.module
+++ /dev/null
@@ -1,1047 +0,0 @@
- '',
- 'description' => '',
- 'page callback' => 'wh_response_show_responses',
- 'page arguments' => array(),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.pages.inc',
- );
-
- // More Responses AJAX call
- $items['responses/more/%/%/%/%'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_more_responses',
- 'page arguments' => array(2, 3, 4, 5),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.pages.inc',
- );
-
- // Autocomplete field for Petitions on the Response form
- $items['petition-autocomplete'] = array(
- 'page callback' => 'wh_response_petition_autocomplete',
- 'page arguments' => array(),
- 'access arguments' => array('access content'),
- 'type' => MENU_CALLBACK,
- );
-
- // Issues Form Page ( for compliance - they're in hidden divs that use JS normally )
- $items['filter-issues/responses'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_filter_issue_standalone',
- 'page arguments' => array(),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.form.inc',
- );
-
- // Search Form Page ( for compliance - they're in hidden divs that use JS normally )
- $items['filter-search/responses'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_filter_search_standalone',
- 'page arguments' => array(),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.form.inc',
- );
-
- // Callback for the standalone search/filter pages above.
- $items['filter/results/responses'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_filter_results',
- 'page arguments' => array(),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.form.inc',
- );
-
- // Email A Response Pages
- $items['response/email/%'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_email_response',
- 'page arguments' => array(2),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.pages.inc',
- );
- $items['response/email_frame/%'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_email_response_frame',
- 'page arguments' => array(2),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.pages.inc',
- );
- $items['response/email_thank/%'] = array(
- 'title' => '',
- 'description' => '',
- 'page callback' => 'wh_response_email_response_thank_you',
- 'page arguments' => array(2),
- 'access arguments' => array('access content'),
- 'file' => 'wh_response.pages.inc',
- );
-
- return $items;
-}
-
-/**
- * Implements hook_theme().
- */
-function wh_response_theme() {
- return array(
- // Responses list page
- 'wh_response_display_responses_page' => array(
- 'arguments' => array(),
- 'template' => 'templates/wh-response-page-responses',
- ),
- // List view display of a response
- 'wh_response_display_list_response' => array(
- 'arguments' => array(),
- 'template' => 'templates/wh-response-display-list-response',
- ),
- );
-}
-
-/**
- * Implements hook_block_info().
- */
-function wh_response_block_info() {
- $blocks['wh_response_featured_block'] = array(
- 'info' => t('Featured Petition & Response'),
- 'cache' => DRUPAL_CACHE_GLOBAL,
- );
- $blocks['wh_response_recent_responses'] = array(
- 'info' => t('Recent Responses'),
- 'cache' => DRUPAL_CACHE_GLOBAL,
- );
-
- return $blocks;
-}
-
-/**
- * Implements hook_block_view().
- */
-function wh_response_block_view($delta) {
- $block = array();
-
- switch ($delta) {
- // Featured Petition & Response
- case 'wh_response_featured_block':
- $block['subject'] = t('Featured Petition & Response');
-
- // Get a random featured response
- $query = db_select('node', 'n', array('target' => 'slave'))
- ->fields('n', array('nid', 'title'))
- ->condition('n.type', 'wh_response')
- ->condition('n.status', 0, '<>');
- $query->innerJoin('field_data_field_is_featured', 'f', 'n.nid = f.entity_id');
- $query->addField('f', 'field_is_featured_value', 'field_is_featured_value');
- $query->orderRandom()
- ->condition('f.field_is_featured_value', 1);
- $result = $query->range(0, 1)
- ->execute();
-
- $html = '' . t('Enter the body of the email that will be sent to signors of petitions associated with this response. To preview the email, enter email addresss(es) in the field below and click Preview') . '