function services_client_form_alter in Services Client 7.2
Same name and namespace in other branches
- 7 services_client.module \services_client_form_alter()
Implements hook_form_alter().
File
- ./
services_client.module, line 175
Code
function services_client_form_alter(&$form, $form_state, $form_id) {
if (services_client_is_entity_form($form, $form_state) && user_access('skip sending entity')) {
$form['_services_client_exclude'] = array(
'#type' => 'checkbox',
'#title' => t('Skip services client syncing'),
'#description' => t("Don't push this update via 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';
}
}
}