diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-10 04:49:47 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-10 04:49:47 -0700 |
commit | cf554fd8043a984dfc475bc10d161b96f0ce7b4b (patch) | |
tree | 093b37124027c4fe61cf2fe781bcc356728bbe88 /apps | |
parent | d968843bf629c188d7f3e8a85e565cf78878e02f (diff) | |
parent | c99c3ea9e62d5c150aaaecc4075f4ea35b4034ea (diff) | |
download | nextcloud-server-cf554fd8043a984dfc475bc10d161b96f0ce7b4b.tar.gz nextcloud-server-cf554fd8043a984dfc475bc10d161b96f0ce7b4b.zip |
Merge pull request #5182 from owncloud/fix-sharring-with-password-screen
Fix password screen for public shares
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/css/authenticate.css | 26 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/templates/authenticate.php | 7 |
3 files changed, 33 insertions, 2 deletions
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 @@ <form action="<?php p($_['URL']); ?>" method="post"> <fieldset> + <?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> + <div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div> <?php endif; ?> <p class="infield"> <label for="password" class="infield"><?php p($l->t('Password')); ?></label> <input type="password" name="password" id="password" placeholder="" value="" autofocus /> - <input type="submit" value="<?php p($l->t('Submit')); ?>" /> + <input type="submit" value="" class="svg" /> </p> </fieldset> </form> |