1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 07:36:44 +02:00

New plugin: Configure options by end-users and store them to a cookie

This commit is contained in:
Jakub Vrana
2025-04-06 06:24:55 +02:00
parent 48f82b3454
commit cca943015f
6 changed files with 81 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ function html_select(string $name, array $options, ?string $value = "", string $
/** Generate HTML radio list
* @param string[] $options
*/
function html_radios(string $name, array $options, string $value = ""): string {
function html_radios(string $name, array $options, ?string $value = ""): string {
$return = "";
foreach ($options as $key => $val) {
$return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>";