Do noy allow empty urls to be submitted in "add to your owncloud"
Fixes #19382
This commit is contained in:
parent
6d743ffac6
commit
08fd4b38f8
|
@ -228,6 +228,14 @@ OCA.Sharing.PublicApp = {
|
||||||
OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, name, isProtected);
|
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 () {
|
$('#save #save-button').click(function () {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
$('.save-form').css('display', 'inline');
|
$('.save-form').css('display', 'inline');
|
||||||
|
|
|
@ -76,7 +76,7 @@ $thumbSize = 1024;
|
||||||
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
|
<button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
|
||||||
<form class="save-form hidden" action="#">
|
<form class="save-form hidden" action="#">
|
||||||
<input type="text" id="remote_address" placeholder="example.com/owncloud"/>
|
<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>
|
</form>
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
Loading…
Reference in New Issue