diff options
Diffstat (limited to 'apps/settings/templates')
18 files changed, 396 insertions, 1228 deletions
diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index 746338da3fc..17356e6ccdf 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -1,40 +1,93 @@ <?php -\OC_Util::addStyle('settings', 'help'); +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +\OCP\Util::addStyle('settings', 'help'); ?> -<div id="app-navigation"> - <ul> - <li> - <a class="icon-user <?php if ($_['mode'] === 'user') { - p('active'); -} ?>" - href="<?php print_unescaped($_['urlUserDocs']); ?>"> - <?php p($l->t('User documentation')); ?> - </a> - </li> - <?php if ($_['admin']) { ?> - <li> - <a class="icon-user-admin <?php if ($_['mode'] === 'admin') { - p('active'); -} ?>" - href="<?php print_unescaped($_['urlAdminDocs']); ?>"> - <?php p($l->t('Administrator documentation')); ?> - </a> - </li> - <?php } ?> +<?php if ($_['knowledgebaseEmbedded'] === true) : ?> + <div id="app-navigation" role="navigation" tabindex="0"> + <ul> + <li> + <a class="help-list__link icon-user <?php if ($_['mode'] === 'user') { + p('active'); + } ?>" <?php if ($_['mode'] === 'user') { + print_unescaped('aria-current="page"'); + } ?> + href="<?php print_unescaped($_['urlUserDocs']); ?>"> + <span class="help-list__text"> + <?php p($l->t('Account documentation')); ?> + </span> + </a> + </li> + <?php if ($_['admin']) { ?> + <li> + <a class="help-list__link icon-user-admin <?php if ($_['mode'] === 'admin') { + p('active'); + } ?>" <?php if ($_['mode'] === 'admin') { + print_unescaped('aria-current="page"'); + } ?> + href="<?php print_unescaped($_['urlAdminDocs']); ?>"> + <span class="help-list__text"> + <?php p($l->t('Administration documentation')); ?> + </span> + </a> + </li> + <?php } ?> - <li> - <a href="https://docs.nextcloud.com" class="icon-category-office" target="_blank" rel="noreferrer noopener"> - <?php p($l->t('Documentation')); ?> ↗ - </a> - </li> - <li> - <a href="https://help.nextcloud.com" class="icon-comment" target="_blank" rel="noreferrer noopener"> - <?php p($l->t('Forum')); ?> ↗ - </a> - </li> -</div> + <li> + <a href="https://docs.nextcloud.com" class="help-list__link icon-category-office" target="_blank" rel="noreferrer noopener"> + <span class="help-list__text"> + <?php p($l->t('Documentation')); ?> ↗ + </span> + </a> + </li> + <li> + <a href="https://help.nextcloud.com" class="help-list__link icon-comment" target="_blank" rel="noreferrer noopener"> + <span class="help-list__text"> + <?php p($l->t('Forum')); ?> ↗ + </span> + </a> + </li> + </div> -<div id="app-content" class="help-includes"> - <iframe src="<?php print_unescaped($_['url']); ?>" class="help-iframe"> - </iframe> -</div> + <div id="app-content" class="help-includes"> + <iframe src="<?php print_unescaped($_['url']); ?>" class="help-iframe" tabindex="0"> + </iframe> + </div> +<?php else: ?> + <div id="app-content"> + <div class="help-wrapper"> + <div class="help-content"> + <h2 class="help-content__heading"> + <?php p($l->t('Nextcloud help & privacy resources')); ?> + </h2> + <div class="help-content__body"> + <a class="button" target="_blank" rel="noreferrer noopener" + href="<?php print_unescaped($_['urlUserDocs']); ?>"> + <?php p($l->t('Account documentation')); ?> ↗ + </a> + <a class="button" target="_blank" rel="noreferrer noopener" + href="<?php print_unescaped($_['urlAdminDocs']); ?>"> + <?php p($l->t('Administration documentation')); ?> ↗ + </a> + <a href="https://docs.nextcloud.com" class="button" target="_blank" rel="noreferrer noopener"> + <?php p($l->t('General documentation')); ?> ↗ + </a> + <a href="https://help.nextcloud.com" class="button" target="_blank" rel="noreferrer noopener"> + <?php p($l->t('Forum')); ?> ↗ + </a> + <?php if ($_['legalNoticeUrl']) { ?> + <a href="<?php print_unescaped($_['legalNoticeUrl']); ?>" class="button" target="_blank" rel="noreferrer noopener"> + <?php p($l->t('Legal notice')); ?> ↗ + </a> + <?php } ?> + <?php if ($_['privacyUrl']) { ?> + <a href="<?php print_unescaped($_['privacyUrl']); ?>" class="button" target="_blank" rel="noreferrer noopener"> + <?php p($l->t('Privacy policy')); ?> ↗ + </a> + <?php } ?> + </div> + </div> + </div> +<?php endif; ?> diff --git a/apps/settings/templates/settings-vue.php b/apps/settings/templates/settings-vue.php deleted file mode 100644 index 8db9dc6286b..00000000000 --- a/apps/settings/templates/settings-vue.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com> - * - * @author John Molakvoæ <skjnldsv@protonmail.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ - -script('settings', 'vue-settings-apps-users-management'); -style('settings', 'settings'); - -// Do we have some data to inject ? -if (is_array($_['serverData'])) { - ?> -<span id="serverData" data-server="<?php p(json_encode($_['serverData'])); ?>"></span> -<?php -} ?> diff --git a/apps/settings/templates/settings/additional.php b/apps/settings/templates/settings/additional.php index ac6b91e8d76..9e0b61ef65a 100644 --- a/apps/settings/templates/settings/additional.php +++ b/apps/settings/templates/settings/additional.php @@ -1,24 +1,7 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ /** @var \OCP\IL10N $l */ @@ -30,4 +13,4 @@ if (isset($form['form'])) {?> <div id="<?php isset($form['anchor']) ? p($form['anchor']) : p('');?>"><?php print_unescaped($form['form']);?></div> <?php } -} ?> + } ?> diff --git a/apps/settings/templates/settings/admin/additional-mail.php b/apps/settings/templates/settings/admin/additional-mail.php index e8362da4581..6d6c036e813 100644 --- a/apps/settings/templates/settings/admin/additional-mail.php +++ b/apps/settings/templates/settings/admin/additional-mail.php @@ -1,40 +1,19 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ /** @var \OCP\IL10N $l */ /** @var array $_ */ $mail_smtpauthtype = [ - '' => $l->t('None'), - 'LOGIN' => $l->t('Login'), - 'PLAIN' => $l->t('Plain'), - 'NTLM' => $l->t('NT LAN Manager'), + 'LOGIN' => $l->t('Login') ]; $mail_smtpsecure = [ - '' => $l->t('None'), - 'ssl' => $l->t('SSL/TLS'), - 'tls' => $l->t('STARTTLS'), + '' => $l->t('None/STARTTLS'), + 'ssl' => $l->t('SSL') ]; $mail_smtpmode = [ @@ -49,18 +28,29 @@ if ($_['mail_smtpmode'] === 'qmail') { $mail_sendmailmode = [ 'smtp' => 'smtp (-bs)', - 'pipe' => 'pipe (-t)' + 'pipe' => 'pipe (-t -i)' ]; ?> <div class="section" id="mail_general_settings"> +<?php if ($_['mail_smtpmode'] === 'null') { ?> + <h2><?php p($l->t('Email server'));?></h2> + + <p> + <?php p($l->t('Mail delivery is disabled by instance config "%s".', ['mail_smtpmode'])); ?> + </p> +<?php } else { ?> <form id="mail_general_settings_form" class="mail_settings"> <h2><?php p($l->t('Email server'));?></h2> - <a target="_blank" rel="noreferrer noopener" class="icon-info" - title="<?php p($l->t('Open documentation'));?>" - href="<?php p(link_to_docs('admin-email')); ?>"></a> - <p class="settings-hint"><?php p($l->t('It is important to set up this server to be able to send emails, like for password reset and notifications.')); ?></p> + <a target="_blank" + rel="noreferrer noopener" class="icon-info" + title="<?php p($l->t('Open documentation'));?>" + href="<?php p(link_to_docs('admin-email')); ?>" + aria-label="<?php p($l->t('Open documentation'));?>"></a> + <p class="settings-hint"> + <?php p($l->t('It is important to set up this server to be able to send emails, like for password reset and notifications.')); ?> + </p> <p><span id="mail_settings_msg" class="msg"></span></p> <p> @@ -74,17 +64,19 @@ $mail_sendmailmode = [ <option value="<?php p($smtpmode[0])?>" <?php p($selected) ?>><?php p($smtpmode[1]) ?></option> <?php endforeach;?> </select> + </p> + <p> <label id="mail_smtpsecure_label" for="mail_smtpsecure" <?php if ($_['mail_smtpmode'] !== 'smtp') { - print_unescaped(' class="hidden"'); - } ?>> + print_unescaped(' class="hidden"'); + } ?>> <?php p($l->t('Encryption')); ?> </label> <select name="mail_smtpsecure" id="mail_smtpsecure" <?php if ($_['mail_smtpmode'] !== 'smtp') { - print_unescaped(' class="hidden"'); - } ?>> + print_unescaped(' class="hidden"'); + } ?>> <?php foreach ($mail_smtpsecure as $secure => $name): $selected = ''; if ($secure == $_['mail_smtpsecure']): @@ -93,11 +85,13 @@ $mail_sendmailmode = [ <option value="<?php p($secure)?>" <?php p($selected) ?>><?php p($name) ?></option> <?php endforeach;?> </select> + </p> - <label id="mail_sendmailmode_label" for="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> + <p class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> + <label id="mail_sendmailmode_label" for="mail_sendmailmode"> <?php p($l->t('Sendmail mode')); ?> </label> - <select name="mail_sendmailmode" id="mail_sendmailmode" class="<?= $_['mail_smtpmode'] !== 'sendmail' ? 'hidden' : '' ?>"> + <select name="mail_sendmailmode" id="mail_sendmailmode"> <?php foreach ($mail_sendmailmode as $sendmailmodeValue => $sendmailmodeLabel): ?> <option value="<?php p($sendmailmodeValue)?>" <?= $sendmailmodeValue === $_['mail_sendmailmode'] ? 'selected="selected"' : '' ?>><?php p($sendmailmodeLabel) ?></option> <?php endforeach;?> @@ -106,50 +100,45 @@ $mail_sendmailmode = [ <p> <label for="mail_from_address"><?php p($l->t('From address')); ?></label> - <input type="text" name="mail_from_address" id="mail_from_address" placeholder="<?php p($l->t('mail'))?>" - value="<?php p($_['mail_from_address']) ?>" />@ + <input type="text" name="mail_from_address" id="mail_from_address" placeholder="<?php p($l->t('Email'))?>" + value="<?php p($_['mail_from_address']) ?>" />@ <input type="text" name="mail_domain" id="mail_domain" placeholder="example.com" - value="<?php p($_['mail_domain']) ?>" /> + value="<?php p($_['mail_domain']) ?>" /> </p> - <p id="setting_smtpauth" <?php if ($_['mail_smtpmode'] !== 'smtp') { - print_unescaped(' class="hidden"'); - } ?>> - <label for="mail_smtpauthtype"><?php p($l->t('Authentication method')); ?></label> - <select name="mail_smtpauthtype" id="mail_smtpauthtype"> - <?php foreach ($mail_smtpauthtype as $authtype => $name): - $selected = ''; - if ($authtype == $_['mail_smtpauthtype']): - $selected = 'selected="selected"'; - endif; ?> - <option value="<?php p($authtype)?>" <?php p($selected) ?>><?php p($name) ?></option> - <?php endforeach;?> + <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') { + print_unescaped(' class="hidden"'); + } ?>> + <label for="mail_smtphost"><?php p($l->t('Server address')); ?></label> + <input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com" + value="<?php p($_['mail_smtphost']) ?>" /> + : + <input type="text" inputmode="numeric" name="mail_smtpport" id="mail_smtpport" placeholder="<?php p($l->t('Port'))?>" + value="<?php p($_['mail_smtpport']) ?>" /> + </p> + <p id='setting_smtpauth' <?php if ($_['mail_smtpmode'] !== 'smtp') { + print_unescaped(' class="hidden"'); + } ?>> + <label for='mail_smtpauthtype'><?php p($l->t('Authentication')); ?></label> + <select name="mail_smtpauthtype" id="mail_smtpauthtype" class="hidden"> + <?php foreach ($mail_smtpauthtype as $authtype => $name): ?> + <option value="<?php p($authtype) ?>"><?php p($name) ?></option> + <?php endforeach; ?> </select> <input type="checkbox" name="mail_smtpauth" id="mail_smtpauth" class="checkbox" value="1" <?php if ($_['mail_smtpauth']) { - print_unescaped('checked="checked"'); - } ?> /> + print_unescaped('checked="checked"'); + } ?> /> <label for="mail_smtpauth"><?php p($l->t('Authentication required')); ?></label> </p> - - <p id="setting_smtphost" <?php if ($_['mail_smtpmode'] !== 'smtp') { - print_unescaped(' class="hidden"'); - } ?>> - <label for="mail_smtphost"><?php p($l->t('Server address')); ?></label> - <input type="text" name="mail_smtphost" id="mail_smtphost" placeholder="smtp.example.com" - value="<?php p($_['mail_smtphost']) ?>" /> - : - <input type="text" name="mail_smtpport" id="mail_smtpport" placeholder="<?php p($l->t('Port'))?>" - value="<?php p($_['mail_smtpport']) ?>" /> - </p> </form> <form class="mail_settings" id="mail_credentials_settings"> <p id="mail_credentials" <?php if (!$_['mail_smtpauth'] || $_['mail_smtpmode'] !== 'smtp') { - print_unescaped(' class="hidden"'); - } ?>> + print_unescaped(' class="hidden"'); + } ?>> <label for="mail_smtpname"><?php p($l->t('Credentials')); ?></label> - <input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Username'))?>" + <input type="text" name="mail_smtpname" id="mail_smtpname" placeholder="<?php p($l->t('SMTP Login'))?>" value="<?php p($_['mail_smtpname']) ?>" /> <input type="text" name="mail_smtppassword" id="mail_smtppassword" autocomplete="off" placeholder="<?php p($l->t('SMTP Password'))?>" value="<?php p($_['mail_smtppassword']) ?>" /> @@ -158,7 +147,8 @@ $mail_sendmailmode = [ </form> <br /> - <em><?php p($l->t('Test email settings')); ?></em> + <em><?php p($l->t('Test and verify email settings')); ?></em> <input type="submit" name="sendtestemail" id="sendtestemail" value="<?php p($l->t('Send email')); ?>"/> <span id="sendtestmail_msg" class="msg"></span> +<?php } ?> </div> diff --git a/apps/settings/templates/settings/admin/ai.php b/apps/settings/templates/settings/admin/ai.php new file mode 100644 index 00000000000..3f1d7b7be17 --- /dev/null +++ b/apps/settings/templates/settings/admin/ai.php @@ -0,0 +1,13 @@ +<?php +/** + * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +script('settings', [ + 'vue-settings-admin-ai', +]); +?> + +<div id="ai-settings"> +</div> diff --git a/apps/settings/templates/settings/admin/delegation.php b/apps/settings/templates/settings/admin/delegation.php new file mode 100644 index 00000000000..757226be676 --- /dev/null +++ b/apps/settings/templates/settings/admin/delegation.php @@ -0,0 +1,12 @@ +<?php + +/** + * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +\OCP\Util::addScript('settings', 'vue-settings-admin-delegation', 'core'); +?> + +<div id="admin-right-sub-granting"> +</div> diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php index a9f5ad0d77f..c2758305cfc 100644 --- a/apps/settings/templates/settings/admin/overview.php +++ b/apps/settings/templates/settings/admin/overview.php @@ -1,24 +1,7 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ /** @var \OCP\IL10N $l */ @@ -28,8 +11,15 @@ ?> <div id="security-warning" class="section"> - <h2 class="inlineblock"><?php p($l->t('Security & setup warnings'));?></h2> - <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-warnings')); ?>"></a> + <div class="security-warning__heading"> + <h2><?php p($l->t('Security & setup warnings'));?></h2> + <a target="_blank" + rel="noreferrer" + class="icon-info" + title="<?php p($l->t('Open documentation'));?>" + href="<?php p(link_to_docs('admin-warnings')); ?>" + aria-label="<?php p($l->t('Open documentation')); ?>"></a> + </div> <p class="settings-hint"><?php p($l->t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.'));?></p> <div id="security-warning-state-ok" class="hidden"> @@ -46,16 +36,16 @@ </div> <div id="postsetupchecks" data-check-wellknown="<?php if ($_['checkForWorkingWellKnownSetup']) { - p('true'); -} else { - p('false'); -} ?>"> + p('true'); + } else { + p('false'); + } ?>"> <ul class="errors hidden"></ul> <ul class="warnings hidden"></ul> <ul class="info hidden"></ul> </div> <p id="postsetupchecks-hint" class="hidden"> - <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?> + <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?> </p> <p class="extra-top-margin"> @@ -67,5 +57,5 @@ <div id="version" class="section"> <!-- should be the last part, so Updater can follow if enabled (it has no heading therefore). --> <h2><?php p($l->t('Version'));?></h2> - <p><strong><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" rel="noreferrer noopener" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></strong></p> + <p><strong><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" rel="noreferrer noopener" target="_blank">Nextcloud Hub 10</a> (<?php p($_['version']) ?>)</strong></p> </div> diff --git a/apps/settings/templates/settings/admin/security.php b/apps/settings/templates/settings/admin/security.php index f0689b948af..8f305c4dbc6 100644 --- a/apps/settings/templates/settings/admin/security.php +++ b/apps/settings/templates/settings/admin/security.php @@ -1,107 +1,12 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ -/** @var \OCP\IL10N $l */ -/** @var array $_ */ - -script('settings', 'vue-settings-admin-security'); - +\OCP\Util::addScript('settings', 'vue-settings-admin-security'); ?> -<div id="two-factor-auth" class="section"> - <h2><?php p($l->t('Two-Factor Authentication'));?></h2> - <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-2fa')); ?>"></a> - <div id="two-factor-auth-settings"></div> -</div> - -<div class="section" id='encryptionAPI'> - <h2><?php p($l->t('Server-side encryption')); ?></h2> - <a target="_blank" rel="noreferrer noopener" class="icon-info" - title="<?php p($l->t('Open documentation'));?>" - href="<?php p(link_to_docs('admin-encryption')); ?>"></a> - <p class="settings-hint"><?php p($l->t('Server-side encryption makes it possible to encrypt files which are uploaded to this server. This comes with limitations like a performance penalty, so enable this only if needed.')); ?></p> - <p id="enable"> - <input type="checkbox" - id="enableEncryption" class="checkbox" - value="1" <?php if ($_['encryptionEnabled']) { - print_unescaped('checked="checked" disabled="disabled"'); -} ?> /> - <label - for="enableEncryption"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/> - </p> - - <div id="EncryptionWarning" class="warning hidden"> - <p><?php p($l->t('Please read carefully before activating server-side encryption: ')); ?></p> - <ul> - <li><?php p($l->t('Once encryption is enabled, all files uploaded to the server from that point forward will be encrypted at rest on the server. It will only be possible to disable encryption at a later date if the active encryption module supports that function, and all pre-conditions (e.g. setting a recover key) are met.')); ?></li> - <li><?php p($l->t('Encryption alone does not guarantee security of the system. Please see documentation for more information about how the encryption app works, and the supported use cases.')); ?></li> - <li><?php p($l->t('Be aware that encryption always increases the file size.')); ?></li> - <li><?php p($l->t('It is always good to create regular backups of your data, in case of encryption make sure to backup the encryption keys along with your data.')); ?></li> - </ul> - - <p><?php p($l->t('This is the final warning: Do you really want to enable encryption?')) ?> <input type="button" - id="reallyEnableEncryption" - value="<?php p($l->t("Enable encryption")); ?>" /></p> - </div> +<div id="two-factor-auth-settings"></div> - <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) { - p('hidden'); -} ?>"> - <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) { - p('hidden'); -} ?>"> - <?php - if (empty($_['encryptionModules'])) { - p($l->t('No encryption module loaded, please enable an encryption module in the app menu.')); - } else { ?> - <h3><?php p($l->t('Select default encryption module:')) ?></h3> - <fieldset id='encryptionModules'> - <?php foreach ($_['encryptionModules'] as $id => $module): ?> - <input type="radio" id="<?php p($id) ?>" class="radio" - name="default_encryption_module" - value="<?php p($id) ?>" - <?php if ($module['default']) { - p('checked'); - } ?>> - <label - for="<?php p($id) ?>"><?php p($module['displayName']) ?></label> - <br/> - <?php endforeach; ?> - </fieldset> - <?php } ?> - </div> - <div id="migrationWarning" class="<?php if ($_['encryptionReady']) { - p('hidden'); - } ?>"> - <?php - if ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === true) { - p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please enable the "Default encryption module" and run \'occ encryption:migrate\'')); - } elseif ($_['encryptionReady'] === false && $_['externalBackendsEnabled'] === false) { - p($l->t('You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one.')); ?> - <input type="submit" name="startmigration" id="startmigration" - value="<?php p($l->t('Start migration')); ?>"/> - <?php - } ?> - </div> - </div> -</div> +<div id="vue-admin-encryption"></div> diff --git a/apps/settings/templates/settings/admin/server.php b/apps/settings/templates/settings/admin/server.php index 075c57396d1..aa320a03a2b 100644 --- a/apps/settings/templates/settings/admin/server.php +++ b/apps/settings/templates/settings/admin/server.php @@ -1,114 +1,19 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ /** @var \OCP\IL10N $l */ /** @var array $_ */ +script('settings', [ + 'vue-settings-admin-basic-settings', +]); ?> -<div class="section" id="backgroundjobs"> - <h2 class="inlineblock"><?php p($l->t('Background jobs'));?></h2> - <p class="cronlog inlineblock"> - <?php if ($_['lastcron'] !== false) { - $relative_time = relative_modified_date($_['lastcron']); - $maxAgeRelativeTime = relative_modified_date($_['cronMaxAge']); +<div id="vue-admin-background-job"></div> - $formatter = \OC::$server->getDateTimeFormatter(); - $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); - $maxAgeAbsoluteTime = $formatter->formatDateTime($_['cronMaxAge'], 'long', 'long'); - if (time() - $_['lastcron'] > 600) { ?> - <span class="status error"></span> - <span class="crondate" title="<?php p($absolute_time);?>"> - <?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> - </span> - <?php } elseif (time() - $_['cronMaxAge'] > 12 * 3600) { - if ($_['backgroundjobs_mode'] === 'cron') { ?> - <span class="status warning"></span> - <span class="crondate" title="<?php p($maxAgeAbsoluteTime);?>"> - <?php p($l->t("Some jobs haven’t been executed since %s. Please consider increasing the execution frequency.", [$maxAgeRelativeTime]));?> - </span> - <?php } else { ?> - <span class="status error"></span> - <span class="crondate" title="<?php p($maxAgeAbsoluteTime);?>"> - <?php p($l->t("Some jobs didn’t execute since %s. Please consider switching to system cron.", [$maxAgeRelativeTime]));?> - </span> - <?php } - } else { ?> - <span class="status success"></span> - <span class="crondate" title="<?php p($absolute_time);?>"> - <?php p($l->t("Last job ran %s.", [$relative_time]));?> - </span> - <?php } -} else { ?> - <span class="status error"></span> - <?php p($l->t("Background job didn’t run yet!")); - } ?> - </p> - <a target="_blank" rel="noreferrer noopener" class="icon-info" - title="<?php p($l->t('Open documentation'));?>" - href="<?php p(link_to_docs('admin-background-jobs')); ?>"></a> - - <p class="settings-hint"><?php p($l->t('For optimal performance it\'s important to configure background jobs correctly. For bigger instances \'Cron\' is the recommended setting. Please see the documentation for more information.'));?></p> - <form action="#"> - <fieldset> - <legend class="hidden-visually"><?php p($l->t('Pick background job setting'));?></legend> - <p> - <input type="radio" name="mode" value="ajax" class="radio" - id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { - print_unescaped('checked="checked"'); - } ?>> - <label for="backgroundjobs_ajax">AJAX</label><br/> - <em><?php p($l->t("Execute one task with each page loaded.")); ?></em> - </p> - <p> - <input type="radio" name="mode" value="webcron" class="radio" - id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") { - print_unescaped('checked="checked"'); - } ?>> - <label for="backgroundjobs_webcron">Webcron</label><br/> - <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 5 minutes over HTTP.")); ?></em> - </p> - <p> - <input type="radio" name="mode" value="cron" class="radio" - id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") { - print_unescaped('checked="checked"'); - } - if (!$_['cli_based_cron_possible']) { - print_unescaped('disabled'); - }?>> - <label for="backgroundjobs_cron">Cron</label><br/> - <em><?php p($l->t("Use system cron service to call the cron.php file every 5 minutes.")); ?> - <?php if ($_['cli_based_cron_possible']) { - p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); - } else { - print_unescaped(str_replace( - ['{linkstart}', '{linkend}'], - ['<a href="https://www.php.net/manual/en/book.posix.php">', ' ↗</a>'], - $l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') - )); - } ?></em> - - </p> - </fieldset> - </form> -</div> +<?php if ($_['profileEnabledGlobally']) : ?> + <div id="vue-admin-profile-settings"></div> +<?php endif; ?> diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index 9f651ce6d6c..e9a44217d2e 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -1,206 +1,8 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ - -/** @var \OCP\IL10N $l */ -/** @var array $_ */ - ?> -<div class="section" id="shareAPI"> - <h2><?php p($l->t('Sharing'));?></h2> - <a target="_blank" rel="noreferrer noopener" class="icon-info" - title="<?php p($l->t('Open documentation'));?>" - href="<?php p(link_to_docs('admin-sharing')); ?>"></a> - <p class="settings-hint"><?php p($l->t('As admin you can fine-tune the sharing behavior. Please see the documentation for more information.'));?></p> - <p id="enable"> - <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" class="checkbox" - value="1" <?php if ($_['shareAPIEnabled'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/> - </p> - - <p id="internalShareSettings" class="indent <?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -} ?>"> - <input type="checkbox" name="shareapi_default_internal_expire_date" id="shareapiDefaultInternalExpireDate" class="checkbox" - value="1" <?php if ($_['shareDefaultInternalExpireDateSet'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/> - </p> - <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <?php p($l->t('Expire after ')); ?> - <input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>" - value='<?php p($_['shareInternalExpireAfterNDays']) ?>' /> - <?php p($l->t('days')); ?> - <input type="checkbox" name="shareapi_enforce_internal_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox" - value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> - </p> - - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_allow_links" id="allowLinks" class="checkbox" - value="1" <?php if ($_['allowLinks'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/> - </p> - - <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') { - p('hidden'); -} ?>"> - <input type="checkbox" name="shareapi_allow_public_upload" id="allowPublicUpload" class="checkbox" - value="1" <?php if ($_['allowPublicUpload'] == 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="allowPublicUpload"><?php p($l->t('Allow public uploads'));?></label><br/> - <input type="checkbox" name="shareapi_enable_link_password_by_default" id="enableLinkPasswordByDefault" class="checkbox" - value="1" <?php if ($_['enableLinkPasswordByDefault'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="enableLinkPasswordByDefault"><?php p($l->t('Always ask for a password'));?></label><br/> - <input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" class="checkbox" - value="1" <?php if ($_['enforceLinkPassword']) { - print_unescaped('checked="checked"'); -} ?> /> - <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/> - - <input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" class="checkbox" - value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date for link shares'));?></label><br/> - - </p> - <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <?php p($l->t('Expire after ')); ?> - <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" - value='<?php p($_['shareExpireAfterNDays']) ?>' /> - <?php p($l->t('days')); ?> - <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" - value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> - </p> - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" class="checkbox" - value="1" <?php if ($_['allowResharing'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/> - </p> - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox" - value="1" <?php if ($_['allowGroupSharing'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br /> - </p> - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox" - value="1" <?php if ($_['onlyShareWithGroupMembers']) { - print_unescaped('checked="checked"'); -} ?> /> - <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/> - </p> - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups" class="checkbox" - value="1" <?php if ($_['shareExcludeGroups']) { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/> - </p> - <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') { - p('hidden'); -} ?>"> - <input name="shareapi_exclude_groups_list" type="hidden" id="excludedGroups" value="<?php p($_['shareExcludedGroupsList']) ?>" style="width: 400px" class="noJSAutoUpdate"/> - <br /> - <em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em> - </p> - - <p class="<?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_allow_share_dialog_user_enumeration" value="1" id="shareapi_allow_share_dialog_user_enumeration" class="checkbox" - <?php if ($_['allowShareDialogUserEnumeration'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapi_allow_share_dialog_user_enumeration"><?php p($l->t('Allow username autocompletion in share dialog (if this is disabled the full username or email address needs to be entered)'));?></label><br /> - </p> - - <p id="shareapi_restrict_user_enumeration_to_group_setting" class="indent <?php if ($_['shareAPIEnabled'] === 'no' || $_['allowShareDialogUserEnumeration'] === 'no') { - p('hidden'); -}?>"> - <input type="checkbox" name="shareapi_restrict_user_enumeration_to_group" value="1" id="shareapi_restrict_user_enumeration_to_group" class="checkbox" - <?php if ($_['restrictUserEnumerationToGroup'] === 'yes') { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapi_restrict_user_enumeration_to_group"><?php p($l->t('Restrict username autocompletion to users within the same groups'));?></label><br /> - </p> - - <p> - <input type="checkbox" id="publicShareDisclaimer" class="checkbox noJSAutoUpdate" - <?php if ($_['publicShareDisclaimerText'] !== null) { - print_unescaped('checked="checked"'); -} ?> /> - <label for="publicShareDisclaimer"><?php p($l->t('Show disclaimer text on the public link upload page (only shown when the file list is hidden)'));?></label> - <span id="publicShareDisclaimerStatus" class="msg" style="display:none"></span> - <br/> - <textarea placeholder="<?php p($l->t('This text will be shown on the public link upload page when the file list is hidden.')) ?>" id="publicShareDisclaimerText" <?php if ($_['publicShareDisclaimerText'] === null) { - print_unescaped('class="hidden"'); -} ?>><?php p($_['publicShareDisclaimerText']) ?></textarea> - </p> - - <h3><?php p($l->t('Default share permissions'));?></h3> - <input type="hidden" name="shareapi_default_permissions" id="shareApiDefaultPermissions" class="checkbox" - value="<?php p($_['shareApiDefaultPermissions']) ?>" /> - <p id="shareApiDefaultPermissionsSection" class="indent <?php if ($_['shareAPIEnabled'] === 'no') { - p('hidden'); -} ?>"> - <?php foreach ($_['shareApiDefaultPermissionsCheckboxes'] as $perm): ?> - <input type="checkbox" name="shareapi_default_permission_<?php p($perm['id']) ?>" id="shareapi_default_permission_<?php p($perm['id']) ?>" - class="noautosave checkbox" value="<?php p($perm['value']) ?>" <?php if (($_['shareApiDefaultPermissions'] & $perm['value']) !== 0) { - print_unescaped('checked="checked"'); -} ?> /> - <label for="shareapi_default_permission_<?php p($perm['id']) ?>"><?php p($perm['label']);?></label> - <?php endforeach ?> - </p> -</div> +<div id="vue-admin-settings-sharing"></div>
\ No newline at end of file diff --git a/apps/settings/templates/settings/empty.php b/apps/settings/templates/settings/empty.php index 63ebc6f44a1..ce4477fa9df 100644 --- a/apps/settings/templates/settings/empty.php +++ b/apps/settings/templates/settings/empty.php @@ -1,24 +1,8 @@ <?php + /** - * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ - # used for Personal/Additional settings as fallback for legacy settings +// Empty template as Vue will take over the `id="conent"` of the base template element diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index 53987bf6074..2b3e67aa687 100644 --- a/apps/settings/templates/settings/frame.php +++ b/apps/settings/templates/settings/frame.php @@ -1,89 +1,71 @@ <?php /** - * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ style('settings', 'settings'); -script('settings', [ 'settings', 'admin', 'log']); -script('core', 'setupchecks'); -script('files', 'jquery.fileupload'); +\OCP\Util::addScript('settings', 'settings', 'core'); +\OCP\Util::addScript('settings', 'legacy-admin'); +\OCP\Util::addScript('core', 'setupchecks', 'core'); ?> <div id="app-navigation"> - <ul> - <?php if (!empty($_['forms']['admin'])) { ?> - <li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li> - <?php - } - foreach ($_['forms']['personal'] as $form) { - if (isset($form['anchor'])) { - $anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]); - $class = 'nav-icon-' . $form['anchor']; - $sectionName = $form['section-name']; - $active = $form['active'] ? ' class="active"' : ''; ?> - <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>> - <a href="<?php p($anchor); ?>"> - <?php if (!empty($form['icon'])) { ?> - <img alt="" src="<?php print_unescaped($form['icon']); ?>"> - <span><?php p($form['section-name']); ?></span> - <?php } else { ?> - <span class="no-icon"><?php p($form['section-name']); ?></span> - <?php } ?> - </a> - </li> - <?php + <?php if (!empty($_['forms']['admin'])): ?> + <div id="app-navigation-caption-personal" class="app-navigation-caption"><?php p($l->t('Personal')); ?></div> + <?php endif; ?> + <nav class="app-navigation-personal" aria-labelledby="app-navigation-caption-personal"> + <ul> + <?php foreach ($_['forms']['personal'] as $form) { + if (isset($form['anchor'])) { + $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.PersonalSettings.index', ['section' => $form['anchor']]); + $class = 'nav-icon-' . $form['anchor']; + $sectionName = $form['section-name']; ?> + <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="personal"> + <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> + <?php if (!empty($form['icon'])) { ?> + <img alt="" src="<?php print_unescaped($form['icon']); ?>"> + <span><?php p($form['section-name']); ?></span> + <?php } else { ?> + <span class="no-icon"><?php p($form['section-name']); ?></span> + <?php } ?> + </a> + </li> + <?php + } } - } - ?> +?> + </ul> + </nav> - <?php - if (!empty($_['forms']['admin'])) { - ?> - <li class="app-navigation-caption"><?php p($l->t('Administration')); ?></li> - <?php - } - foreach ($_['forms']['admin'] as $form) { - if (isset($form['anchor'])) { - $anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]); - $class = 'nav-icon-' . $form['anchor']; - $sectionName = $form['section-name']; - $active = $form['active'] ? ' class="active"' : ''; ?> - <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>> - <a href="<?php p($anchor); ?>"> - <?php if (!empty($form['icon'])) { ?> - <img alt="" src="<?php print_unescaped($form['icon']); ?>"> - <span><?php p($form['section-name']); ?></span> - <?php } else { ?> - <span class="no-icon"><?php p($form['section-name']); ?></span> - <?php } ?> - </a> - </li> - <?php + <?php if (!empty($_['forms']['admin'])): ?> + <div id="app-navigation-caption-administration" class="app-navigation-caption"><?php p($l->t('Administration')); ?></div> + <?php endif; ?> + <nav class="app-navigation-administration" aria-labelledby="app-navigation-caption-administration"> + <ul> + <?php foreach ($_['forms']['admin'] as $form) { + if (isset($form['anchor'])) { + $anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]); + $class = 'nav-icon-' . $form['anchor']; + $sectionName = $form['section-name']; ?> + <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="admin"> + <a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>> + <?php if (!empty($form['icon'])) { ?> + <img alt="" src="<?php print_unescaped($form['icon']); ?>"> + <span><?php p($form['section-name']); ?></span> + <?php } else { ?> + <span class="no-icon"><?php p($form['section-name']); ?></span> + <?php } ?> + </a> + </li> + <?php + } } - } - ?> - </ul> +?> + </ul> + </nav> </div> - -<div id="app-content"> +<main id="app-content" <?php if (!empty($_['activeSectionId'])) { ?> data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>" <?php } if (!empty($_['activeSectionType'])) { ?> data-active-section-type="<?php print_unescaped($_['activeSectionType']) ?>" <?php } ?>> <?php print_unescaped($_['content']); ?> -</div> +</main> diff --git a/apps/settings/templates/settings/personal/development.notice.php b/apps/settings/templates/settings/personal/development.notice.php index bed534b2d5f..723f954ecc5 100644 --- a/apps/settings/templates/settings/personal/development.notice.php +++ b/apps/settings/templates/settings/personal/development.notice.php @@ -1,6 +1,15 @@ +<?php +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +?> <div class="section development-notice"> <p> - <a href="<?php p($_['reasons-use-nextcloud-pdf-link']); ?>" id="open-reasons-use-nextcloud-pdf" class="link-button icon-file" target="_blank"><?php p($l->t('Reasons to use Nextcloud in your organization'));?></a> + <a href="<?php p($_['reasons-use-nextcloud-pdf-link']); ?>" id="open-reasons-use-nextcloud-pdf" class="link-button" target="_blank"> + <span class="icon-file-text" aria-hidden="true"></span> + <?php p($l->t('Reasons to use Nextcloud in your organization'));?> + </a> </p> <p> <?php print_unescaped(str_replace( @@ -24,46 +33,46 @@ <?php print_unescaped(str_replace( [ '{facebookimage}', - '{twitterimage}', + '{ximage}', '{mastodonimage}', '{rssimage}', '{mailimage}', '{facebookopen}', - '{twitteropen}', + '{xopen}', '{mastodonopen}', '{rssopen}', '{newsletteropen}', '{linkclose}', '{facebooktext}', - '{twittertext}', + '{xtext}', '{mastodontext}', '{rsstext}', '{mailtext}', ], [ - image_path('core', 'facebook.svg'), - image_path('core', 'twitter.svg'), - image_path('core', 'mastodon.svg'), - image_path('core', 'rss.svg'), - image_path('core', 'mail.svg'), - '<a target="_blank" rel="noreferrer noopener" href="https://www.facebook.com/Nextclouders/">', - '<a target="_blank" rel="noreferrer noopener" href="https://twitter.com/nextclouders">', - '<a target="_blank" rel="noreferrer noopener" href="https://mastodon.xyz/@nextcloud">', - '<a target="_blank" rel="noreferrer noopener" href="https://nextcloud.com/news/">', - '<a target="_blank" rel="noreferrer noopener" href="https://newsletter.nextcloud.com/?p=subscribe&id=1">', + '<svg aria-hidden="true" width="50" height="50" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8" fill="var(--color-text-maxcontrast)"/><path d="m7 5c0-1.1 0.9-2 2-2h1.5v2h-1c-0.27 0-0.5 0.23-0.5 0.5v1h1.5v2h-1.5v4.5h-2v-4.5h-1.5v-2h1.5z" fill="var(--color-main-background)"/></svg>', + '<svg aria-hidden="true" width="50" height="50" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8" fill="var(--color-text-maxcontrast)"/><path d="m 3.384891,2.6 c -0.3882,0 -0.61495,0.4362184 -0.39375,0.7558594 L 6.5841098,8.4900156 2.9770785,12.707422 C 2.7436785,12.979821 2.9370285,13.4 3.2958285,13.4 H 3.694266 c 0.176,0 0.3430313,-0.07714 0.4570313,-0.210938 L 7.294266,9.5065156 9.6602817,12.887891 C 9.8762817,13.208984 10.25229,13.4 10.743485,13.4 h 1.900391 c 0.3882,0 0.61575,-0.436688 0.39375,-0.754688 L 9.2466097,7.2195156 12.682547,3.1941408 C 12.881744,2.9601408 12.715528,2.6 12.407473,2.6 h -0.506566 c -0.175,0 -0.34186,0.076453 -0.45586,0.2197656 L 8.5405785,6.2058438 6.3790317,3.1132812 C 6.1568442,2.7913687 5.6965004,2.6 5.3958285,2.6 Z" fill="var(--color-main-background)"/></svg>', + '<svg aria-hidden="true" width="50" height="50" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8" fill="var(--color-text-maxcontrast)"/><path d="m13.183 9.2819c-0.1566 0.80567-1.4026 1.6874-2.8336 1.8583-0.74623 0.08903-1.4809 0.17088-2.2644 0.13494-1.2813-0.05872-2.2923-0.30582-2.2923-0.30582 0 0.12473 0.0077 0.24349 0.02307 0.35456 0.16657 1.2645 1.2538 1.3402 2.2837 1.3755 1.0395 0.03557 1.9651-0.25629 1.9651-0.25629l0.0427 0.93975s-0.72709 0.39044-2.0223 0.46224c-0.71423 0.03926-1.6011-0.01798-2.634-0.29136-2.2402-0.59294-2.6255-2.9809-2.6844-5.4039-0.01797-0.7194-0.00687-1.3977-0.00687-1.9651 0-2.4776 1.6233-3.2038 1.6233-3.2038 0.81852-0.37591 2.223-0.53399 3.6832-0.54593h0.035867c1.4601 0.011937 2.8656 0.17002 3.6841 0.54593 0 0 1.6233 0.72623 1.6233 3.2038 0 0 0.02036 1.828-0.22639 3.0971" fill="var(--color-main-background)" stroke-width=".049227"/><path d="m11.494 6.377v3h-1.1885v-2.9118c0-0.6138-0.25826-0.92535-0.77484-0.92535-0.57116 0-0.85742 0.36957-0.85742 1.1004v1.5938h-1.1815v-1.5938c0-0.73078-0.28632-1.1004-0.85748-1.1004-0.51658 0-0.77484 0.31155-0.77484 0.92535v2.9118h-1.1885v-3c0-0.61313 0.15611-1.1004 0.46969-1.4608 0.32336-0.36047 0.74684-0.54525 1.2725-0.54525 0.6082 0 1.0688 0.23377 1.3733 0.70137l0.29604 0.49627 0.2961-0.49627c0.30447-0.4676 0.76505-0.70137 1.3733-0.70137 0.52563 0 0.9491 0.18479 1.2725 0.54525 0.31352 0.36047 0.46963 0.84769 0.46963 1.4608" fill="var(--color-text-maxcontrast)" stroke-width=".049227"/></svg>', + '<svg aria-hidden="true" width="50" height="50" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8" fill="var(--color-text-maxcontrast)"/><path d="m4.5 3.5v1.7c3.563 0 6.3 2.735 6.3 6.3h1.7c0-4.4-3.58-8-8-8zm0 2.5v1.7c2.326 0 3.774 1.468 3.8 3.8h1.7c0-3-2.492-5.5-5.5-5.5zm1.25 3c-0.69 0-1.25 0.56-1.25 1.25s0.56 1.25 1.25 1.25 1.25-0.56 1.25-1.25-0.56-1.25-1.25-1.25z" fill="var(--color-main-background)"/></svg>', + '<svg aria-hidden="true" width="50" height="50" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8" fill="var(--color-text-maxcontrast)"/><path d="m3.556 4.875c-0.306 0-0.556 0.248-0.556 0.555v5.14c0 0.31 0.25 0.555 0.556 0.555h8.89c0.304 0 0.554-0.245 0.554-0.555v-5.14c0-0.307-0.25-0.555-0.556-0.555zm0.47 0.643 3.8 3.8h0.33l3.82-3.8 0.38 0.38-2.274 2.31 1.82 1.753-0.38 0.38-1.753-1.753-1.267 1.285h-0.8l-1.368-1.283-1.754 1.77-0.38-0.4 1.734-1.76-2.292-2.3z" fill="var(--color-main-background)"/></svg>', + '<a target="_blank" aria-label="{facebooktext}" rel="noreferrer noopener" href="https://www.facebook.com/Nextclouders/">', + '<a target="_blank" aria-label="{xtext}" rel="noreferrer noopener" href="https://x.com/nextclouders">', + '<a target="_blank" aria-label="{mastodontext}" rel="noreferrer noopener" href="https://mastodon.xyz/@nextcloud">', + '<a target="_blank" aria-label="{rsstext}" rel="noreferrer noopener" href="https://nextcloud.com/blog/">', + '<a target="_blank" aria-label="{mailtext}" rel="noreferrer noopener" href="https://newsletter.nextcloud.com/?p=subscribe&id=1">', '</a>', $l->t('Like our Facebook page'), - $l->t('Follow us on Twitter'), + $l->t('Follow us on X'), $l->t('Follow us on Mastodon'), $l->t('Check out our blog'), $l->t('Subscribe to our newsletter'), ], -'{facebookopen}<img width="50" src="{facebookimage}" title="{facebooktext}" alt="{facebooktext}">{linkclose} -{twitteropen}<img width="50" src="{twitterimage}" title="{twittertext}" alt="{twittertext}">{linkclose} -{mastodonopen}<img width="50" src="{mastodonimage}" title="{mastodontext}" alt="{mastodontext}">{linkclose} -{rssopen}<img class="img-circle" width="50" src="{rssimage}" title="{rsstext}" alt="{rsstext}">{linkclose} -{newsletteropen}<img width="50" src="{mailimage}" title="{mailtext}" alt="{mailtext}">{linkclose}' + '{facebookopen}{facebookimage}{linkclose} + {xopen}{ximage}{linkclose} + {mastodonopen}{mastodonimage}{linkclose} + {rssopen}{rssimage}{linkclose} + {newsletteropen}{mailimage}{linkclose}' )); ?> </p> </div> diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php index 84198b3c0c4..38c449a337f 100644 --- a/apps/settings/templates/settings/personal/personal.info.php +++ b/apps/settings/templates/settings/personal/personal.info.php @@ -1,25 +1,8 @@ <?php + /** - * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * @author Thomas Citharel <tcit@tcit.fr> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ /** @var \OCP\IL10N $l */ @@ -31,388 +14,91 @@ script('settings', [ 'federationsettingsview', 'federationscopemenu', 'settings/personalInfo', + 'vue-settings-personal-info', ]); ?> - -<div id="personal-settings"> - <div id="personal-settings-avatar-container" class="personal-settings-container"> - <div> - <form id="avatarform" class="section" method="post" action="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.postAvatar')); ?>"> - <h3> - <label><?php p($l->t('Profile picture')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <div id="displayavatar"> - <div class="avatardiv"></div> - <div class="warning hidden"></div> - <?php if ($_['avatarChangeSupported']): ?> - <label for="uploadavatar" class="inlineblock button icon-upload svg" id="uploadavatarbutton" title="<?php p($l->t('Upload new')); ?>"></label> - <div class="inlineblock button icon-folder svg" id="selectavatar" title="<?php p($l->t('Select from Files')); ?>"></div> - <div class="hidden button icon-delete svg" id="removeavatar" title="<?php p($l->t('Remove image')); ?>"></div> - <input type="file" name="files[]" id="uploadavatar" class="hiddenuploadfield" accept="image/*"> - <p><em><?php p($l->t('png or jpg, max. 20 MB')); ?></em></p> - <?php else: ?> - <?php p($l->t('Picture provided by original account')); ?> - <?php endif; ?> - </div> - - <div id="cropper" class="hidden"> - <div class="inner-container"> - <div class="inlineblock button" id="abortcropperbutton"><?php p($l->t('Cancel')); ?></div> - <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile picture')); ?></div> - </div> - </div> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="avatarscope" value="<?php p($_['avatarScope']) ?>"> - <?php } ?> - </form> - </div> - <div class="personal-settings-setting-box personal-settings-group-box section"> - <h3><?php p($l->t('Details')); ?></h3> - <div id="groups" class="personal-info icon-user"> - <p><?php p($l->t('You are a member of the following groups:')); ?></p> - <p id="groups-groups"> - <strong><?php p(implode(', ', $_['groups'])); ?></strong> - </p> - </div> - <div id="quota" class="personal-info icon-quota"> - <div class="quotatext-bg"> - <p class="quotatext"> - <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?> - <?php print_unescaped($l->t('You are using <strong>%s</strong>', - [$_['usage']]));?> - <?php else: ?> - <?php print_unescaped($l->t('You are using <strong>%1$s</strong> of <strong>%2$s</strong> (<strong>%3$s %%</strong>)', - [$_['usage'], $_['total_space'], $_['usage_relative']]));?> - <?php endif ?> - </p> - </div> - <progress value="<?php p($_['usage_relative']); ?>" max="100"<?php if ($_['usage_relative'] > 80): ?> class="warn" <?php endif; ?>></progress> - </div> +<?php if (!$_['isFairUseOfFreePushService']) : ?> + <div class="section"> + <div class="warning"> + <?php p($l->t('This community release of Nextcloud is unsupported and instant notifications are unavailable.')); ?> </div> </div> +<?php endif; ?> - <div class="personal-settings-container"> - <div class="personal-settings-setting-box"> - <form id="displaynameform" class="section"> - <h3> - <label for="displayname"><?php p($l->t('Full name')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <input type="text" id="displayname" name="displayname" - <?php if (!$_['displayNameChangeSupported']) { - print_unescaped('class="hidden"'); - } ?> - value="<?php p($_['displayName']) ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" /> - <?php if (!$_['displayNameChangeSupported']) { ?> - <span><?php if (isset($_['displayName']) && !empty($_['displayName'])) { - p($_['displayName']); - } else { - p($l->t('No display name set')); - } ?></span> - <?php } ?> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="displaynamescope" value="<?php p($_['displayNameScope']) ?>"> - <?php } ?> - </form> +<div id="personal-settings"> + <h2 class="hidden-visually"><?php p($l->t('Personal info')); ?></h2> + <div id="vue-avatar-section"></div> + <?php if ($_['profileEnabledGlobally']) : ?> + <div class="personal-settings-setting-box personal-settings-setting-box-profile"> + <div id="vue-profile-section"></div> </div> - <div class="personal-settings-setting-box"> - <form id="emailform" class="section"> - <h3> - <label for="email"><?php p($l->t('Email')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <div class="verify <?php if ($_['email'] === '' || $_['emailScope'] !== 'public') { - p('hidden'); - } ?>"> - <img id="verify-email" title="<?php p($_['emailMessage']); ?>" data-status="<?php p($_['emailVerification']) ?>" src=" - <?php - switch ($_['emailVerification']) { - case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p(image_path('core', 'actions/verifying.svg')); - break; - case \OC\Accounts\AccountManager::VERIFIED: - p(image_path('core', 'actions/verified.svg')); - break; - default: - p(image_path('core', 'actions/verify.svg')); - } - ?>"> - </div> - <input type="email" name="email" id="email" value="<?php p($_['email']); ?>" - <?php if (!$_['displayNameChangeSupported']) { - print_unescaped('class="hidden"'); - } ?> - placeholder="<?php p($l->t('Your email address')); ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" /> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if (!$_['displayNameChangeSupported']) { ?> - <span><?php if (isset($_['email']) && !empty($_['email'])) { - p($_['email']); - } else { - p($l->t('No email address set')); - }?></span> - <?php } ?> - <?php if ($_['displayNameChangeSupported']) { ?> - <em><?php p($l->t('For password reset and notifications')); ?></em> - <?php } ?> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="emailscope" value="<?php p($_['emailScope']) ?>"> - <?php } ?> - </form> + <div class="personal-settings-setting-box personal-settings-setting-box-detail"> + <div id="vue-details-section"></div> </div> - <?php if (!empty($_['phone']) || $_['lookupServerUploadEnabled']) { ?> - <div class="personal-settings-setting-box"> - <form id="phoneform" class="section"> - <h3> - <label for="phone"><?php p($l->t('Phone number')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <input type="tel" id="phone" name="phone" <?php if (!$_['lookupServerUploadEnabled']) { - print_unescaped('disabled="1"'); - } ?> - value="<?php p($_['phone']) ?>" - placeholder="<?php p($l->t('Your phone number')); ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" /> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="phonescope" value="<?php p($_['phoneScope']) ?>"> - <?php } ?> - </form> + <?php else: ?> + <div class="personal-settings-setting-box personal-settings-setting-box-detail--without-profile"> + <div id="vue-details-section"></div> </div> - <?php } ?> - <?php if (!empty($_['address']) || $_['lookupServerUploadEnabled']) { ?> + <?php endif; ?> + <div class="personal-settings-setting-box"> + <div id="vue-displayname-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-pronouns-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-email-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-phone-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-location-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-birthday-section"></div> + </div> + <div class="personal-settings-setting-box personal-settings-language-box"> + <div id="vue-language-section"></div> + </div> + <div class="personal-settings-setting-box personal-settings-locale-box"> + <div id="vue-locale-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-fdow-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-website-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-twitter-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-bluesky-section"></div> + </div> + <div class="personal-settings-setting-box"> + <div id="vue-fediverse-section"></div> + </div> + <?php if ($_['profileEnabledGlobally']) : ?> <div class="personal-settings-setting-box"> - <form id="addressform" class="section"> - <h3> - <label for="address"><?php p($l->t('Address')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <input type="text" id="address" name="address" <?php if (!$_['lookupServerUploadEnabled']) { - print_unescaped('disabled="1"'); - } ?> - placeholder="<?php p($l->t('Your postal address')); ?>" - value="<?php p($_['address']) ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" /> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="addressscope" value="<?php p($_['addressScope']) ?>"> - <?php } ?> - </form> + <div id="vue-organisation-section"></div> </div> - <?php } ?> - <?php if (!empty($_['website']) || $_['lookupServerUploadEnabled']) { ?> <div class="personal-settings-setting-box"> - <form id="websiteform" class="section"> - <h3> - <label for="website"><?php p($l->t('Website')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <div class="verify <?php if ($_['website'] === '' || $_['websiteScope'] !== 'public') { - p('hidden'); - } ?>"> - <img id="verify-website" title="<?php p($_['websiteMessage']); ?>" data-status="<?php p($_['websiteVerification']) ?>" src=" - <?php - switch ($_['websiteVerification']) { - case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p(image_path('core', 'actions/verifying.svg')); - break; - case \OC\Accounts\AccountManager::VERIFIED: - p(image_path('core', 'actions/verified.svg')); - break; - default: - p(image_path('core', 'actions/verify.svg')); - } - ?>" - <?php if ($_['websiteVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['websiteVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) { - print_unescaped(' class="verify-action"'); - } ?> - > - <div class="verification-dialog popovermenu bubble menu"> - <div class="verification-dialog-content"> - <p class="explainVerification"></p> - <p class="verificationCode"></p> - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> - </div> - </div> - </div> - <?php } ?> - <input type="url" name="website" id="website" value="<?php p($_['website']); ?>" - placeholder="<?php p($l->t('Link https://…')); ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" - <?php if (!$_['lookupServerUploadEnabled']) { - print_unescaped('disabled="1"'); - } ?> - /> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="websitescope" value="<?php p($_['websiteScope']) ?>"> - <?php } ?> - </form> + <div id="vue-role-section"></div> </div> - <?php } ?> - <?php if (!empty($_['twitter']) || $_['lookupServerUploadEnabled']) { ?> <div class="personal-settings-setting-box"> - <form id="twitterform" class="section"> - <h3> - <label for="twitter"><?php p($l->t('Twitter')); ?></label> - <div class="federation-menu" tabindex="0"> - <span class="icon-federation-menu icon-password"> - <span class="icon-triangle-s"></span> - </span> - </div> - </h3> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <div class="verify <?php if ($_['twitter'] === '' || $_['twitterScope'] !== 'public') { - p('hidden'); - } ?>"> - <img id="verify-twitter" title="<?php p($_['twitterMessage']); ?>" data-status="<?php p($_['twitterVerification']) ?>" src=" - <?php - switch ($_['twitterVerification']) { - case \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS: - p(image_path('core', 'actions/verifying.svg')); - break; - case \OC\Accounts\AccountManager::VERIFIED: - p(image_path('core', 'actions/verified.svg')); - break; - default: - p(image_path('core', 'actions/verify.svg')); - } - ?>" - <?php if ($_['twitterVerification'] === \OC\Accounts\AccountManager::VERIFICATION_IN_PROGRESS || $_['twitterVerification'] === \OC\Accounts\AccountManager::NOT_VERIFIED) { - print_unescaped(' class="verify-action"'); - } ?> - > - <div class="verification-dialog popovermenu bubble menu"> - <div class="verification-dialog-content"> - <p class="explainVerification"></p> - <p class="verificationCode"></p> - <p><?php p($l->t('It can take up to 24 hours before the account is displayed as verified.'));?></p> - </div> - </div> - </div> - <?php } ?> - <input type="text" name="twitter" id="twitter" value="<?php p($_['twitter']); ?>" - placeholder="<?php p($l->t('Twitter handle @…')); ?>" - autocomplete="on" autocapitalize="none" autocorrect="off" - <?php if (!$_['lookupServerUploadEnabled']) { - print_unescaped('disabled="1"'); - } ?> - /> - <span class="icon-checkmark hidden"></span> - <span class="icon-error hidden" ></span> - <?php if ($_['lookupServerUploadEnabled']) { ?> - <input type="hidden" id="twitterscope" value="<?php p($_['twitterScope']) ?>"> - <?php } ?> - </form> + <div id="vue-headline-section"></div> </div> - <?php } ?> - </div> - - <div class="profile-settings-container"> - <div class="personal-settings-setting-box personal-settings-language-box"> - <?php if (isset($_['activelanguage'])) { ?> - <form id="language" class="section"> - <h3> - <label for="languageinput"><?php p($l->t('Language'));?></label> - </h3> - <select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>"> - <option value="<?php p($_['activelanguage']['code']);?>"> - <?php p($_['activelanguage']['name']);?> - </option> - <?php foreach ($_['commonlanguages'] as $language):?> - <option value="<?php p($language['code']);?>"> - <?php p($language['name']);?> - </option> - <?php endforeach;?> - <optgroup label="––––––––––"></optgroup> - <?php foreach ($_['languages'] as $language):?> - <option value="<?php p($language['code']);?>"> - <?php p($language['name']);?> - </option> - <?php endforeach;?> - </select> - <a href="https://www.transifex.com/nextcloud/nextcloud/" - target="_blank" rel="noreferrer noopener"> - <em><?php p($l->t('Help translate'));?></em> - </a> - </form> - <?php } ?> - </div> - <div class="personal-settings-setting-box personal-settings-locale-box"> - <?php if (isset($_['activelocale'])) { ?> - <form id="locale" class="section"> - <h3> - <label for="localeinput"><?php p($l->t('Locale'));?></label> - </h3> - <select id="localeinput" name="lang" data-placeholder="<?php p($l->t('Locale'));?>"> - <option value="<?php p($_['activelocale']['code']);?>"> - <?php p($l->t($_['activelocale']['name']));?> - </option> - <optgroup label="––––––––––"></optgroup> - <?php foreach ($_['localesForLanguage'] as $locale):?> - <option value="<?php p($locale['code']);?>"> - <?php p($l->t($locale['name']));?> - </option> - <?php endforeach;?> - <optgroup label="––––––––––"></optgroup> - <option value="<?php p($_['activelocale']['code']);?>"> - <?php p($l->t($_['activelocale']['name']));?> - </option> - <?php foreach ($_['locales'] as $locale):?> - <option value="<?php p($locale['code']);?>"> - <?php p($l->t($locale['name']));?> - </option> - <?php endforeach;?> - </select> - <div id="localeexample" class="personal-info icon-timezone"> - <p> - <span id="localeexample-date"></span> <span id="localeexample-time"></span> - </p> - <p id="localeexample-fdow"></p> - </div> - </form> - <?php } ?> + <div class="personal-settings-setting-box"> + <div id="vue-biography-section"></div> </div> - <span class="msg"></span> - </div> - - <div id="personal-settings-group-container"> - - </div> + <?php endif; ?> + <span class="msg"></span> + <div id="personal-settings-group-container"></div> </div> +<?php if ($_['profileEnabledGlobally']) : ?> + <div class="personal-settings-section"> + <div id="vue-profile-visibility-section"></div> + </div> +<?php endif; ?> diff --git a/apps/settings/templates/settings/personal/security/authtokens.php b/apps/settings/templates/settings/personal/security/authtokens.php index 1db0d91fe69..e59266695bf 100644 --- a/apps/settings/templates/settings/personal/security/authtokens.php +++ b/apps/settings/templates/settings/personal/security/authtokens.php @@ -1,30 +1,11 @@ <?php declare(strict_types=1); /** - * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ -script('settings', [ - 'vue-settings-personal-security', -]); +\OCP\Util::addScript('settings', 'vue-settings-personal-security', 'core'); ?> diff --git a/apps/settings/templates/settings/personal/security/password.php b/apps/settings/templates/settings/personal/security/password.php index 5ffa9aaf8bc..0531468913a 100644 --- a/apps/settings/templates/settings/personal/security/password.php +++ b/apps/settings/templates/settings/personal/security/password.php @@ -1,61 +1,11 @@ <?php /** - * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @author Arthur Schiwon <blizzz@arthur-schiwon.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ -script('settings', [ - 'settings', - 'templates', - 'vue-settings-personal-security', -]); - if ($_['passwordChangeSupported']) { - script('settings', 'security_password'); + \OCP\Util::addScript('settings', 'vue-settings-personal-password'); } - ?> -<?php if ($_['passwordChangeSupported']) { ?> -<div id="security-password" class="section"> - <h2 class="inlineblock"><?php p($l->t('Password'));?></h2> - <span id="password-error-msg" class="msg success hidden">Saved</span> - <div class="personal-settings-setting-box personal-settings-password-box"> - <form id="passwordform" method="POST"> - <label for="pass1" class="hidden-visually"><?php p($l->t('Current password')); ?>: </label> - <input type="password" id="pass1" name="oldpassword" - placeholder="<?php p($l->t('Current password'));?>" - autocomplete="off" autocapitalize="none" autocorrect="off" /> - - <div class="personal-show-container"> - <label for="pass2" class="hidden-visually"><?php p($l->t('New password'));?>: </label> - <input type="password" id="pass2" name="newpassword" - placeholder="<?php p($l->t('New password')); ?>" - data-typetoggle="#personal-show" - autocomplete="off" autocapitalize="none" autocorrect="off" /> - <input type="checkbox" id="personal-show" class="hidden-visually" name="show" /><label for="personal-show" class="personal-show-label"></label> - </div> - - <input id="passwordbutton" type="submit" value="<?php p($l->t('Change password')); ?>" /> - - </form> - </div> - <span class="msg"></span> -</div> -<?php } ?> +<div id="security-password"></div> diff --git a/apps/settings/templates/settings/personal/security/twofactor.php b/apps/settings/templates/settings/personal/security/twofactor.php index 3d85f4505c3..986c28a95e6 100644 --- a/apps/settings/templates/settings/personal/security/twofactor.php +++ b/apps/settings/templates/settings/personal/security/twofactor.php @@ -1,25 +1,8 @@ <?php declare(strict_types=1); /** - * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ ?> @@ -38,24 +21,16 @@ declare(strict_types=1); /** @var \OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings $provider */ $provider = $data['provider']; - //Handle 2FA provider icons and theme - if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { - if ($_['themedark']) { - $icon = $provider->getLightIcon(); - } else { - $icon = $provider->getDarkIcon(); - } - //fallback icon if the 2factor provider doesn't provide an icon. - } else { - if ($_['themedark']) { - $icon = image_path('core', 'actions/password-white.svg'); - } else { - $icon = image_path('core', 'actions/password.svg'); - } - } - /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */ - $settings = $data['settings']; - ?> + //Handle 2FA provider icons and theme + if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) { + $icon = $provider->getDarkIcon(); + //fallback icon if the 2factor provider doesn't provide an icon. + } else { + $icon = image_path('core', 'actions/password.svg'); + } + /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */ + $settings = $data['settings']; + ?> <h3> <img class="two-factor-provider-settings-icon" src="<?php p($icon) ?>" alt=""> <?php p($provider->getDisplayName()) ?> @@ -65,4 +40,3 @@ declare(strict_types=1); <?php } ?> </ul> </div> - diff --git a/apps/settings/templates/settings/personal/security/webauthn.php b/apps/settings/templates/settings/personal/security/webauthn.php index 268e06aef7d..33611b5399c 100644 --- a/apps/settings/templates/settings/personal/security/webauthn.php +++ b/apps/settings/templates/settings/personal/security/webauthn.php @@ -1,30 +1,11 @@ <?php declare(strict_types=1); /** - * @copyright Copyright (c) 2020, Roeland Jago Douma <roeland@famdouma.nl> - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ -script('settings', [ - 'vue-settings-personal-webauthn', -]); +\OCP\Util::addScript('settings', 'vue-settings-personal-webauthn', 'core'); ?> |