Commit 94555c18 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '414-option-fur-autocomplete-einfugen' into 'development'

Der Lang Parameter wird nun übernommen, wie er sollte.

Autocomplete Parameter hinzugefügt

Closes #414

See merge request !658
parents 8c511142 c4f3df4d
......@@ -28,7 +28,7 @@ class StartpageController extends Controller
$focusPages = [];
$theme = "default";
foreach ($request->all() as $key => $value) {
if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab' && $key !== 'param_maps') {
if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab' && $key !== 'param_maps' && $key !== 'param_autocomplete') {
$focusPages[] = str_replace('param_', '', $key);
}
if ($key === 'param_theme') {
......@@ -54,7 +54,8 @@ class StartpageController extends Controller
->with('browser', $browser)
->with('navbarFocus', 'suche')
->with('theme', $theme)
->with('maps', $maps);
->with('maps', $maps)
->with('autocomplete', $request->input('param_autocomplete', 'on'));
}
public function loadPage($subpage)
......
This diff is collapsed.
{
"css/themes/default.css": "css/themes/default-39c89a0e8d.css",
"js/all.js": "js/all-33a9cda328.js",
"js/all.js": "js/all-94969523ba.js",
"js/quicktips.js": "js/quicktips-4563c0221a.js"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -46,12 +46,25 @@ function setSettings() {
for (var i = 0; i < localStorage.length; i++) {
var key = localStorage.key(i);
var value = localStorage.getItem(key);
if (key.startsWith("param_") && !key.endsWith("lang")) {
if (key.startsWith("param_") && !key.endsWith("lang") && !key.endsWith('autocomplete')) {
key = key.substring(key.indexOf("param_") + 6);
$("#searchForm").append("<input type=\"hidden\" name=\"" + key + "\" value=\"" + value + "\">");
}
$("#foki input[type=radio]#angepasst").attr("checked", true);
}
if( localStorage.getItem("param_lang") !== null ) {
var value = localStorage.getItem("param_lang");
// Change the value of the lang input field to the given parameter
$("input[name=lang]").val(value);
}
if( localStorage.getItem("param_autocomplete") !== null ) {
var value = localStorage.getItem("param_autocomplete");
// Change the value of the lang input field to the given parameter
$("input[name=eingabe]").attr("autocomplete", value);
}
if ($("fieldset#foki.mobile").length) {
$("fieldset.mobile input#bilder").val("angepasst");
$("fieldset.mobile input#bilder").prop("checked", true);
......@@ -60,7 +73,6 @@ function setSettings() {
$("fieldset.mobile label#anpassen-label").attr("for", "angepasst");
$("fieldset.mobile label#anpassen-label span.glyphicon").attr("class", "glyphicon glyphicon-cog");
$("fieldset.mobile label#anpassen-label span.content").html("angepasst");
console.log("test");
}
}
//Polyfill for form attribute
......
......@@ -34,6 +34,10 @@ return [
'request' => 'Abfragemethode',
'autocomplete' => 'Auto-Vervollständigung (Sucheingabe)',
'autocomplete.on' => 'ein',
'autocomplete.off' => 'aus',
"foki.web" => "Web",
"foki.andere" => "Andere",
"foki.produktsuche" => "Produktsuche",
......
......@@ -181,7 +181,7 @@
</span>
</button>
</div>
<input type="text" name="eingabe" required="" autofocus="" class="form-control" placeholder="{{ trans('index.placeholder') }}">
<input type="text" name="eingabe" required="" autofocus="" autocomplete="{{$autocomplete}}" class="form-control" placeholder="{{ trans('index.placeholder') }}">
<input type="hidden" name="encoding" value="utf8">
@if ($focus === 'angepasst') <input type="hidden" name="lang" value={{ $lang }} >
<input type="hidden" name="resultCount" value={{ $resultCount }} >
......
......@@ -47,6 +47,13 @@
<option value="POST">POST</option>
</select>
</div>
<div class="col-sm-6 col-md-4 col-lg-3">
<label class="select-label">@lang('settings.autocomplete'):</label>
<select class="form-control settings-form-control" name="param_autocomplete">
<option value="on" selected>@lang('settings.autocomplete.on')</option>
<option value="off">@lang('settings.autocomplete.off')</option>
</select>
</div>
</div>
</container>
......
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