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

New plugin: Configure menu table links

This commit is contained in:
Jakub Vrana
2025-04-06 06:25:58 +02:00
parent cca943015f
commit 7ff1d82903
3 changed files with 82 additions and 2 deletions

View File

@@ -100,10 +100,10 @@ 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 $separator = ""): string {
$return = "";
foreach ($options as $key => $val) {
$return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>";
$return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>$separator";
}
return $return;
}