From 7e52aac7715e026dbe9c6e2299f788b7a111d617 Mon Sep 17 00:00:00 2001 From: prastut Date: Tue, 8 Mar 2016 04:25:35 +0530 Subject: [PATCH] Public link share disabled if password length is equal to 0 --- apps/files_sharing/js/authenticate.js | 9 +++++++++ apps/files_sharing/templates/authenticate.php | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 apps/files_sharing/js/authenticate.js 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'); ?>
@@ -18,8 +19,8 @@ placeholder="t('Password')); ?>" value="" autocomplete="off" autocapitalize="off" autocorrect="off" autofocus /> - +