updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -12,8 +12,8 @@ package: Core
|
||||
# core: 8.x
|
||||
configure: forum.overview
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ id: d6_forum_settings
|
||||
label: Forum configuration
|
||||
migration_tags:
|
||||
- Drupal 6
|
||||
- Configuration
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
+1
@@ -2,6 +2,7 @@ id: d7_forum_settings
|
||||
label: Forum configuration
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
- Configuration
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
@@ -6,6 +6,8 @@ use Drupal\Core\Form\FormStateInterface;
|
||||
|
||||
/**
|
||||
* Base form for container term edit forms.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class ContainerForm extends ForumForm {
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ use Drupal\taxonomy\TermInterface;
|
||||
|
||||
/**
|
||||
* Builds the form to delete a forum term.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class DeleteForm extends ConfirmFormBase {
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ use Drupal\taxonomy\TermForm;
|
||||
|
||||
/**
|
||||
* Base form for forum term edit forms.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class ForumForm extends TermForm {
|
||||
|
||||
|
||||
@@ -8,10 +8,13 @@ use Drupal\Core\Render\Element;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\taxonomy\Form\OverviewTerms;
|
||||
use Drupal\Core\Extension\ModuleHandlerInterface;
|
||||
use Drupal\taxonomy\VocabularyInterface;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Provides forum overview form for the forum vocabulary.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class Overview extends OverviewTerms {
|
||||
|
||||
@@ -45,7 +48,7 @@ class Overview extends OverviewTerms {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function buildForm(array $form, FormStateInterface $form_state) {
|
||||
public function buildForm(array $form, FormStateInterface $form_state, VocabularyInterface $taxonomy_vocabulary = NULL) {
|
||||
$forum_config = $this->config('forum.settings');
|
||||
$vid = $forum_config->get('vocabulary');
|
||||
$vocabulary = $this->entityManager->getStorage('taxonomy_vocabulary')->load($vid);
|
||||
@@ -58,21 +61,30 @@ class Overview extends OverviewTerms {
|
||||
|
||||
foreach (Element::children($form['terms']) as $key) {
|
||||
if (isset($form['terms'][$key]['#term'])) {
|
||||
/** @var \Drupal\taxonomy\TermInterface $term */
|
||||
$term = $form['terms'][$key]['#term'];
|
||||
$form['terms'][$key]['term']['#url'] = Url::fromRoute('forum.page', ['taxonomy_term' => $term->id()]);
|
||||
unset($form['terms'][$key]['operations']['#links']['delete']);
|
||||
$route_parameters = $form['terms'][$key]['operations']['#links']['edit']['url']->getRouteParameters();
|
||||
|
||||
if (!empty($term->forum_container->value)) {
|
||||
$form['terms'][$key]['operations']['#links']['edit']['title'] = $this->t('edit container');
|
||||
$form['terms'][$key]['operations']['#links']['edit']['url'] = Url::fromRoute('entity.taxonomy_term.forum_edit_container_form', $route_parameters);
|
||||
$title = $this->t('edit container');
|
||||
$url = Url::fromRoute('entity.taxonomy_term.forum_edit_container_form', ['taxonomy_term' => $term->id()]);
|
||||
}
|
||||
else {
|
||||
$form['terms'][$key]['operations']['#links']['edit']['title'] = $this->t('edit forum');
|
||||
$form['terms'][$key]['operations']['#links']['edit']['url'] = Url::fromRoute('entity.taxonomy_term.forum_edit_form', $route_parameters);
|
||||
$title = $this->t('edit forum');
|
||||
$url = Url::fromRoute('entity.taxonomy_term.forum_edit_form', ['taxonomy_term' => $term->id()]);
|
||||
}
|
||||
// We don't want the redirect from the link so we can redirect the
|
||||
// delete action.
|
||||
unset($form['terms'][$key]['operations']['#links']['edit']['query']['destination']);
|
||||
|
||||
// Re-create the operations column and add only the edit link.
|
||||
$form['terms'][$key]['operations'] = [
|
||||
'#type' => 'operations',
|
||||
'#links' => [
|
||||
'edit' => [
|
||||
'title' => $title,
|
||||
'url' => $url,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ use Drupal\Core\Form\FormStateInterface;
|
||||
|
||||
/**
|
||||
* Configure forum settings for this site.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class ForumSettingsForm extends ConfigFormBase {
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ dependencies:
|
||||
- forum
|
||||
- views
|
||||
|
||||
# Information added by Drupal.org packaging script on 2018-01-03
|
||||
version: '8.4.4'
|
||||
# Information added by Drupal.org packaging script on 2018-03-07
|
||||
version: '8.5.0'
|
||||
core: '8.x'
|
||||
project: 'drupal'
|
||||
datestamp: 1515021228
|
||||
datestamp: 1520457825
|
||||
|
||||
@@ -57,6 +57,8 @@ class ForumIndexTest extends BrowserTestBase {
|
||||
'parent[0]' => $tid,
|
||||
];
|
||||
$this->drupalPostForm('admin/structure/forum/add/forum', $edit, t('Save'));
|
||||
$this->assertSession()->linkExists(t('edit forum'));
|
||||
|
||||
$tid_child = $tid + 1;
|
||||
|
||||
// Verify that the node appears on the index.
|
||||
|
||||
Reference in New Issue
Block a user