Skip to content

Commit 4c43e89

Browse files
authored
Merge pull request #15123 from nextcloud/fix/share-link-pwd-error-feedback
Improve the share link password error feedback with a red border
2 parents 4e88cd3 + 410aaca commit 4c43e89

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

apps/files_sharing/js/dist/additionalScripts.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/additionalScripts.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/src/style/sharetabview.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
}
7474
.popovermenu {
7575
.linkPassMenu {
76+
input.error {
77+
border-color: var(--color-error) !important;
78+
&[type="submit"] {
79+
border-left: none;
80+
}
81+
}
7682
.share-pass-submit {
7783
width: auto !important;
7884
}

core/js/dist/share_backend.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/share_backend.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/sharedialoglinkshareview.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@
352352
}
353353
var $input = $li.find('.linkPassText');
354354
$input.removeClass('error');
355+
$input.parent().find('input').removeClass('error');
355356
var password = $input.val();
356357

357358
if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
@@ -380,6 +381,9 @@
380381
$loading.removeClass('inlineblock').addClass('hidden');
381382
},
382383
error: function(model, msg) {
384+
// Add visual feedback to both the input and the submit button
385+
$input.parent().find('input').addClass('error');
386+
383387
// destroy old tooltips
384388
var $container = $input.parent();
385389
$container.tooltip('destroy');

0 commit comments

Comments
 (0)