From 08462511c850e731e644503b95298140380dc4aa Mon Sep 17 00:00:00 2001
From: Colan Schwartz <colan@58704.no-reply.drupal.org>
Date: Tue, 10 May 2016 10:06:15 -0400
Subject: [PATCH] Issue #2712701 by colan: Provide select options for the SaaS
 platform instead of requiring a node ID.

---
 submodules/hosting_saas/hosting_saas.module | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/submodules/hosting_saas/hosting_saas.module b/submodules/hosting_saas/hosting_saas.module
index 6cf467b..c2cb55f 100644
--- a/submodules/hosting_saas/hosting_saas.module
+++ b/submodules/hosting_saas/hosting_saas.module
@@ -63,10 +63,12 @@ function hosting_saas_settings() {
   );
 
   $form['hosting_saas_target_platform'] = array(
-    '#type' => 'textfield',
-    '#title' => t('Target platform node ID'),
-    '#description' => t('The node ID of the platform on which to create the site. This can either be set here, or provided in the remote request. If provided in the request, the value here will be overridden. Can be ignored if using an install-based method instead of the clone-based one provided by this module.'),
-    '#default_value' => variable_get('hosting_saas_target_platform', ''),
+    '#type' => 'select',
+    '#title' => t('Platform'),
+    '#description' => t('The platform to use for new sites. This can either be set here, or provided in the remote request. If provided in the request, the value here will be overridden. Can be ignored if using an install-based method instead of the clone-based one provided by this module.'),
+    // Get a list of enabled platforms on any Web server.
+    '#options' => _hosting_get_platforms(0, TRUE),
+    '#default_value' => variable_get('hosting_saas_target_platform'),
   );
 
   $form['hosting_saas_max_capacity'] = array(
-- 
1.9.1

