diff options
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/installation.php | 6 | ||||
-rw-r--r-- | core/templates/layout.guest.php | 6 | ||||
-rw-r--r-- | core/templates/loginflowv2/authpicker.php | 46 | ||||
-rw-r--r-- | core/templates/loginflowv2/done.php | 39 | ||||
-rw-r--r-- | core/templates/loginflowv2/grant.php | 50 |
5 files changed, 143 insertions, 4 deletions
diff --git a/core/templates/installation.php b/core/templates/installation.php index 3fdde8da1c2..6dd7ed31382 100644 --- a/core/templates/installation.php +++ b/core/templates/installation.php @@ -50,14 +50,14 @@ script('core', [ value="<?php p($_['adminpass']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off" required> <label for="adminpass" class="infield"><?php p($l->t( 'Password' )); ?></label> - <input type="checkbox" id="show" name="show"> + <input type="checkbox" id="show" class="hidden-visually" name="show"> <label for="show"></label> </p> </fieldset> <?php if(!$_['directoryIsSet'] OR !$_['dbIsSet'] OR count($_['errors']) > 0): ?> <fieldset id="advancedHeader"> - <legend><a id="showAdvanced"><?php p($l->t( 'Storage & database' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend> + <legend><a id="showAdvanced" tabindex="0" href="#"><?php p($l->t( 'Storage & database' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret-white.svg')); ?>" /></a></legend> </fieldset> <?php endif; ?> @@ -113,7 +113,7 @@ script('core', [ value="<?php p($_['dbpass']); ?>" autocomplete="off" autocapitalize="none" autocorrect="off"> <label for="dbpass" class="infield"><?php p($l->t( 'Database password' )); ?></label> - <input type="checkbox" id="dbpassword-toggle" name="dbpassword-toggle"> + <input type="checkbox" id="dbpassword-toggle" class="hidden-visually" name="dbpassword-toggle"> <label for="dbpassword-toggle"></label> </p> <p class="groupmiddle"> diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 90cd83f5d2f..967c4d3dbd7 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -1,6 +1,10 @@ <!DOCTYPE html> <html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" > - <head data-requesttoken="<?php p($_['requesttoken']); ?>"> + <head +<?php if ($_['user_uid']) { ?> + data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" +<?php } ?> + data-requesttoken="<?php p($_['requesttoken']); ?>"> <meta charset="utf-8"> <title> <?php p($theme->getTitle()); ?> diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php new file mode 100644 index 00000000000..79462eec8dc --- /dev/null +++ b/core/templates/loginflowv2/authpicker.php @@ -0,0 +1,46 @@ +<?php +/** + * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> + * + * @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/>. + * + */ + +style('core', 'login/authpicker'); + +/** @var array $_ */ +/** @var \OCP\IURLGenerator $urlGenerator */ +$urlGenerator = $_['urlGenerator']; +?> + +<div class="picker-window"> + <h2><?php p($l->t('Connect to your account')) ?></h2> + <p class="info"> + <?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [ + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> + </p> + + <br/> + + <p id="redirect-link"> + <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken']])) ?>"> + <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>"> + </a> + </p> + +</div> diff --git a/core/templates/loginflowv2/done.php b/core/templates/loginflowv2/done.php new file mode 100644 index 00000000000..aa5fc89f5ab --- /dev/null +++ b/core/templates/loginflowv2/done.php @@ -0,0 +1,39 @@ +<?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/>. + * + */ + +style('core', 'login/authpicker'); + +/** @var array $_ */ +/** @var \OCP\IURLGenerator $urlGenerator */ +$urlGenerator = $_['urlGenerator']; +?> + +<div class="picker-window"> + <h2><?php p($l->t('Account connected')) ?></h2> + <p class="info"> + <?php print_unescaped($l->t('Your client should now be connected! You can close this window.')) ?> + </p> + + <br/> +</div> diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php new file mode 100644 index 00000000000..e5991d11a25 --- /dev/null +++ b/core/templates/loginflowv2/grant.php @@ -0,0 +1,50 @@ +<?php +/** + * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> + * + * @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/>. + * + */ + +style('core', 'login/authpicker'); + +/** @var array $_ */ +/** @var \OCP\IURLGenerator $urlGenerator */ +$urlGenerator = $_['urlGenerator']; +?> + +<div class="picker-window"> + <h2><?php p($l->t('Account access')) ?></h2> + <p class="info"> + <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', + \OCP\Util::sanitizeHTML($_['instanceName']) + ])) ?> + </p> + + <br/> + + <p id="redirect-link"> + <form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.generateAppPassword')) ?>"> + <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> + <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" /> + <div id="submit-wrapper"> + <input type="submit" id="submit" class="login primary" title="" value="<?php p($l->t('Grant access')); ?>" /> + <div class="submit-icon icon-confirm-white"></div> + </div> + </form> + </p> +</div> |