2014-12-10 16:59:03 +01:00
|
|
|
<?php
|
2021-12-02 00:08:08 +01:00
|
|
|
script('core', 'install');
|
2014-12-10 16:59:03 +01:00
|
|
|
?>
|
2013-02-27 22:55:39 +01:00
|
|
|
<input type='hidden' id='hasMySQL' value='<?php p($_['hasMySQL']) ?>'>
|
|
|
|
<input type='hidden' id='hasSQLite' value='<?php p($_['hasSQLite']) ?>'>
|
|
|
|
<input type='hidden' id='hasPostgreSQL' value='<?php p($_['hasPostgreSQL']) ?>'>
|
|
|
|
<input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
|
2022-09-22 20:31:38 +02:00
|
|
|
<form action="index.php" method="post" class="guest-box install-form">
|
2015-03-19 09:10:58 +01:00
|
|
|
<input type="hidden" name="install" value="true">
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (count($_['errors']) > 0): ?>
|
2013-12-05 11:23:30 +01:00
|
|
|
<fieldset class="warning">
|
|
|
|
<legend><strong><?php p($l->t('Error'));?></strong></legend>
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php foreach ($_['errors'] as $err): ?>
|
2013-12-05 11:23:30 +01:00
|
|
|
<p>
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (is_array($err)):?>
|
2020-03-06 14:39:13 +01:00
|
|
|
<?php p($err['error']); ?>
|
|
|
|
<span class='hint'><?php p($err['hint']); ?></span>
|
2011-05-17 22:34:31 +02:00
|
|
|
<?php else: ?>
|
2020-03-06 14:39:13 +01:00
|
|
|
<?php p($err); ?>
|
2011-05-17 22:34:31 +02:00
|
|
|
<?php endif; ?>
|
2013-12-05 11:23:30 +01:00
|
|
|
</p>
|
2011-08-08 17:57:45 +02:00
|
|
|
<?php endforeach; ?>
|
2013-12-05 11:23:30 +01:00
|
|
|
</fieldset>
|
2011-08-08 17:57:45 +02:00
|
|
|
<?php endif; ?>
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (!$_['htaccessWorking']): ?>
|
2012-12-05 00:25:58 +01:00
|
|
|
<fieldset class="warning">
|
2015-04-09 11:27:24 +02:00
|
|
|
<legend><strong><?php p($l->t('Security warning'));?></strong></legend>
|
2013-02-27 22:55:39 +01:00
|
|
|
<p><?php p($l->t('Your data directory and files are probably accessible from the internet because the .htaccess file does not work.'));?><br>
|
2013-07-11 17:39:44 +02:00
|
|
|
<?php print_unescaped($l->t(
|
2017-10-19 12:16:04 +02:00
|
|
|
'For information how to properly configure your server, please see the <a href="%s" target="_blank" rel="noreferrer noopener">documentation</a>.',
|
2018-02-21 20:30:44 +01:00
|
|
|
[link_to_docs('admin-install')]
|
2013-07-11 17:39:44 +02:00
|
|
|
)); ?></p>
|
2012-10-15 23:25:10 +02:00
|
|
|
</fieldset>
|
|
|
|
<?php endif; ?>
|
2012-12-04 23:55:31 +01:00
|
|
|
<fieldset id="adminaccount">
|
2020-04-09 16:07:47 +02:00
|
|
|
<legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend>
|
2022-09-22 20:31:38 +02:00
|
|
|
<p>
|
|
|
|
<label for="adminlogin"><?php p($l->t('Username')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="text" name="adminlogin" id="adminlogin"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['adminlogin']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false" autofocus required>
|
2011-10-03 14:41:55 +02:00
|
|
|
</p>
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="groupbottom">
|
2022-09-22 20:31:38 +02:00
|
|
|
<label for="adminpass"><?php p($l->t('Password')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['adminpass']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false" required>
|
2022-07-18 17:58:05 +02:00
|
|
|
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
|
|
|
|
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
|
|
|
|
</button>
|
2011-10-03 14:41:55 +02:00
|
|
|
</p>
|
2011-08-08 21:40:39 +02:00
|
|
|
</fieldset>
|
2011-10-03 13:32:16 +02:00
|
|
|
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (!$_['directoryIsSet'] or !$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
2013-10-05 02:46:00 +02:00
|
|
|
<fieldset id="advancedHeader">
|
2022-05-12 17:08:54 +02:00
|
|
|
<legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t('Storage & database')); ?><img src="<?php print_unescaped(image_path('core', 'actions/caret.svg')); ?>" /></a></legend>
|
2013-10-05 02:46:00 +02:00
|
|
|
</fieldset>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (!$_['directoryIsSet'] or count($_['errors']) > 0): ?>
|
2011-10-03 13:32:16 +02:00
|
|
|
<fieldset id="datadirField">
|
|
|
|
<div id="datadirContent">
|
2020-04-09 16:07:47 +02:00
|
|
|
<label for="directory"><?php p($l->t('Data folder')); ?></label>
|
2013-02-14 23:19:12 +01:00
|
|
|
<input type="text" name="directory" id="directory"
|
2014-02-18 10:58:00 +01:00
|
|
|
placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
|
|
|
|
value="<?php p($_['directory']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false">
|
2011-10-03 13:32:16 +02:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
2013-09-30 02:16:32 +02:00
|
|
|
<?php endif; ?>
|
2011-10-03 13:32:16 +02:00
|
|
|
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
2014-03-05 10:22:35 +01:00
|
|
|
<fieldset id='databaseBackend'>
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if ($_['hasMySQL'] or $_['hasPostgreSQL'] or $_['hasOracle']) {
|
|
|
|
$hasOtherDB = true;
|
|
|
|
} else {
|
2020-10-05 15:12:57 +02:00
|
|
|
$hasOtherDB = false;
|
2020-04-10 14:19:56 +02:00
|
|
|
} //other than SQLite?>
|
2020-04-09 16:07:47 +02:00
|
|
|
<legend><?php p($l->t('Configure the database')); ?></legend>
|
2011-08-11 18:18:50 +02:00
|
|
|
<div id="selectDbType">
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php foreach ($_['databases'] as $type => $label): ?>
|
|
|
|
<?php if (count($_['databases']) === 1): ?>
|
2015-05-18 22:59:35 +02:00
|
|
|
<p class="info">
|
2020-04-09 16:07:47 +02:00
|
|
|
<?php p($l->t('Only %s is available.', [$label])); ?>
|
|
|
|
<?php p($l->t('Install and activate additional PHP modules to choose other database types.')); ?><br>
|
2017-10-19 12:16:04 +02:00
|
|
|
<a href="<?php print_unescaped(link_to_docs('admin-source_install')); ?>" target="_blank" rel="noreferrer noopener">
|
2020-04-09 16:07:47 +02:00
|
|
|
<?php p($l->t('For more details check out the documentation.')); ?> ↗</a>
|
2015-05-18 22:59:35 +02:00
|
|
|
</p>
|
2015-03-17 23:57:23 +01:00
|
|
|
<input type="hidden" id="dbtype" name="dbtype" value="<?php p($type) ?>">
|
2011-08-08 17:57:45 +02:00
|
|
|
<?php else: ?>
|
2014-01-31 17:31:19 +01:00
|
|
|
<input type="radio" name="dbtype" value="<?php p($type) ?>" id="<?php p($type) ?>"
|
2014-03-06 16:03:00 +01:00
|
|
|
<?php print_unescaped($_['dbtype'] === $type ? 'checked="checked" ' : '') ?>/>
|
2014-01-31 17:31:19 +01:00
|
|
|
<label class="<?php p($type) ?>" for="<?php p($type) ?>"><?php p($label) ?></label>
|
2013-07-24 18:02:36 +02:00
|
|
|
<?php endif; ?>
|
2014-01-31 17:31:19 +01:00
|
|
|
<?php endforeach; ?>
|
2011-08-11 18:18:50 +02:00
|
|
|
</div>
|
2014-03-05 10:22:35 +01:00
|
|
|
</fieldset>
|
2011-08-09 11:32:22 +02:00
|
|
|
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if ($hasOtherDB): ?>
|
2014-03-05 10:22:35 +01:00
|
|
|
<fieldset id='databaseField'>
|
2011-08-09 11:32:22 +02:00
|
|
|
<div id="use_other_db">
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="grouptop">
|
2022-09-22 20:31:38 +02:00
|
|
|
<label for="dbuser"><?php p($l->t('Database user')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="text" name="dbuser" id="dbuser"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['dbuser']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false">
|
2011-10-03 14:41:55 +02:00
|
|
|
</p>
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="groupmiddle">
|
2022-09-22 20:31:38 +02:00
|
|
|
<label for="dbpass"><?php p($l->t('Database password')); ?></label>
|
2022-07-18 17:58:05 +02:00
|
|
|
<input type="password" name="dbpass" id="dbpass"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['dbpass']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false">
|
2022-07-18 17:58:05 +02:00
|
|
|
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
|
|
|
|
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
|
|
|
|
</button>
|
2011-10-03 14:41:55 +02:00
|
|
|
</p>
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="groupmiddle">
|
2022-09-22 20:31:38 +02:00
|
|
|
<label for="dbname"><?php p($l->t('Database name')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="text" name="dbname" id="dbname"
|
2014-01-31 16:57:49 +01:00
|
|
|
value="<?php p($_['dbname']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false"
|
2015-03-17 23:57:23 +01:00
|
|
|
pattern="[0-9a-zA-Z$_-]+">
|
2011-10-03 14:41:55 +02:00
|
|
|
</p>
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if ($_['hasOracle']): ?>
|
2013-07-24 18:02:36 +02:00
|
|
|
<div id="use_oracle_db">
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="groupmiddle">
|
2020-04-09 16:07:47 +02:00
|
|
|
<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="text" name="dbtablespace" id="dbtablespace"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['dbtablespace']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false">
|
2013-07-24 18:02:36 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2014-05-06 12:14:11 +02:00
|
|
|
<p class="groupbottom">
|
2022-09-22 20:31:38 +02:00
|
|
|
<label for="dbhost"><?php p($l->t('Database host')); ?></label>
|
2014-05-06 12:14:11 +02:00
|
|
|
<input type="text" name="dbhost" id="dbhost"
|
2014-02-18 10:58:00 +01:00
|
|
|
value="<?php p($_['dbhost']); ?>"
|
2023-10-19 12:04:20 +02:00
|
|
|
autocomplete="off" autocapitalize="none" spellcheck="false">
|
2012-07-30 20:53:21 +02:00
|
|
|
</p>
|
2016-12-21 18:10:11 +01:00
|
|
|
<p class="info">
|
2020-04-09 16:07:47 +02:00
|
|
|
<?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?>
|
2016-12-21 18:10:11 +01:00
|
|
|
</p>
|
2012-07-30 20:53:21 +02:00
|
|
|
</div>
|
2014-03-05 10:22:35 +01:00
|
|
|
</fieldset>
|
2012-07-30 20:53:21 +02:00
|
|
|
<?php endif; ?>
|
2013-09-30 02:16:32 +02:00
|
|
|
<?php endif; ?>
|
2015-09-03 11:46:16 +02:00
|
|
|
|
2020-04-10 14:19:56 +02:00
|
|
|
<?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
2022-09-22 20:31:38 +02:00
|
|
|
<div id="sqliteInformation" class="notecard warning">
|
2015-04-09 11:27:24 +02:00
|
|
|
<legend><?php p($l->t('Performance warning'));?></legend>
|
2019-03-15 01:59:26 +01:00
|
|
|
<p><?php p($l->t('You chose SQLite as database.'));?></p>
|
|
|
|
<p><?php p($l->t('SQLite should only be used for minimal and development instances. For production we recommend a different database backend.'));?></p>
|
|
|
|
<p><?php p($l->t('If you use clients for file syncing, the use of SQLite is highly discouraged.')); ?></p>
|
2022-09-22 20:31:38 +02:00
|
|
|
</div>
|
2014-10-20 16:20:24 +02:00
|
|
|
<?php endif ?>
|
2014-06-02 22:56:50 +02:00
|
|
|
|
2016-11-22 15:58:00 +01:00
|
|
|
<div class="icon-loading-dark float-spinner"> </div>
|
|
|
|
|
2022-01-14 20:32:10 +01:00
|
|
|
<div class="buttons"><input type="submit" class="primary" value="<?php p($l->t('Install')); ?>" data-finishing="<?php p($l->t('Installing …')); ?>"></div>
|
2015-04-09 11:27:24 +02:00
|
|
|
|
|
|
|
<p class="info">
|
2016-06-23 13:39:28 +02:00
|
|
|
<span class="icon-info-white"></span>
|
2015-04-09 11:27:24 +02:00
|
|
|
<?php p($l->t('Need help?'));?>
|
2017-10-19 12:16:04 +02:00
|
|
|
<a target="_blank" rel="noreferrer noopener" href="<?php p(link_to_docs('admin-install')); ?>"><?php p($l->t('See the documentation'));?> ↗</a>
|
2015-04-09 11:27:24 +02:00
|
|
|
</p>
|
2011-08-08 17:57:45 +02:00
|
|
|
</form>
|