mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Add additional types to gui generator.
This commit is contained in:
parent
52569bbab2
commit
2eacd31577
1 changed files with 8 additions and 0 deletions
|
@ -33,11 +33,19 @@ register_module([
|
|||
$label = "<label for='setting-$configKey'>$configKey</label>";
|
||||
switch($configData->type)
|
||||
{
|
||||
case "url":
|
||||
case "number":
|
||||
case "text":
|
||||
$inputControl = "<input type='$configData->type' id='$configKey' value='$settings->$configKey' />";
|
||||
break;
|
||||
case "textarea":
|
||||
$inputControl = "<textarea id='$configKey'>$settings->$configKey</textarea>";
|
||||
case "checkbox":
|
||||
$reverse = true;
|
||||
$inputControl = "<input type='checkbox' id='$configKey' " . ($settings->$configKey ? " checked" : "") . " />";
|
||||
default:
|
||||
$label = "";
|
||||
$inputControl = "<p><em>Sorry! The <code>$configKey</code> setting isn't editable yet through the gui. Please try editing <code>peppermint.json</code> for the time being.</p>";
|
||||
}
|
||||
|
||||
$content .= !$reverse ? "$inputControl\n$label\n" : "$label\n$inputControl\n";
|
||||
|
|
Loading…
Reference in a new issue