Skip to content

Commit

Permalink
[autocomplete] rely on autocomplete-script to disable browser built-i…
Browse files Browse the repository at this point in the history
…n where appropriate
  • Loading branch information
shish committed Dec 26, 2023
1 parent d04ec42 commit 7617daa
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ext/home/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function build_body(string $sitename, string $main_links, string $main_te
$search_html = "
<div class='space' id='search'>
<form action='".search_link()."' method='GET'>
<input name='search' size='30' type='search' value='' class='autocomplete_tags' autofocus='autofocus' autocomplete='off' />
<input name='search' size='30' type='search' value='' class='autocomplete_tags' autofocus='autofocus' />
<input type='hidden' name='q' value='/post/list'>
<input type='submit' value='Search'/>
</form>
Expand Down
2 changes: 1 addition & 1 deletion ext/index/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function build_navigation(int $page_number, int $total_pages, array $s
$h_search_link = search_link();
$h_search = "
<p><form action='$h_search_link' method='GET'>
<input type='search' name='search' value='$h_search_string' placeholder='Search' class='autocomplete_tags' autocomplete='off' />
<input type='search' name='search' value='$h_search_string' placeholder='Search' class='autocomplete_tags' />
<input type='hidden' name='q' value='/post/list'>
<input type='submit' value='Find' style='display: none;' />
</form>
Expand Down
2 changes: 1 addition & 1 deletion ext/random_list/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function build_navigation(array $search_terms): string
$h_search_link = make_link("random");
$h_search = "
<p><form action='$h_search_link' method='GET'>
<input type='search' name='search' value='$h_search_string' placeholder='Search random list' class='autocomplete_tags' autocomplete='off' />
<input type='search' name='search' value='$h_search_string' placeholder='Search random list' class='autocomplete_tags' />
<input type='hidden' name='q' value='/random'>
<input type='submit' value='Find' style='display: none;' />
</form>
Expand Down
4 changes: 2 additions & 2 deletions ext/tag_edit/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function display_mass_editor()
$html = "
" . make_form(make_link("tag_edit/replace")) . "
<table class='form'>
<tr><th>Search</th><td><input type='text' name='search' class='autocomplete_tags' autocomplete='off'></tr>
<tr><th>Replace</th><td><input type='text' name='replace' class='autocomplete_tags' autocomplete='off'></td></tr>
<tr><th>Search</th><td><input type='text' name='search' class='autocomplete_tags'></tr>
<tr><th>Replace</th><td><input type='text' name='replace' class='autocomplete_tags'></td></tr>
<tr><td colspan='2'><input type='submit' value='Replace'></td></tr>
</table>
</form>
Expand Down
4 changes: 2 additions & 2 deletions ext/upload/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected function h_upload_list_1(): HTMLElement
TR(
TD(["colspan" => $tl_enabled ? 2 : 4], DIV(["name" => "canceldata{$i}[]","style" => "display:inline;margin-right:5px;font-size:15px;visibility:hidden;","onclick" => "$(\"input[name='data{$i}[]']\")[0].value='';updateTracker();"], ""), INPUT(["type" => "file", "name" => "data{$i}[]", "accept" => $accept, "multiple" => true])),
$tl_enabled ? TD(["colspan" => "2"], INPUT(["type" => "text", "name" => "url{$i}"])) : emptyHTML(),
TD(["colspan" => "2"], INPUT(["type" => "text", "name" => "tags{$i}", "class" => "autocomplete_tags", "autocomplete" => "off"])),
TD(["colspan" => "2"], INPUT(["type" => "text", "name" => "tags{$i}", "class" => "autocomplete_tags"])),
)
);
}
Expand Down Expand Up @@ -328,7 +328,7 @@ protected function build_upload_block(): HTMLElement
$form->appendChild(
emptyHTML(
INPUT(["id" => "data[]", "name" => "data[]", "size" => "16", "type" => "file", "accept" => $accept, "multiple" => true]),
INPUT(["name" => "tags", "type" => "text", "placeholder" => "tagme", "class" => "autocomplete_tags", "required" => true, "autocomplete" => "off"]),
INPUT(["name" => "tags", "type" => "text", "placeholder" => "tagme", "class" => "autocomplete_tags", "required" => true]),
INPUT(["type" => "submit", "value" => "Post"]),
)
);
Expand Down
2 changes: 1 addition & 1 deletion ext/view/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function build_navigation(Image $image): string
$h_search = "
<p><form action='".make_link()."' method='GET'>
<input type='hidden' name='q' value='/post/list'>
<input type='search' name='search' placeholder='Search' class='autocomplete_tags' autocomplete='off'>
<input type='search' name='search' placeholder='Search' class='autocomplete_tags'>
<input type='submit' value='Find' style='display: none;'>
</form>
";
Expand Down

0 comments on commit 7617daa

Please sign in to comment.