Skip to content

Commit

Permalink
feat: improve settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 28, 2024
1 parent d8d636d commit e232a33
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -5432,20 +5432,21 @@ public function getModuleConfigInputfields($inputfields)
// prepare fileconfig string
$fileConfig = $this->wire->config->rockmigrations;
if (is_array($fileConfig)) {
$fileConfig = "<p>Current config from file:</p><pre>" . print_r($fileConfig, true) . "</pre>";
$fileConfig = "<pre>" . print_r($fileConfig, true) . "</pre>";
} else $fileConfig = "";

$inputfields->add([
'type' => 'markup',
'label' => 'RockMigrations Config Options',
'value' => 'You can set all settings either here via GUI or alternatively via config array:<br>
'value' => $fileConfig ?:
'You can set all settings either here via GUI or alternatively via config array:<br>
<pre>$config->rockmigrations = [<br>'
. ' "syncSnippets" => true,<br>'
. '];</pre>'
. 'Note that settings in config.php have precedence over GUI settings!'
. $fileConfig,
. 'Note that settings in config.php have precedence over GUI settings!',
'icon' => 'cogs',
'collapsed' => $fileConfig ? 0 : 1,
'notes' => $fileConfig ? "Current config from config[-local].php" : "",
]);

$inputfields->add([
Expand Down

0 comments on commit e232a33

Please sign in to comment.