diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-11 14:15:03 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-20 08:53:37 +0200 |
commit | 31392c24434c8dfbe770cec93ccb3c209392334e (patch) | |
tree | b489fe7d181223b06c8c358be6922a47433ce1d8 /apps | |
parent | 366981fba6d01167c1ac38f559bd611062d8e534 (diff) | |
download | nextcloud-server-31392c24434c8dfbe770cec93ccb3c209392334e.tar.gz nextcloud-server-31392c24434c8dfbe770cec93ccb3c209392334e.zip |
Move public auth page over
Now this is in core so the basics (that 99% of the app will want to
use) looks always the same.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/css/authenticate.css | 27 | ||||
-rw-r--r-- | apps/files_sharing/js/authenticate.js | 9 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php | 17 | ||||
-rw-r--r-- | apps/files_sharing/templates/authenticate.php | 27 |
4 files changed, 0 insertions, 80 deletions
diff --git a/apps/files_sharing/css/authenticate.css b/apps/files_sharing/css/authenticate.css deleted file mode 100644 index 7f83e0b41e7..00000000000 --- a/apps/files_sharing/css/authenticate.css +++ /dev/null @@ -1,27 +0,0 @@ -form fieldset { - display: flex !important; - flex-direction: column; -} - -#password { - margin-right: 0 !important; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - height: 45px; - box-sizing: border-box; - flex: 1 1 auto; - width: 100% !important; - min-width: 0; /* FF hack for to override default value */ -} - -input[type='submit'] { - width: 45px; - height: 45px; - margin-left: 0 !important; - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -fieldset > p { - display: inline-flex; -} diff --git a/apps/files_sharing/js/authenticate.js b/apps/files_sharing/js/authenticate.js deleted file mode 100644 index 7f3f0d0a7d4..00000000000 --- a/apps/files_sharing/js/authenticate.js +++ /dev/null @@ -1,9 +0,0 @@ -$(document).ready(function(){ - $('#password').on('keyup input change', function() { - if ($('#password').val().length > 0) { - $('#password-submit').prop('disabled', false); - } else { - $('#password-submit').prop('disabled', true); - } - }); -}); diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 5c72bbd8c7b..cb54c0b28f1 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -172,23 +172,6 @@ class ShareController extends AuthPublicShareController { } /** - * @PublicPage - * @NoCSRFRequired - * - * @return TemplateResponse - */ - public function showAuthenticate(): TemplateResponse { - return new TemplateResponse($this->appName, 'authenticate', array(), 'guest'); - } - - /** - * @return TemplateResponse - */ - public function showAuthFailed(): TemplateResponse { - return new TemplateResponse($this->appName, 'authenticate', array('wrongpw' => true), 'guest'); - } - - /** * Authenticate a link item with the given password. * Or use the session if no password is provided. * diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php deleted file mode 100644 index 6f270c2851a..00000000000 --- a/apps/files_sharing/templates/authenticate.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - /** @var $_ array */ - /** @var $l \OCP\IL10N */ - style('core', 'guest'); - style('files_sharing', 'authenticate'); - script('files_sharing', 'authenticate'); -?> -<form method="post"> - <fieldset class="warning"> - <?php if (!isset($_['wrongpw'])): ?> - <div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div> - <?php endif; ?> - <?php if (isset($_['wrongpw'])): ?> - <div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div> - <?php endif; ?> - <p> - <label for="password" class="infield"><?php p($l->t('Password')); ?></label> - <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> - <input type="password" name="password" id="password" - placeholder="<?php p($l->t('Password')); ?>" value="" - autocomplete="new-password" autocapitalize="off" autocorrect="off" - autofocus /> - <input type="submit" id="password-submit" - class="svg icon-confirm input-button-inline" value="" disabled="disabled" /> - </p> - </fieldset> -</form> |