1 block.admin.inc block_custom_block_translate_submit($form, &$form_state)

Form submission handler for block_custom_block_translate().

Saves the new custom block.

Parameters

array $form: An associative array containing the structure of a portion of the form.

array $form_state: A keyed array containing the current state of the form.

See also

block_custom_block_translate()

block_custom_block_translate_validate()

File

core/modules/block/block.admin.inc, line 433
Admin page callbacks for the Block module.

Code

function block_custom_block_translate_submit($form, &$form_state) {
  $langcode = NULL;
  $delta = $form_state['values']['delta'];
  if (isset($form_state['values']['langcode'])) {
    $langcode = $form_state['values']['langcode'];
  }
  block_custom_block_save($form_state['values'], $form_state['values']['delta'], $langcode);
  backdrop_set_message(t('The block translation has been saved.'));
  $form_state['redirect'] = 'admin/structure/block/manage/' . $delta . '/translation';
}