From: Morris Jobke Date: Mon, 7 Oct 2013 15:38:27 +0000 (+0200) Subject: Fix password screen for public shares X-Git-Tag: v6.0.0alpha2~42^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4af220d09e70b63195da2cb90f7556461cf29157;p=nextcloud-server.git Fix password screen for public shares * Works in IE8, 9, 10, Firefox 24 and Chromium 30 * Credits to Julian Müller @Julian1998 --- diff --git a/apps/files_sharing/css/authenticate.css b/apps/files_sharing/css/authenticate.css new file mode 100644 index 00000000000..cebe906dd59 --- /dev/null +++ b/apps/files_sharing/css/authenticate.css @@ -0,0 +1,26 @@ +#body-login form label.infield { + width: 190px; + padding: 10px; + left: 8px; + top: 8px; +} + +#password { + width: 190px !important; + padding: 10px; + margin: 6px; +} + +input[type="submit"]{ + width: 45px; + height: 45px; + margin: 6px; + background-image: url('%webroot%/core/img/actions/confirm.svg'); + background-repeat: no-repeat; + background-position: center; +} + +#body-login input[type="submit"] { + position: absolute; + top: 0px; +} diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index eff38dcc0fd..8bdbc8524e6 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -77,6 +77,7 @@ if (isset($path)) { $hasher = new PasswordHash(8, $forcePortable); if (!($hasher->CheckPassword($password.OC_Config::getValue('passwordsalt', ''), $linkItem['share_with']))) { + OCP\Util::addStyle('files_sharing', 'authenticate'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl->assign('URL', $url); $tmpl->assign('wrongpw', true); @@ -101,6 +102,7 @@ if (isset($path)) { || \OC::$session->get('public_link_authenticated') !== $linkItem['id'] ) { // Prompt for password + OCP\Util::addStyle('files_sharing', 'authenticate'); $tmpl = new OCP\Template('files_sharing', 'authenticate', 'guest'); $tmpl->assign('URL', $url); $tmpl->printPage(); diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php index 2c89b5df3f6..6b98e6c9f34 100644 --- a/apps/files_sharing/templates/authenticate.php +++ b/apps/files_sharing/templates/authenticate.php @@ -1,12 +1,15 @@
+ +
t('This share is password-protected')); ?>
+ -
t('The password is wrong. Try again.')); ?>
+
t('The password is wrong. Try again.')); ?>

- +

diff --git a/core/css/styles.css b/core/css/styles.css index 6406bcd7e63..a1ecd123983 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -237,6 +237,7 @@ input[type="submit"].enabled { #body-login p.info, #body-login form fieldset legend, #body-login #datadirContent label, +#body-login form fieldset .warning-info, #body-login form input[type="checkbox"]+label { text-align: center; color: #ccc; diff --git a/core/img/actions/confirm.png b/core/img/actions/confirm.png new file mode 100644 index 00000000000..ccde88fb1e2 Binary files /dev/null and b/core/img/actions/confirm.png differ diff --git a/core/img/actions/confirm.svg b/core/img/actions/confirm.svg new file mode 100644 index 00000000000..bb3f9db2eb8 --- /dev/null +++ b/core/img/actions/confirm.svg @@ -0,0 +1,65 @@ + + + + + + + + + + image/svg+xml + + + + + + + + +