diff --git a/agov.info b/agov.info index bf50cfe..db24fe9 100644 --- a/agov.info +++ b/agov.info @@ -189,6 +189,9 @@ dependencies[] = agov_tags ; Search dependencies[] = agov_search_core +; AWS Custom build +dependencies[] = aws_validate + ; Information added by Drupal.org packaging script on 2015-07-14 version = "7.x-2.0+0-dev" core = "7.x" diff --git a/agov.install b/agov.install index f49fd45..6a775b1 100644 --- a/agov.install +++ b/agov.install @@ -1221,6 +1221,27 @@ function agov_install_tasks($install_state) { * Implements hook_install_tasks_alter(). */ function agov_install_tasks_alter(&$tasks, $install_state) { + + // If the aws_validate module is included in the profile, insert a validation + // step before asking for any site information. + // Since the tasks array lacks a weighting, we need to do this by copying the + // steps to a temp array and inserting an extra element at the right time. + $info = install_profile_info($install_state['parameters']['profile']); + if (in_array('aws_validate', $info['dependencies'])) { + $new_tasks = array(); + foreach ($tasks as $callback => $task) { + if ($callback == 'install_configure_form') { + $new_tasks['aws_validate_instanceid_form'] = array( + 'display_name' => st('AWS Validate'), + 'display' => TRUE, + 'type' => 'form', + ); + } + $new_tasks[$callback] = $task; + } + $tasks = $new_tasks; + } + $tasks['agov_finished'] = $tasks['install_finished']; unset($tasks['install_finished']); } diff --git a/drupal-org.make b/drupal-org.make index f6367a1..c5124c5 100644 --- a/drupal-org.make +++ b/drupal-org.make @@ -198,3 +198,6 @@ libraries[backbone][patch][] = "https://www.drupal.org/files/issues/2235299-11.p libraries[modernizr][download][type] = "get" libraries[modernizr][download][url] = "https://github.com/Modernizr/Modernizr/archive/v2.7.0.tar.gz" libraries[modernizr][type] = "library" + +; AWS Custom build +projects[aws_validate][version] = "1.0-beta1"