--- /dev/null
+<?php
+if (!defined('CIVI_SETUP')) {
+ exit("Installation plugins must only be loaded by the installer.\n");
+}
+
+\Civi\Setup::dispatcher()
+ ->addListener('civi.setupui.boot', function (\Civi\Setup\UI\Event\UIBootEvent $e) {
+ \Civi\Setup::log()->info(sprintf('[%s] Register blocks', basename(__FILE__)));
+
+ /**
+ * @var \Civi\Setup\UI\SetupController $ctrl
+ */
+ $ctrl = $e->getCtrl();
+
+ $ctrl->blocks['admin'] = [
+ 'is_active' => ($e->getModel()->cms === 'Standalone'),
+ 'file' => __DIR__ . DIRECTORY_SEPARATOR . 'admin.tpl.php',
+ 'class' => 'if-no-errors',
+ 'weight' => 35,
+ ];
+
+ if ($ctrl->blocks['admin']['is_active'] && $e->getMethod() === 'POST') {
+ if ($e->getField('adminUser')) {
+ $e->getModel()->extras['adminUser'] = $e->getField('adminUser');
+ }
+ if ($e->getField('adminPass')) {
+ $e->getModel()->extras['adminPassWasSpecified'] = TRUE;
+ $e->getModel()->extras['adminPass'] = $e->getField('adminPass');
+ }
+ }
+
+ }, \Civi\Setup::PRIORITY_PREPARE);
--- /dev/null
+<?php if (!defined('CIVI_SETUP')): exit("Installation plugins must only be loaded by the installer.\n");
+endif; ?>
+
+<h2><?php echo ts('Administrator'); ?></h2>
+
+<p style="margin-left: 2em">
+ <label for="adminUser"><span><?php echo ts('Administrative User:'); ?></span></label>
+ <input type="text" id="adminUser" name="civisetup[adminUser]" value="<?php echo htmlentities($model->extras['adminUser'] ?? '') ?>">
+</p>
+
+<p style="margin-left: 2em">
+ <label for="adminPass"><span><?php echo ts('Administrative Password:'); ?></span></label>
+ <input type="password" id="adminPass" name="civisetup[adminPass]" value="<?php echo htmlentities($model->extras['adminPass'] ?? '') ?>">
+</p>