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 /core | |
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 'core')
-rw-r--r-- | core/css/publicshareauth.css | 27 | ||||
-rw-r--r-- | core/js/publicshareauth.js | 9 | ||||
-rw-r--r-- | core/templates/publicshareauth.php | 27 |
3 files changed, 63 insertions, 0 deletions
diff --git a/core/css/publicshareauth.css b/core/css/publicshareauth.css new file mode 100644 index 00000000000..7f83e0b41e7 --- /dev/null +++ b/core/css/publicshareauth.css @@ -0,0 +1,27 @@ +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/core/js/publicshareauth.js b/core/js/publicshareauth.js new file mode 100644 index 00000000000..7f3f0d0a7d4 --- /dev/null +++ b/core/js/publicshareauth.js @@ -0,0 +1,9 @@ +$(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/core/templates/publicshareauth.php b/core/templates/publicshareauth.php new file mode 100644 index 00000000000..adcc2853f87 --- /dev/null +++ b/core/templates/publicshareauth.php @@ -0,0 +1,27 @@ +<?php + /** @var $_ array */ + /** @var $l \OCP\IL10N */ + style('core', 'guest'); + style('core', 'publicshareauth'); + script('core', 'publicshareauth'); +?> +<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> |