diff --git a/core/imageboard/autocomplete_column.php b/core/imageboard/autocomplete_column.php new file mode 100644 index 000000000..50ce8fcad --- /dev/null +++ b/core/imageboard/autocomplete_column.php @@ -0,0 +1,34 @@ + "text", + "name" => "r_{$this->name}", + "class" => "autocomplete_tags", + "placeholder" => $this->title, + "value" => @$inputs["r_{$this->name}"] + ]); + } + + public function create_input(array $inputs) + { + return INPUT([ + "type" => "text", + "name" => "c_{$this->name}", + "class" => "autocomplete_tags", + "placeholder" => $this->title, + "value" => @$inputs["c_{$this->name}"] + ]); + } +} diff --git a/ext/alias_editor/main.php b/ext/alias_editor/main.php index 25632f229..c4c978425 100644 --- a/ext/alias_editor/main.php +++ b/ext/alias_editor/main.php @@ -19,8 +19,8 @@ public function __construct(\FFSPHP\PDO $db) $this->size = 100; $this->limit = 1000000; $this->set_columns([ - new TextColumn("oldtag", "Old Tag"), - new TextColumn("newtag", "New Tag"), + new AutoCompleteColumn("oldtag", "Old Tag"), + new AutoCompleteColumn("newtag", "New Tag"), new ActionColumn("oldtag"), ]); $this->order_by = ["oldtag"]; diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index a20084575..c9a4b707f 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -21,8 +21,8 @@ public function __construct(\FFSPHP\PDO $db) $this->size = 100; $this->limit = 1000000; $this->set_columns([ - new TextColumn("tag", "Tag"), - new TextColumn("additional_tags", "Additional Tags"), + new AutoCompleteColumn("tag", "Tag"), + new AutoCompleteColumn("additional_tags", "Additional Tags"), new ActionColumn("tag"), ]); $this->order_by = ["tag"];