Skip to content

Commit

Permalink
[setup] wider forms on setup page
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Jan 3, 2024
1 parent c5c972f commit febaa81
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ext/setup/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function add_int_option(string $name, string $label = null, bool $table_r
{
$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";

$this->format_option($name, $html, $label, $table_row);
Expand All @@ -231,7 +231,7 @@ public function add_int_option(string $name, string $label = null, bool $table_r
public function add_shorthand_int_option(string $name, string $label = null, bool $table_row = false)
{
$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";

$this->format_option($name, $html, $label, $table_row);
Expand Down
6 changes: 6 additions & 0 deletions ext/setup/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@
margin: 0;
padding: 0;
}
.setupblock .form {
width: 100%;
}
.setupblock .form TH {
font-weight: normal;
}
6 changes: 3 additions & 3 deletions ext/wiki/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ public function onSetupBuilding(SetupBuildingEvent $event)
{
$sb = $event->panel->create_new_block("Wiki");
$sb->add_bool_option(WikiConfig::ENABLE_REVISIONS, "Enable wiki revisions: ");
$sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "Tag page template: ");
$sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "Empty list text: ");
$sb->add_bool_option(WikiConfig::TAG_SHORTWIKIS, "Show shortwiki entry when searching for a single tag: ");
$sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "<br/>Tag page template: ");
$sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "<br/>Empty list text: ");
$sb->add_bool_option(WikiConfig::TAG_SHORTWIKIS, "<br/>Show shortwiki entry when searching for a single tag: ");
}

public function onDatabaseUpgrade(DatabaseUpgradeEvent $event)
Expand Down

0 comments on commit febaa81

Please sign in to comment.