Skip to content

Commit

Permalink
Merge pull request #24 from sunweaver/pr/autocompletion-config-option
Browse files Browse the repository at this point in the history
Support disabling autocompletion in search boxes via config option.
  • Loading branch information
master-caster committed Aug 23, 2018
2 parents 78841f2 + 43a3e01 commit 40228a0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions contrib/gosa.conf.5
Expand Up @@ -998,6 +998,15 @@ externaly. It gets called with the current entry "dn" and the attribute to be ID
should return an integer value.
.PP

.B useAutoComplete
.I bool
.PP
The
.I useAutoComplete
statement allows you to enable/disable the auto-completion mode when searching for LDAP
objects in a given container. Enable it, if you encounter long typing delays in GOsa²'s
search field.

.B passwordDefaultHash
.I string
.PP
Expand Down
10 changes: 10 additions & 0 deletions include/class_core.inc
Expand Up @@ -475,6 +475,16 @@ class core extends plugin {
"group" => "debug",
"mandatory" => FALSE),

array(
"name" => "useAutoComplete",
"type" => "bool",
"default" => "true",
"description" => _("use autocompletion in search boxes (performs preliminarily ldap searches)."),
"check" => "gosaProperty::isBool",
"migrate" => "",
"group" => "core",
"mandatory" => FALSE),

array(
"name" => "storeFilterSettings",
"type" => "bool",
Expand Down
4 changes: 3 additions & 1 deletion include/class_management.inc
Expand Up @@ -166,7 +166,9 @@ class management
if ($this->filter) {
$this->filter->update();
session::global_set(get_class($this)."_filter", $this->filter);
session::set('autocomplete', get_class($this)."_filter");
if ($this->config->get_cfg_value("core", "useAutoComplete") == "true") {
session::set('autocomplete', $this->filter);
}
}

// Handle actions (POSTs and GETs)
Expand Down

0 comments on commit 40228a0

Please sign in to comment.