function _services_ahah_security_options in Services 6.2
Same name and namespace in other branches
- 7 services_admin_browse.inc \_services_ahah_security_options()
Callback for the security configuration form ahah.
1 string reference to '_services_ahah_security_options'
- services_menu in ./
services.module - Implementation of hook_menu().
File
- ./
services_admin_browse.inc, line 392 - Browser thru all services and servers.
Code
function _services_ahah_security_options() {
$cached_form_state = array();
$cached_form = form_get_cache($_POST['form_build_id'], $cached_form_state);
if (!empty($_POST['auth_module'])) {
$settings = services_auth_invoke_custom($_POST['auth_module'], 'security_settings');
}
if (is_array($settings)) {
$cached_form['security']['options']['settings'] = $settings;
}
else {
unset($cached_form['security']['options']['settings']);
}
form_set_cache($_POST['form_build_id'], $cached_form, $cached_form_state);
$form_state = array(
'submitted' => FALSE,
);
$options = $cached_form['security']['options'];
unset($options['#prefix'], $options['#suffix']);
$options = form_builder('_services_ahah_security_options', $options, $form_state);
$output = drupal_render($options);
print drupal_to_js(array(
'status' => TRUE,
'data' => $output,
));
exit;
}