You are here

function wsclient_ui_type_delete_submit in Web service client 7

Submit callback of data type delete form.

File

wsclient_ui/wsclient_ui.inc, line 1298
WSClient UI - implements service description management and configuration screens.

Code

function wsclient_ui_type_delete_submit($form, &$form_state) {
  $service = $form_state['service'];
  $type = $form_state['type'];
  unset($service->datatypes[$type['name']]);
  $service
    ->save();
  drupal_set_message(t('Deleted data type %type.', array(
    '%type' => $type['label'],
  )));
  $form_state['redirect'] = WSCLIENT_UI_PATH . '/manage/' . $service->name;
}