Merge pull request #22930 from owncloud/bugfix-submit-disable-password-length-zero

Public link share disabled if password length is equal to 0
This commit is contained in:
Thomas Müller 2016-03-09 12:22:01 +01:00
commit 290a16e5d7
2 changed files with 12 additions and 2 deletions

View File

@ -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);
}
});
});

View File

@ -2,6 +2,7 @@
/** @var $_ array */ /** @var $_ array */
/** @var $l OC_L10N */ /** @var $l OC_L10N */
style('files_sharing', 'authenticate'); style('files_sharing', 'authenticate');
script('files_sharing', 'authenticate');
?> ?>
<form method="post"> <form method="post">
<fieldset> <fieldset>
@ -18,8 +19,8 @@
placeholder="<?php p($l->t('Password')); ?>" value="" placeholder="<?php p($l->t('Password')); ?>" value=""
autocomplete="off" autocapitalize="off" autocorrect="off" autocomplete="off" autocapitalize="off" autocorrect="off"
autofocus /> autofocus />
<input type="submit" value="" <input type="submit" id="password-submit"
class="svg icon-confirm input-button-inline" /> class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
</p> </p>
</fieldset> </fieldset>
</form> </form>