summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-09 12:22:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-09 12:22:01 +0100
commit290a16e5d7f4fdc59187ec7d6e7cd287505988e1 (patch)
tree27a1e27a9eef9a6ba067fe90fab2d249071fd954 /apps
parent879d51b3e8943c58696f00420099aeb767194001 (diff)
parent7e52aac7715e026dbe9c6e2299f788b7a111d617 (diff)
downloadnextcloud-server-290a16e5d7f4fdc59187ec7d6e7cd287505988e1.tar.gz
nextcloud-server-290a16e5d7f4fdc59187ec7d6e7cd287505988e1.zip
Merge pull request #22930 from owncloud/bugfix-submit-disable-password-length-zero
Public link share disabled if password length is equal to 0
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/authenticate.js9
-rw-r--r--apps/files_sharing/templates/authenticate.php5
2 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_sharing/js/authenticate.js b/apps/files_sharing/js/authenticate.js
new file mode 100644
index 00000000000..7f3f0d0a7d4
--- /dev/null
+++ b/apps/files_sharing/js/authenticate.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/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php
index 72adf0d1674..909e839177c 100644
--- a/apps/files_sharing/templates/authenticate.php
+++ b/apps/files_sharing/templates/authenticate.php
@@ -2,6 +2,7 @@
/** @var $_ array */
/** @var $l OC_L10N */
style('files_sharing', 'authenticate');
+ script('files_sharing', 'authenticate');
?>
<form method="post">
<fieldset>
@@ -18,8 +19,8 @@
placeholder="<?php p($l->t('Password')); ?>" value=""
autocomplete="off" autocapitalize="off" autocorrect="off"
autofocus />
- <input type="submit" value=""
- class="svg icon-confirm input-button-inline" />
+ <input type="submit" id="password-submit"
+ class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
</p>
</fieldset>
</form>