[Forum] enabling independant config allow_forum_category_language_filter instead of translate_html that was used incorrectly and mixed for 2 different use -Refs BT#18708

pull/3859/head
NicoDucou 4 years ago
parent 728eddec93
commit c420126803
  1. 2
      main/forum/index.php
  2. 4
      main/install/configuration.dist.php
  3. 2
      main/template/default/forum/global_list.tpl
  4. 2
      main/template/default/forum/list.tpl

@ -217,7 +217,7 @@ if ($value && isset($value['value']) && !empty($value['value'])) {
// Create a search-box
$searchFilter = '';
$translate = api_get_configuration_value('translate_html');
$translate = api_get_configuration_value('allow_forum_category_language_filter');
if ($translate) {
$form = new FormValidator('search_simple', 'get', api_get_self().'?'.api_get_cidreq(), null, null, 'inline');
$form->addHidden('cidReq', api_get_course_id());

@ -1246,6 +1246,10 @@ $_configuration['required_extra_fields_in_profile'] = [
// Requires new forum_category and forum_post "language" extra fields (multiple select)
//$_configuration['allow_forum_post_revisions'] = false;
// Allow forum category filter on language
// Requires new forum_category "language" extra fields (multiple select)
//$_configuration['allow_forum_category_language_filter'] = false;
// Allow to show users in a map, users need to have a coordinates extra field BT#15176
//$_configuration['allow_social_map_fields'] = ['fields' => ['terms_villedustage', 'terms_ville']];

@ -2,7 +2,7 @@
{% block content %}
{% if 'translate_html'|api_get_configuration_value %}
{% if 'allow_forum_category_language_filter'|api_get_configuration_value %}
<script>
$(document).ready(function () {
// default

@ -2,7 +2,7 @@
{% extends 'layout/layout_1_col.tpl'|get_template %}
{% block content %}
{% if 'translate_html'|api_get_configuration_value %}
{% if 'allow_forum_category_language_filter'|api_get_configuration_value %}
<script>
$(function () {
// default

Loading…
Cancel
Save