Merge pull request #19421 from owncloud/fix_19382
Do noy allow empty urls to be submitted in "add to your owncloud"
This commit is contained in:
commit
d6e3195b38
3 changed files with 19 additions and 1 deletions
|
@ -134,9 +134,19 @@ thead {
|
|||
margin: 2px 0 !important;
|
||||
}
|
||||
|
||||
#save-button-confirm:disabled,
|
||||
#save-button-confirm:disabled:hover,
|
||||
#save-button-confirm:disabled:focus {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
||||
filter: alpha(opacity=20);
|
||||
opacity: .2;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#save-button-confirm:hover,
|
||||
#save-button-confirm:focus {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||
filter: alpha(opacity=100);
|
||||
opacity: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -228,6 +228,14 @@ OCA.Sharing.PublicApp = {
|
|||
OCA.Sharing.PublicApp._saveToOwnCloud(remote, token, owner, name, isProtected);
|
||||
});
|
||||
|
||||
$('#remote_address').on("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