function fastly_new_service_form in Fastly 7
Same name and namespace in other branches
- 7.2 fastly.admin.inc \fastly_new_service_form()
New service form.
1 string reference to 'fastly_new_service_form'
- fastly_menu in ./
fastly.module - Implements hook_menu().
File
- ./
fastly.admin.inc, line 233 - Administrative forms for Fastly module.
Code
function fastly_new_service_form() {
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Service Name'),
'#default_value' => variable_get('site_name', ''),
'#required' => TRUE,
);
$form['origin_ip'] = array(
'#type' => 'textfield',
'#title' => t('Origin Server IP'),
'#default_value' => $_SERVER['SERVER_ADDR'],
'#required' => TRUE,
);
$form['port'] = array(
'#type' => 'textfield',
'#title' => t('Origin Port'),
'#default_value' => '80',
'#required' => TRUE,
);
$form['domain_name'] = array(
'#type' => 'textfield',
'#title' => t('Domain Name'),
'#default_value' => $_SERVER['HTTP_HOST'],
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Create'),
);
return $form;
}