Skip to content

Commit

Permalink
OPENEUROPA-1500: Some improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyad committed Jan 4, 2019
1 parent 0943def commit ca8df1f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ oe_webtools_analytics.settings:
instance:
type: string
label: 'Instance'
description: 'The test server instance. e.g. testing, ec.europa.eu or europa.eu.'
description: 'The server instance. e.g. testing, ec.europa.eu or europa.eu.'
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ oe_webtools_analytics.settings:
title: Webtools Analytics
description: 'Configure Webtools Analytics.'
route_name: oe_webtools_analytics.settings
parent: system.admin_config_regional
parent: system.admin_config_system
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
oe_webtools_analytics.settings:
path: '/admin/config/regional/oe_webtools_analytics'
path: '/admin/config/system/oe_webtools_analytics'
defaults:
_form: 'Drupal\oe_webtools_analytics\Form\WebtoolsAnalyticsSettingsForm'
_title: 'Webtools Analytics settings'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ class WebtoolsAnalyticsSettingsForm extends ConfigFormBase {
*/
const CONFIGNAME = 'oe_webtools_analytics.settings';

/**
* {@inheritdoc}
*/
public function getFormId() {
return 'oe_webtools_analytics_settings';
}

/**
* {@inheritdoc}
*/
protected function getEditableConfigNames() {
return ['oe_webtools_analytics.settings'];
}

/**
* {@inheritdoc}
*/
Expand All @@ -37,7 +51,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'textfield',
'#title' => $this->t('Instance'),
'#default_value' => $this->config(static::CONFIGNAME)->get('instance'),
'#description' => $this->t('The test server instance. e.g. testing, ec.europa.eu or europa.eu.'),
'#description' => $this->t('The server instance. e.g. testing, ec.europa.eu or europa.eu.'),
];
return parent::buildForm($form, $form_state);
}
Expand All @@ -54,18 +68,4 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
}

/**
* {@inheritdoc}
*/
public function getFormId() {
return 'oe_webtools_analytics_settings';
}

/**
* {@inheritdoc}
*/
protected function getEditableConfigNames() {
return ['oe_webtools_analytics.settings'];
}

}
1 change: 0 additions & 1 deletion tests/features/analytics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Feature: Webtools Analytics
In order to provide analytics
As the site manager
I need to be able to configure the settings
And Webtools Analytics works as expected

Background:
Given I am logged in as a user with the "administer site configuration" permission
Expand Down

0 comments on commit ca8df1f

Please sign in to comment.