Merge pull request #15123 from nextcloud/fix/share-link-pwd-error-feedback

Improve the share link password error feedback with a red border
This commit is contained in:
Morris Jobke 2019-04-16 13:52:19 +02:00 committed by GitHub
commit 4c43e89dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 0 deletions

Binary file not shown.

View file

@ -73,6 +73,12 @@
}
.popovermenu {
.linkPassMenu {
input.error {
border-color: var(--color-error) !important;
&[type="submit"] {
border-left: none;
}
}
.share-pass-submit {
width: auto !important;
}

Binary file not shown.

Binary file not shown.

View file

@ -352,6 +352,7 @@
}
var $input = $li.find('.linkPassText');
$input.removeClass('error');
$input.parent().find('input').removeClass('error');
var password = $input.val();
if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
@ -380,6 +381,9 @@
$loading.removeClass('inlineblock').addClass('hidden');
},
error: function(model, msg) {
// Add visual feedback to both the input and the submit button
$input.parent().find('input').addClass('error');
// destroy old tooltips
var $container = $input.parent();
$container.tooltip('destroy');