[setup] wider forms on setup page

This commit is contained in:
Shish 2024-01-03 15:51:22 +00:00
parent c5c972fe94
commit febaa815f7
3 changed files with 11 additions and 5 deletions

View file

@ -222,7 +222,7 @@ class SetupBlock extends Block
{ {
$val = $this->config->get_int($name); $val = $this->config->get_int($name);
$html = "<input type='number' id='$name' name='_config_$name' value='$val' size='4' style='text-align: center;' step='1' />\n"; $html = "<input type='number' id='$name' name='_config_$name' value='$val' size='4' step='1' />\n";
$html .= "<input type='hidden' name='_type_$name' value='int' />\n"; $html .= "<input type='hidden' name='_type_$name' value='int' />\n";
$this->format_option($name, $html, $label, $table_row); $this->format_option($name, $html, $label, $table_row);
@ -231,7 +231,7 @@ class SetupBlock extends Block
public function add_shorthand_int_option(string $name, string $label = null, bool $table_row = false) public function add_shorthand_int_option(string $name, string $label = null, bool $table_row = false)
{ {
$val = to_shorthand_int($this->config->get_int($name)); $val = to_shorthand_int($this->config->get_int($name));
$html = "<input type='text' id='$name' name='_config_$name' value='$val' size='6' style='text-align: center;'>\n"; $html = "<input type='text' id='$name' name='_config_$name' value='$val' size='6'>\n";
$html .= "<input type='hidden' name='_type_$name' value='int'>\n"; $html .= "<input type='hidden' name='_type_$name' value='int'>\n";
$this->format_option($name, $html, $label, $table_row); $this->format_option($name, $html, $label, $table_row);

View file

@ -24,3 +24,9 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.setupblock .form {
width: 100%;
}
.setupblock .form TH {
font-weight: normal;
}

View file

@ -135,9 +135,9 @@ class Wiki extends Extension
{ {
$sb = $event->panel->create_new_block("Wiki"); $sb = $event->panel->create_new_block("Wiki");
$sb->add_bool_option(WikiConfig::ENABLE_REVISIONS, "Enable wiki revisions: "); $sb->add_bool_option(WikiConfig::ENABLE_REVISIONS, "Enable wiki revisions: ");
$sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "Tag page template: "); $sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "<br/>Tag page template: ");
$sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "Empty list text: "); $sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "<br/>Empty list text: ");
$sb->add_bool_option(WikiConfig::TAG_SHORTWIKIS, "Show shortwiki entry when searching for a single tag: "); $sb->add_bool_option(WikiConfig::TAG_SHORTWIKIS, "<br/>Show shortwiki entry when searching for a single tag: ");
} }
public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) public function onDatabaseUpgrade(DatabaseUpgradeEvent $event)