Commit 49d6255e authored by webchick's avatar webchick

Issue #1818082 by damiankloip, dawehner, Bojhan, yoroy: People miss view name field.

parent 238ffe4f
......@@ -217,7 +217,7 @@ function build_form(array $form, array &$form_state) {
'#title' => t('Create a page'),
'#type' => 'checkbox',
'#attributes' => array('class' => array('strong')),
'#default_value' => TRUE,
'#default_value' => FALSE,
'#id' => 'edit-page-create',
);
......
......@@ -40,6 +40,7 @@ public function testCommentWizard() {
$view['human_name'] = $this->randomName(16);
$view['name'] = strtolower($this->randomName(16));
$view['show[wizard_key]'] = 'comment';
$view['page[create]'] = TRUE;
$view['page[path]'] = $this->randomName(16);
// Just triggering the saving should automatically choose a proper row
......
......@@ -30,7 +30,12 @@ public function form(array $form, array &$form_state, EntityInterface $view) {
$form['#attached']['js'][] = drupal_get_path('module', 'views_ui') . '/js/views-admin.js';
$form['#attributes']['class'] = array('views-admin');
$form['human_name'] = array(
$form['name'] = array(
'#type' => 'fieldset',
'#attributes' => array('class' => array('fieldset-no-legend')),
);
$form['name']['human_name'] = array(
'#type' => 'textfield',
'#title' => t('View name'),
'#required' => TRUE,
......@@ -38,21 +43,21 @@ public function form(array $form, array &$form_state, EntityInterface $view) {
'#default_value' => '',
'#maxlength' => 255,
);
$form['name'] = array(
$form['name']['name'] = array(
'#type' => 'machine_name',
'#maxlength' => 128,
'#machine_name' => array(
'exists' => 'views_get_view',
'source' => array('human_name'),
'source' => array('name', 'human_name'),
),
'#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),
);
$form['description_enable'] = array(
$form['name']['description_enable'] = array(
'#type' => 'checkbox',
'#title' => t('Description'),
);
$form['description'] = array(
$form['name']['description'] = array(
'#type' => 'textfield',
'#title' => t('Provide description'),
'#title_display' => 'invisible',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment