From 0dc3a9940e473f5b1dc0ad460d6aa6d71e9d7e15 Mon Sep 17 00:00:00 2001 From: ab Date: Thu, 13 Sep 2018 07:58:29 +0300 Subject: [PATCH] input attribute fix --- js/simplesearch.js | 2 +- templates/partials/simplesearch_searchbox.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/simplesearch.js b/js/simplesearch.js index 8664009..ce0f7a8 100644 --- a/js/simplesearch.js +++ b/js/simplesearch.js @@ -10,7 +10,7 @@ var fields = document.querySelectorAll('input[name="searchfield"][data-search-input]'); Array.prototype.forEach.call(fields, function(field) { var form = findAncestor(field, 'form[data-simplesearch-form]'), - min = field.getAttribute('min') || false, + min = field.getAttribute('data-min') || false, location = field.getAttribute('data-search-input'), separator = field.getAttribute('data-search-separator'); diff --git a/templates/partials/simplesearch_searchbox.html.twig b/templates/partials/simplesearch_searchbox.html.twig index c0fbd39..66693a5 100644 --- a/templates/partials/simplesearch_searchbox.html.twig +++ b/templates/partials/simplesearch_searchbox.html.twig @@ -5,7 +5,7 @@ name="searchfield" class="search-input" type="text" - {% if min_chars > 0 %} min="{{- min_chars -}}" {% endif %} + {% if min_chars > 0 %} data-min="{{- min_chars -}}" {% endif %} required placeholder="{{"PLUGIN_SIMPLESEARCH.SEARCH_PLACEHOLDER"|t}}" value="{{ query|e }}"