function services_admin_keys_form in Services 5
Same name and namespace in other branches
- 6 services_admin_keys.inc \services_admin_keys_form()
1 string reference to 'services_admin_keys_form'
- services_menu in ./
services.module - Implementation of hook_menu.
File
- ./
services_admin_keys.inc, line 42 - The file contains code which is used to create the keys interface
Code
function services_admin_keys_form($key = NULL) {
$form['kid'] = array(
'#type' => 'hidden',
'#default_value' => $key->kid,
);
if ($key) {
$form['key'] = array(
'#type' => 'markup',
'#title' => t('Key'),
'#value' => '<strong>' . t('API Key') . ':</strong> ' . $key->kid,
);
}
$form['title'] = array(
'#title' => t('Application title'),
'#type' => 'textfield',
'#default_value' => $key->title,
'#description' => t('The title of the application or website using the service.'),
);
$form['domain'] = array(
'#title' => t('Allowed domain'),
'#type' => 'textfield',
'#default_value' => $key->domain,
'#description' => t('External domain allowed to use this key.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => $key ? t('Save key') : t('Create key'),
);
return $form;
}