You are here

function nd_build_mode_form_submit in Node displays 6

Save new build mode.

1 string reference to 'nd_build_mode_form_submit'
nd_build_mode_form in includes/nd.buildmodes.inc
Build mode form.

File

includes/nd.buildmodes.inc, line 243
Manage build modes.

Code

function nd_build_mode_form_submit($form, &$form_state) {
  $build_modes = variable_get('nd_build_modes', array());
  $build_modes[$form_state['values']['key']] = $form_state['values']['name'];
  variable_set('nd_build_modes', $build_modes);
  drupal_set_message(t('Build mode %build_mode has been saved.', array(
    '%build_mode' => $build_modes[$form_state['values']['key']],
  )));
  $form_state['redirect'] = 'admin/content/types/nd/buildmodes';
  menu_rebuild();
}