Do noy allow empty urls to be submitted in "add to your owncloud"
Fixes #19382
This commit is contained in:
parent
6d743ffac6
commit
08fd4b38f8
2 changed files with 9 additions and 1 deletions
|
@ -228,6 +228,14 @@ OCA.Sharing.PublicApp = {
|
|||
OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, name, isProtected);
|
||||
});
|
||||
|
||||
$('#remote_address').on("change keyup paste", function() {
|
||||
if ($(this).val() === '') {
|
||||
$('#save-button-confirm').prop('disabled', true);
|
||||
} else {
|
||||
$('#save-button-confirm').prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#save #save-button').click(function () {
|
||||
$(this).hide();
|
||||
$('.save-form').css('display', 'inline');
|
||||
|
|
|
@ -76,7 +76,7 @@ $thumbSize = 1024;
|
|||
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
|
||||
<form class="save-form hidden" action="#">
|
||||
<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
|
||||
<button id="save-button-confirm" class="icon-confirm svg"></button>
|
||||
<button id="save-button-confirm" class="icon-confirm svg" disabled></button>
|
||||
</form>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
|
Loading…
Reference in a new issue