You are here

function save_draft_draft_button_submit in Save Draft 7

Submit handler for the save as draft button.

Calls all submit handlers on the save button.

1 string reference to 'save_draft_draft_button_submit'
save_draft_form_node_form_alter in ./save_draft.module
Implements hook_form_FORM_ID_alter().

File

./save_draft.module, line 112
Main file for the Save Draft module, which adds a 'Save as draft' button to content types.

Code

function save_draft_draft_button_submit($form, &$form_state) {
  if (variable_get('save_draft_show_message_' . $form['#node']->type, FALSE)) {
    if ($form_state['triggering_element']['#value'] == $form['actions']['draft']['#value']) {
      drupal_set_message(t('Saved as draft.'));
    }
  }
  foreach ($form['actions']['submit']['#submit'] as $submit) {
    $submit($form, $form_state);
  }
}