You are here

function views_ui_edit_details_form in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \views_ui_edit_details_form()
  2. 6.2 includes/admin.inc \views_ui_edit_details_form()
  3. 7.3 includes/admin.inc \views_ui_edit_details_form()

Form builder to edit details of a view.

1 string reference to 'views_ui_edit_details_form'
views_ui_ajax_forms in views_ui/admin.inc
Returns information about subforms for editing the pieces of a view.

File

views_ui/admin.inc, line 944
Provides the Views' administrative interface.

Code

function views_ui_edit_details_form($form, &$form_state) {
  $view =& $form_state['view'];
  $form['#title'] = t('View name and description');
  $form['#section'] = 'details';
  $form['details'] = array(
    '#theme_wrappers' => array(
      'container',
    ),
    '#attributes' => array(
      'class' => array(
        'scroll',
      ),
    ),
  );
  $form['details']['human_name'] = array(
    '#type' => 'textfield',
    '#title' => t('Human-readable name'),
    '#description' => t('A descriptive human-readable name for this view. Spaces are allowed'),
    '#default_value' => $view->storage
      ->getHumanName(),
  );
  $form['details']['tag'] = array(
    '#type' => 'textfield',
    '#title' => t('View tag'),
    '#description' => t('Optionally, enter a comma delimited list of tags for this view to use in filtering and sorting views on the administrative page.'),
    '#default_value' => $view->storage->tag,
    '#autocomplete_path' => 'admin/views/ajax/autocomplete/tag',
  );
  $form['details']['description'] = array(
    '#type' => 'textfield',
    '#title' => t('View description'),
    '#description' => t('This description will appear on the Views administrative UI to tell you what the view is about.'),
    '#default_value' => $view->storage->description,
  );
  $view
    ->getStandardButtons($form, $form_state, 'views_ui_edit_details_form');
  return $form;
}