-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring auto-complete functionality for alias editor and auto tagger
- Loading branch information
myname
committed
Nov 17, 2023
1 parent
6664c2e
commit 46fce1e
Showing
5 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Shimmie2; | ||
|
||
use MicroCRUD\TextColumn; | ||
use function MicroHTML\INPUT; | ||
|
||
class AutoCompleteColumn extends TextColumn | ||
{ | ||
public function read_input(array $inputs) | ||
{ | ||
return INPUT([ | ||
"type" => "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}"] | ||
]); | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters