You are here

function file_style_add_form_submit in Styles 7

Same name and namespace in other branches
  1. 7.2 contrib/file_styles/file_styles.admin.inc \file_style_add_form_submit()

Submit handler for adding a new file style.

File

contrib/file_styles/file_styles.admin.inc, line 54
Administrative page callbacks for the File: Styles module.

Code

function file_style_add_form_submit($form, &$form_state) {
  $style = array(
    'name' => $form_state['values']['name'],
  );
  $style = file_style_save($style);
  drupal_set_message(t('Style %name was created.', array(
    '%name' => $style['name'],
  )));
  $form_state['redirect'] = 'admin/config/file/file-styles/edit/' . $style['name'];
}