function services_client_form_alter in Services Client 7
Same name and namespace in other branches
- 7.2 services_client.module \services_client_form_alter()
Implements hook_form_alter().
File
- ./
services_client.module, line 1194 - Services client module allows to push different types of objects on different types of events such as node_save, user_save to remote masters.
Code
function services_client_form_alter(&$form, $form_state, $form_id) {
// Admin registers user
if (($form_id == 'user_register_form' || $form_id == 'user_profile_form') && user_access('administer users')) {
$form['_services_client_skip'] = array(
'#type' => 'checkbox',
'#title' => t("Don't send update by services client"),
);
}
if ($form_id == 'ctools_export_ui_edit_item_form') {
if ($form_state['plugin']['schema'] == 'services_client_connection') {
$form['services_client_id'] = array(
'#type' => 'textfield',
'#title' => t('Remote client ID'),
'#default_value' => isset($form_state['item']->services_client_id) ? $form_state['item']->services_client_id : NULL,
'#description' => t('Enter ID of services client on remote endpoint.'),
'#size' => 50,
);
$form['#submit'][] = 'services_client_form_submit_connection';
}
}
}