You are here

function _hosting_site_form_profile in Hosting 5

generate hosting site node form element 'profile'

1 call to _hosting_site_form_profile()
hosting_site_form in site/hosting_site.module
Implementation of hook_form

File

site/hosting_site.module, line 713

Code

function _hosting_site_form_profile($platform = NULL) {
  $profiles = hosting_get_profiles($platform);
  if (sizeof($profiles) > 1) {
    $form['profile'] = array(
      '#type' => 'radios',
      '#title' => t('Install profile'),
      '#description' => t('The type of site to install.'),
      '#options' => $profiles,
      '#default_value' => key($profiles),
      '#required' => TRUE,
      '#attributes' => array(
        'class' => "hosting-site-form-profile-options",
      ),
    );
  }
  else {
    $form['profile'] = array(
      '#type' => 'hidden',
      '#default_value' => key($profiles),
      '#attributes' => array(
        'class' => "hosting-site-form-profile-options",
      ),
    );
  }
  return $form['profile'];
}