function _acquia_agent_an_trial_details_new_form in Acquia Connector 7
Same name and namespace in other branches
- 6 acquia_agent/acquia_agent.pages.inc \_acquia_agent_an_trial_details_new_form()
New user form
File
- acquia_agent/
acquia_agent.pages.inc, line 203 - Acquia Agent configuration page.
Code
function _acquia_agent_an_trial_details_new_form(&$form_state, $banner = NULL) {
global $user;
$val = $form_state['storage']['values'];
$form = array(
'#prefix' => '<p>' . t('Start your subscription by providing the information below. We\'ll create a free trial subscription for you, and set up this site with the subscription keys.') . '</p>',
'email' => array(
'#type' => 'item',
'#title' => t('E-mail address'),
'#markup' => $val['email'],
'#required' => TRUE,
),
'subscription_name' => array(
'#type' => 'textfield',
'#title' => t('Subscription name'),
'#size' => 32,
'#maxlength' => 64,
'#required' => TRUE,
'#default_value' => variable_get('site_name', 'Site for ' . $user->name),
),
'site_url' => array(
'#type' => 'textfield',
'#title' => t('Your site\'s URL'),
'#size' => 32,
'#maxlength' => 128,
'#default_value' => url(NULL, array(
'absolute' => TRUE,
)),
),
'billing_country_acquia' => array(
'#type' => 'select',
'#title' => t('Country'),
'#options' => _acquia_agent_countries(),
'#required' => TRUE,
),
'pass' => array(
'#type' => 'password_confirm',
'#title' => t('Create your Acquia.com password'),
'#size' => 32,
'#required' => TRUE,
),
'billing_first_name' => array(
'#type' => 'textfield',
'#title' => t('First name'),
'#size' => 32,
'#maxlength' => 32,
'#required' => TRUE,
),
'billing_last_name' => array(
'#type' => 'textfield',
'#title' => t('Last name'),
'#size' => 32,
'#maxlength' => 32,
'#required' => TRUE,
),
'billing_company' => array(
'#type' => 'textfield',
'#title' => t('Organization name'),
'#size' => 32,
'#maxlength' => 64,
'#required' => TRUE,
),
'billing_phone' => array(
'#type' => 'textfield',
'#title' => t('Phone'),
'#size' => 32,
'#maxlength' => 64,
'#required' => TRUE,
),
'submit' => array(
'#type' => 'submit',
'#value' => t('Start my new 30-day free trial for this site'),
),
// Special value elements.
'this_step' => array(
'#type' => 'value',
'#value' => 'details_new',
),
'banner' => array(
'#markup' => $banner,
),
'#theme' => 'acquia_agent_banner_form',
'#validate' => array(
'_acquia_agent_an_trial_details_form_validate',
),
);
return $form;
}