You are here

function name_custom_format_edit in Name Field 7

Same name and namespace in other branches
  1. 6 name.admin.inc \name_custom_format_edit()

Page to edit a custom format.

1 string reference to 'name_custom_format_edit'
name_menu in ./name.module
Implements hook_menu().

File

./name.admin.inc, line 423
General administration functions.

Code

function name_custom_format_edit($ncfid) {
  if (isset($_POST['op']) && $_POST['op'] == t('Delete') || isset($_POST['confirm'])) {
    return drupal_get_form('name_custom_format_delete_form', $ncfid);
  }
  if ($name = db_query("SELECT ncf.* FROM {name_custom_format} ncf WHERE ncfid = :ncfid", array(
    ':ncfid' => $ncfid,
  ))
    ->fetchAssoc()) {
    return drupal_get_form('name_custom_formats_form', $name);
  }
  drupal_set_message(t('The custom format could not be found.'), 'error');
  drupal_goto('admin/config/content/name');
}